File tree 1 file changed +5
-4
lines changed
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> {
579
579
hir:: ItemKind :: Trait ( ..) |
580
580
hir:: ItemKind :: Impl ( ..) => {
581
581
// 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
583
583
// def_span method if it's part of a macro invocation
584
+ // (and thus has asource_callee set).
584
585
// We should probably annotate ident.span with the macro
585
586
// 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 ( ) {
589
588
self . tcx . sess . source_map ( ) . def_span ( item. span )
589
+ } else {
590
+ item. ident . span
590
591
}
591
592
} ,
592
593
_ => item. span ,
You can’t perform that action at this time.
0 commit comments