Only suggest #[allow]
for --warn
and --deny
lint level flags
This commit is contained in:
parent
d3a393932e
commit
9289f5691b
8 changed files with 5 additions and 10 deletions
|
@ -228,9 +228,11 @@ pub fn explain_lint_level_source(
|
|||
err.note_once(format!(
|
||||
"`{flag} {hyphen_case_lint_name}` implied by `{flag} {hyphen_case_flag_val}`"
|
||||
));
|
||||
err.help_once(format!(
|
||||
"to override `{flag} {hyphen_case_flag_val}` add `#[allow({name})]`"
|
||||
));
|
||||
if matches!(orig_level, Level::Warn | Level::Deny) {
|
||||
err.help_once(format!(
|
||||
"to override `{flag} {hyphen_case_flag_val}` add `#[allow({name})]`"
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
LintLevelSource::Node { name: lint_attr_name, span, reason, .. } => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue