Improved support of collapse_debuginfo attribute for macros.
This commit is contained in:
parent
ca9ff83f1b
commit
f2dbebafad
8 changed files with 513 additions and 39 deletions
|
@ -568,13 +568,6 @@ impl Span {
|
|||
self.ctxt() != SyntaxContext::root()
|
||||
}
|
||||
|
||||
/// Returns `true` if `span` originates in a macro's expansion where debuginfo should be
|
||||
/// collapsed.
|
||||
pub fn in_macro_expansion_with_collapse_debuginfo(self) -> bool {
|
||||
let outer_expn = self.ctxt().outer_expn_data();
|
||||
matches!(outer_expn.kind, ExpnKind::Macro(..)) && outer_expn.collapse_debuginfo
|
||||
}
|
||||
|
||||
/// 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