rust/compiler/rustc_lint
bors 139651428d Auto merge of #152452 - ShE3py:overruled-lint, r=BoxyUwU
feat: show what lint was overruled

We can't `#[allow]` a whole lint group if any of its members is forbidden, but the offending member is not currently shown if it was forbidden from the command line.

Before/after:
```diff
 $ rustc -F dead_code - <<< '#![allow(unused)]'
 error[E0453]: allow(unused) incompatible with previous forbid
  --> <anon>:1:10
   |
 1 | #![allow(unused)]
   |          ^^^^^^ overruled by previous forbid
   |
-  = note: `forbid` lint level was set on command line
+  = note: `forbid` lint level was set on command line (`-F dead_code`)
 
 error: aborting due to 1 previous error
```

@rustbot label +A-diagnostics +A-lints +D-terse
2026-02-15 20:05:05 +00:00
..
src Auto merge of #152452 - ShE3py:overruled-lint, r=BoxyUwU 2026-02-15 20:05:05 +00:00
Cargo.toml Convert to inline diagnostics in rustc_lint 2026-02-07 19:34:21 +01:00