File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -579,14 +579,15 @@ impl Visitor<'tcx> for DeadVisitor<'tcx> {
579579 hir:: ItemKind :: Trait ( ..) |
580580 hir:: ItemKind :: Impl ( ..) => {
581581 // FIXME(66095): Because item.span is annotated with things
582- // like a macro_backtrace , and ident.span isn't, we use the
582+ // like expansion data , and ident.span isn't, we use the
583583 // def_span method if it's part of a macro invocation
584+ // (and thus has asource_callee set).
584585 // We should probably annotate ident.span with the macro
585586 // context, but that's a larger change.
586- if item. span . macro_backtrace ( ) . len ( ) == 0 {
587- item. ident . span
588- } else {
587+ if item. span . source_callee ( ) . is_some ( ) {
589588 self . tcx . sess . source_map ( ) . def_span ( item. span )
589+ } else {
590+ item. ident . span
590591 }
591592 } ,
592593 _ => item. span ,
You can’t perform that action at this time.
0 commit comments