-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Open
Labels
A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)C-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
In #65830 it was discovered that hir::Item.ident.span
isn't marked with_ctxt
of being part of a macro expansion. This had two effects that we saw there:
- error messages don't include the "in this macro invocation" hints
- cases where the dead_code error was suppressed because of foreign macros were no longer suppressed
To solve that there, we're going to just use the old behavior when we're in the middle of a macro expansion already, so we don't use the un-marked span. As @estebank suggested, we should probably clean this up in a separate change.
Metadata
Metadata
Assignees
Labels
A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)C-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.