rust-lang / rust

Empowering everyone to build reliable and efficient software.
https://www.rust-lang.org
Other
95.11k stars 12.27k forks source link

cannot forbid `dead_code` since lint triggers for third party macros #126028

Open andrewbanchich opened 1 month ago

andrewbanchich commented 1 month ago

if i, for example, forbid dead_code, clippy produces

error[E0453]: allow(dead_code) incompatible with previous forbid
  |
  | #[derive(Parser, Debug, Clone)]
  |          ^^^^^^ overruled by previous forbid
  |
  = note: `forbid` lint level was set on command line
  = note: this error originates in the derive macro `Parser` (in Nightly builds, run with -Z macro-backtrace for more info)

this is coming from clap's Parser derive macro, which i have no control over, so prevents me from forbidding dead_code in my own crate.

veera-sivarajan commented 1 month ago

@rustbot label -needs-triage +A-clippy +L-dead_code +A-lint