Skip locking span interner for some syntax context checks
This commit is contained in:
parent
28e684b470
commit
ad3f3c7fb6
2 changed files with 11 additions and 9 deletions
|
@ -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, _))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue