Do not point at #[allow(_)]
as the reason for compat lint triggering
Fix #121009.
This commit is contained in:
parent
eaff1af8fd
commit
24b52fd9df
8 changed files with 6 additions and 53 deletions
|
@ -207,6 +207,11 @@ pub fn explain_lint_level_source(
|
|||
err: &mut Diagnostic,
|
||||
) {
|
||||
let name = lint.name_lower();
|
||||
if let Level::Allow = level {
|
||||
// Do not point at `#[allow(compat_lint)]` as the reason for a compatibility lint
|
||||
// triggering. (#121009)
|
||||
return;
|
||||
}
|
||||
match src {
|
||||
LintLevelSource::Default => {
|
||||
err.note_once(format!("`#[{}({})]` on by default", level.as_str(), name));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue