1
Fork 0

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:
Oli Scherer 2024-02-14 11:53:42 +01:00 committed by GitHub
commit 9e31121985
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 6 additions and 53 deletions

View file

@ -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));