Remove in_macro from utils

This commit is contained in:
Cameron Steffen
2022-01-04 11:58:39 -06:00
parent 3ea77847fe
commit 00da1b8f14
3 changed files with 6 additions and 10 deletions

View File

@@ -147,13 +147,6 @@ macro_rules! extract_msrv_attr {
};
}
/// Returns `true` if the span comes from a macro expansion, no matter if from a
/// macro by example or from a procedural macro
#[must_use]
pub fn in_macro(span: Span) -> bool {
span.from_expansion() && !matches!(span.ctxt().outer_expn_data().kind, ExpnKind::Desugaring(..))
}
/// Returns `true` if the two spans come from differing expansions (i.e., one is
/// from a macro and one isn't).
#[must_use]