Rollup merge of #128080 - estebank:out-of-scope-macro, r=petrochenkov
Specify scope in `out_of_scope_macro_calls` lint ``` warning: cannot find macro `in_root` in the crate root --> $DIR/key-value-expansion-scope.rs:1:10 | LL | #![doc = in_root!()] | ^^^^^^^ not found in the crate root | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #124535 <https://github.com/rust-lang/rust/issues/124535> = help: import `macro_rules` with `use` to make it callable above its definition = note: `#[warn(out_of_scope_macro_calls)]` on by default ``` r? ```@petrochenkov```
This commit is contained in:
commit
12e6b4897c
7 changed files with 48 additions and 26 deletions
|
@ -444,8 +444,8 @@ pub(super) fn decorate_lint(
|
|||
lints::InnerAttributeUnstable::CustomInnerAttribute
|
||||
}
|
||||
.decorate_lint(diag),
|
||||
BuiltinLintDiag::OutOfScopeMacroCalls { path } => {
|
||||
lints::OutOfScopeMacroCalls { path }.decorate_lint(diag)
|
||||
BuiltinLintDiag::OutOfScopeMacroCalls { span, path, location } => {
|
||||
lints::OutOfScopeMacroCalls { span, path, location }.decorate_lint(diag)
|
||||
}
|
||||
BuiltinLintDiag::UnexpectedBuiltinCfg { cfg, cfg_name, controlled_by } => {
|
||||
lints::UnexpectedBuiltinCfg { cfg, cfg_name, controlled_by }.decorate_lint(diag)
|
||||
|
|
|
@ -3108,7 +3108,10 @@ pub(crate) struct UnsafeAttrOutsideUnsafeSuggestion {
|
|||
#[diag(lint_out_of_scope_macro_calls)]
|
||||
#[help]
|
||||
pub(crate) struct OutOfScopeMacroCalls {
|
||||
#[label]
|
||||
pub span: Span,
|
||||
pub path: String,
|
||||
pub location: String,
|
||||
}
|
||||
|
||||
#[derive(LintDiagnostic)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue