Skip to content

Commit 6749340

Browse files
Remove dead code
Summary: This code was originally used to fix Action Error tagging. That was fixed by anyhow->buck2_error migration so it is no longer being used anywhere Reviewed By: JakobDegen Differential Revision: D67299247 fbshipit-source-id: 4df4115e0b7a8f2c71dc98a67ad2b1e44bbed43f
1 parent e97df9b commit 6749340

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

app/buck2_error/src/error.rs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,14 @@ use buck2_data::ActionError;
1414
use itertools::Itertools;
1515
use smallvec::SmallVec;
1616

17-
use crate::ErrorTag;
18-
use crate::__for_macro::AsDynError;
1917
use crate::classify::best_tag;
2018
use crate::classify::error_tag_category;
2119
use crate::context_value::ContextValue;
2220
use crate::context_value::StarlarkContext;
2321
use crate::context_value::TypedContext;
2422
use crate::format::into_anyhow_for_format;
2523
use crate::root::ErrorRoot;
24+
use crate::ErrorTag;
2625
use crate::Tier;
2726
use crate::UniqueRootId;
2827

@@ -71,14 +70,6 @@ impl Error {
7170
crate::Error(Arc::new(ErrorKind::Root(Box::new(error_root))))
7271
}
7372

74-
#[track_caller]
75-
#[cold]
76-
pub fn from_anyhow_ref(e: &anyhow::Error) -> Self {
77-
let source_location =
78-
crate::source_location::from_file(std::panic::Location::caller().file(), None);
79-
crate::any::recover_crate_error(e.as_dyn_error(), source_location)
80-
}
81-
8273
fn iter_kinds<'a>(&'a self) -> impl Iterator<Item = &'a ErrorKind> {
8374
let mut cur = Some(self);
8475
std::iter::from_fn(move || {

0 commit comments

Comments
 (0)