Auto merge of #125741 - petrochenkov:atvisord, r=davidtwco
ast: Standardize visiting order for attributes and node IDs This should only affect `macro_rules` scopes and order of diagnostics. Also add a deprecation lint for `macro_rules` called outside of their scope, like in https://github.com/rust-lang/rust/issues/124535.
This commit is contained in:
commit
d929a42a66
21 changed files with 426 additions and 200 deletions
|
@ -434,5 +434,8 @@ pub(super) fn decorate_lint(sess: &Session, diagnostic: BuiltinLintDiag, diag: &
|
|||
lints::InnerAttributeUnstable::CustomInnerAttribute
|
||||
}
|
||||
.decorate_lint(diag),
|
||||
BuiltinLintDiag::OutOfScopeMacroCalls { path } => {
|
||||
lints::OutOfScopeMacroCalls { path }.decorate_lint(diag)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2911,3 +2911,10 @@ pub struct UnsafeAttrOutsideUnsafeSuggestion {
|
|||
#[suggestion_part(code = ")")]
|
||||
pub right: Span,
|
||||
}
|
||||
|
||||
#[derive(LintDiagnostic)]
|
||||
#[diag(lint_out_of_scope_macro_calls)]
|
||||
#[help]
|
||||
pub struct OutOfScopeMacroCalls {
|
||||
pub path: String,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue