Keep a parent LocalDefId in SpanData.
This commit is contained in:
parent
06f7ca307d
commit
00485e0c0e
22 changed files with 88 additions and 40 deletions
|
@ -196,7 +196,11 @@ impl CoverageSpan {
|
|||
/// body_span), returns the macro name symbol.
|
||||
pub fn visible_macro(&self, body_span: Span) -> Option<Symbol> {
|
||||
if let Some(current_macro) = self.current_macro() {
|
||||
if self.expn_span.parent().unwrap_or_else(|| bug!("macro must have a parent")).ctxt()
|
||||
if self
|
||||
.expn_span
|
||||
.parent_callsite()
|
||||
.unwrap_or_else(|| bug!("macro must have a parent"))
|
||||
.ctxt()
|
||||
== body_span.ctxt()
|
||||
{
|
||||
return Some(current_macro);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue