Reword message
This commit is contained in:
parent
fe7ed278b7
commit
835d434c79
6 changed files with 20 additions and 20 deletions
|
@ -630,8 +630,8 @@ lint_opaque_hidden_inferred_bound_sugg = add this bound
|
||||||
lint_or_patterns_back_compat = the meaning of the `pat` fragment specifier is changing in Rust 2021, which may affect this macro
|
lint_or_patterns_back_compat = the meaning of the `pat` fragment specifier is changing in Rust 2021, which may affect this macro
|
||||||
.suggestion = use pat_param to preserve semantics
|
.suggestion = use pat_param to preserve semantics
|
||||||
|
|
||||||
lint_out_of_scope_macro_calls = cannot find macro `{$path}` in {$scope}
|
lint_out_of_scope_macro_calls = cannot find macro `{$path}` in the current scope when looking from {$location}
|
||||||
.label = not found in {$scope}
|
.label = not found from {$location}
|
||||||
.help = import `macro_rules` with `use` to make it callable above its definition
|
.help = import `macro_rules` with `use` to make it callable above its definition
|
||||||
|
|
||||||
lint_overflowing_bin_hex = literal out of range for `{$ty}`
|
lint_overflowing_bin_hex = literal out of range for `{$ty}`
|
||||||
|
|
|
@ -444,8 +444,8 @@ pub(super) fn decorate_lint(
|
||||||
lints::InnerAttributeUnstable::CustomInnerAttribute
|
lints::InnerAttributeUnstable::CustomInnerAttribute
|
||||||
}
|
}
|
||||||
.decorate_lint(diag),
|
.decorate_lint(diag),
|
||||||
BuiltinLintDiag::OutOfScopeMacroCalls { span, path, scope } => {
|
BuiltinLintDiag::OutOfScopeMacroCalls { span, path, location } => {
|
||||||
lints::OutOfScopeMacroCalls { span, path, scope }.decorate_lint(diag)
|
lints::OutOfScopeMacroCalls { span, path, location }.decorate_lint(diag)
|
||||||
}
|
}
|
||||||
BuiltinLintDiag::UnexpectedBuiltinCfg { cfg, cfg_name, controlled_by } => {
|
BuiltinLintDiag::UnexpectedBuiltinCfg { cfg, cfg_name, controlled_by } => {
|
||||||
lints::UnexpectedBuiltinCfg { cfg, cfg_name, controlled_by }.decorate_lint(diag)
|
lints::UnexpectedBuiltinCfg { cfg, cfg_name, controlled_by }.decorate_lint(diag)
|
||||||
|
|
|
@ -3111,7 +3111,7 @@ pub(crate) struct OutOfScopeMacroCalls {
|
||||||
#[label]
|
#[label]
|
||||||
pub span: Span,
|
pub span: Span,
|
||||||
pub path: String,
|
pub path: String,
|
||||||
pub scope: String,
|
pub location: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(LintDiagnostic)]
|
#[derive(LintDiagnostic)]
|
||||||
|
|
|
@ -821,7 +821,7 @@ pub enum BuiltinLintDiag {
|
||||||
OutOfScopeMacroCalls {
|
OutOfScopeMacroCalls {
|
||||||
span: Span,
|
span: Span,
|
||||||
path: String,
|
path: String,
|
||||||
scope: String,
|
location: String,
|
||||||
},
|
},
|
||||||
UnexpectedBuiltinCfg {
|
UnexpectedBuiltinCfg {
|
||||||
cfg: String,
|
cfg: String,
|
||||||
|
|
|
@ -1070,7 +1070,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
|
||||||
None,
|
None,
|
||||||
);
|
);
|
||||||
if fallback_binding.ok().and_then(|b| b.res().opt_def_id()) != Some(def_id) {
|
if fallback_binding.ok().and_then(|b| b.res().opt_def_id()) != Some(def_id) {
|
||||||
let scope = match parent_scope.module.kind {
|
let location = match parent_scope.module.kind {
|
||||||
ModuleKind::Def(_, _, name) if name == kw::Empty => {
|
ModuleKind::Def(_, _, name) if name == kw::Empty => {
|
||||||
"the crate root".to_string()
|
"the crate root".to_string()
|
||||||
}
|
}
|
||||||
|
@ -1086,7 +1086,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
|
||||||
BuiltinLintDiag::OutOfScopeMacroCalls {
|
BuiltinLintDiag::OutOfScopeMacroCalls {
|
||||||
span: path.span,
|
span: path.span,
|
||||||
path: pprust::path_to_string(path),
|
path: pprust::path_to_string(path),
|
||||||
scope,
|
location,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -126,62 +126,62 @@ LL | #![doc = in_block!()]
|
||||||
|
|
|
|
||||||
= help: have you added the `#[macro_use]` on the module/import?
|
= help: have you added the `#[macro_use]` on the module/import?
|
||||||
|
|
||||||
warning: cannot find macro `in_root` in the crate root
|
warning: cannot find macro `in_root` in the current scope when looking from the crate root
|
||||||
--> $DIR/key-value-expansion-scope.rs:1:10
|
--> $DIR/key-value-expansion-scope.rs:1:10
|
||||||
|
|
|
|
||||||
LL | #![doc = in_root!()]
|
LL | #![doc = in_root!()]
|
||||||
| ^^^^^^^ not found in the crate root
|
| ^^^^^^^ not found from 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!
|
= 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>
|
= 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
|
= help: import `macro_rules` with `use` to make it callable above its definition
|
||||||
= note: `#[warn(out_of_scope_macro_calls)]` on by default
|
= note: `#[warn(out_of_scope_macro_calls)]` on by default
|
||||||
|
|
||||||
warning: cannot find macro `in_mod_escape` in the crate root
|
warning: cannot find macro `in_mod_escape` in the current scope when looking from the crate root
|
||||||
--> $DIR/key-value-expansion-scope.rs:4:10
|
--> $DIR/key-value-expansion-scope.rs:4:10
|
||||||
|
|
|
|
||||||
LL | #![doc = in_mod_escape!()]
|
LL | #![doc = in_mod_escape!()]
|
||||||
| ^^^^^^^^^^^^^ not found in the crate root
|
| ^^^^^^^^^^^^^ not found from 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!
|
= 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>
|
= 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
|
= help: import `macro_rules` with `use` to make it callable above its definition
|
||||||
|
|
||||||
warning: cannot find macro `in_mod` in module `macros_stay`
|
warning: cannot find macro `in_mod` in the current scope when looking from module `macros_stay`
|
||||||
--> $DIR/key-value-expansion-scope.rs:21:9
|
--> $DIR/key-value-expansion-scope.rs:21:9
|
||||||
|
|
|
|
||||||
LL | #[doc = in_mod!()]
|
LL | #[doc = in_mod!()]
|
||||||
| ^^^^^^ not found in module `macros_stay`
|
| ^^^^^^ not found from module `macros_stay`
|
||||||
|
|
|
|
||||||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
= 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>
|
= 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
|
= help: import `macro_rules` with `use` to make it callable above its definition
|
||||||
|
|
||||||
warning: cannot find macro `in_mod` in module `macros_stay`
|
warning: cannot find macro `in_mod` in the current scope when looking from module `macros_stay`
|
||||||
--> $DIR/key-value-expansion-scope.rs:24:14
|
--> $DIR/key-value-expansion-scope.rs:24:14
|
||||||
|
|
|
|
||||||
LL | #![doc = in_mod!()]
|
LL | #![doc = in_mod!()]
|
||||||
| ^^^^^^ not found in module `macros_stay`
|
| ^^^^^^ not found from module `macros_stay`
|
||||||
|
|
|
|
||||||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
= 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>
|
= 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
|
= help: import `macro_rules` with `use` to make it callable above its definition
|
||||||
|
|
||||||
warning: cannot find macro `in_mod_escape` in module `macros_escape`
|
warning: cannot find macro `in_mod_escape` in the current scope when looking from module `macros_escape`
|
||||||
--> $DIR/key-value-expansion-scope.rs:36:9
|
--> $DIR/key-value-expansion-scope.rs:36:9
|
||||||
|
|
|
|
||||||
LL | #[doc = in_mod_escape!()]
|
LL | #[doc = in_mod_escape!()]
|
||||||
| ^^^^^^^^^^^^^ not found in module `macros_escape`
|
| ^^^^^^^^^^^^^ not found from module `macros_escape`
|
||||||
|
|
|
|
||||||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
= 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>
|
= 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
|
= help: import `macro_rules` with `use` to make it callable above its definition
|
||||||
|
|
||||||
warning: cannot find macro `in_mod_escape` in module `macros_escape`
|
warning: cannot find macro `in_mod_escape` in the current scope when looking from module `macros_escape`
|
||||||
--> $DIR/key-value-expansion-scope.rs:39:14
|
--> $DIR/key-value-expansion-scope.rs:39:14
|
||||||
|
|
|
|
||||||
LL | #![doc = in_mod_escape!()]
|
LL | #![doc = in_mod_escape!()]
|
||||||
| ^^^^^^^^^^^^^ not found in module `macros_escape`
|
| ^^^^^^^^^^^^^ not found from module `macros_escape`
|
||||||
|
|
|
|
||||||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
= 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>
|
= note: for more information, see issue #124535 <https://github.com/rust-lang/rust/issues/124535>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue