- Notifications
You must be signed in to change notification settings - Fork 14k
Open
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-bugCategory: This is a bug.Category: This is a bug.L-dead_codeLint: dead_codeLint: dead_codeL-unused_importsLint: unused_importsLint: unused_importsT-clippyRelevant to the Clippy team.Relevant to the Clippy team.
Description
running cargo clippy -- -Dwarnings -Fdead_code in my binary produces two errors and no warnings. both errors are coming from clap.
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) however, running cargo clippy -- -Dwarnings -Funused produces 1158 warnings and no errors. and example of one of the warnings is
warning: allow(unused_imports) incompatible with previous forbid | | info!("a log message"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ overruled by previous forbid | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #81670 <https://github.com/rust-lang/rust/issues/81670> = note: `forbid` lint level was set on command line = note: this warning originates in the macro `$crate::valueset` which comes from the expansion of the macro `info` (in Nightly builds, run with -Z macro-backtrace for more info) - i thought since
dead_codeis a subset of theunusedlint group that if-Fdead_codeproduced errors that-Funusedshould produce at least the same number of errors. - why is that a warning? shouldn't
warning: allow(unused_imports) incompatible with previous forbidbe an error since i added a forbid?
Metadata
Metadata
Assignees
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-bugCategory: This is a bug.Category: This is a bug.L-dead_codeLint: dead_codeLint: dead_codeL-unused_importsLint: unused_importsLint: unused_importsT-clippyRelevant to the Clippy team.Relevant to the Clippy team.