about summary refs log tree commit diff
path: root/compiler/rustc_span/src/lib.rs
diff options
context:
space:
mode:
authorAlex Macleod <alex@macleod.io>2024-07-25 17:53:29 +0000
committerAlex Macleod <alex@macleod.io>2024-08-06 13:29:11 +0000
commitad3f3c7fb67329778bf26771cd4fbfc68e175daf (patch)
tree3a67ae0254f4ea7d872cc2572a9ddfa188e7ece7 /compiler/rustc_span/src/lib.rs
parent28e684b47000d4ed4cdb5d982331e5ff8141c1ce (diff)
downloadrust-ad3f3c7fb67329778bf26771cd4fbfc68e175daf.tar.gz
rust-ad3f3c7fb67329778bf26771cd4fbfc68e175daf.zip
Skip locking span interner for some syntax context checks
Diffstat (limited to 'compiler/rustc_span/src/lib.rs')
-rw-r--r--compiler/rustc_span/src/lib.rs6
1 files changed, 0 insertions, 6 deletions
diff --git a/compiler/rustc_span/src/lib.rs b/compiler/rustc_span/src/lib.rs
index 7c8ac3be4be..6cb8491067d 100644
--- a/compiler/rustc_span/src/lib.rs
+++ b/compiler/rustc_span/src/lib.rs
@@ -564,12 +564,6 @@ impl Span {
         !self.is_dummy() && sm.is_span_accessible(self)
     }
 
-    /// Returns `true` if this span comes from any kind of macro, desugaring or inlining.
-    #[inline]
-    pub fn from_expansion(self) -> bool {
-        !self.ctxt().is_root()
-    }
-
     /// Returns `true` if `span` originates in a derive-macro's expansion.
     pub fn in_derive_expansion(self) -> bool {
         matches!(self.ctxt().outer_expn_data().kind, ExpnKind::Macro(MacroKind::Derive, _))