Rollup merge of #121049 - estebank:issue-121009, r=fmease
Do not point at `#[allow(_)]` as the reason for compat lint triggering Fix #121009.
This commit is contained in:
commit
9e31121985
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