Fix #107113, avoid suggest for macro attributes
This commit is contained in:
parent
7a5d2d0138
commit
75b9f53e47
8 changed files with 63 additions and 2 deletions
|
@ -449,7 +449,11 @@ pub fn in_external_macro(sess: &Session, span: Span) -> bool {
|
|||
match expn_data.kind {
|
||||
ExpnKind::Root
|
||||
| ExpnKind::Desugaring(
|
||||
DesugaringKind::ForLoop | DesugaringKind::WhileLoop | DesugaringKind::OpaqueTy,
|
||||
DesugaringKind::ForLoop
|
||||
| DesugaringKind::WhileLoop
|
||||
| DesugaringKind::OpaqueTy
|
||||
| DesugaringKind::Async
|
||||
| DesugaringKind::Await,
|
||||
) => false,
|
||||
ExpnKind::AstPass(_) | ExpnKind::Desugaring(_) => true, // well, it's "external"
|
||||
ExpnKind::Macro(MacroKind::Bang, _) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue