non_minimal_cfg suppression sometimes not effective #13007
Labels
C-bug
Category: Clippy is not doing the correct thing
I-false-positive
Issue: The lint was triggered on code it shouldn't have
Summary
Putting
#![allow(clippy::non_minimal_cfg)]
at the top of the module, or on the mod statement, sometimes doesn't work!Lint Name
non_minimal_cfg
To reproduce
Cargo toml
src/lib.rs
src/middle.rs
src/middle/inner.rs
empty.
Or from git:
Actual output
Expected output
No lint output.
Version
Notes
Moving the
#![allow()]
to an#[allow()]
onmod middle
doesn't help. Changing it to#[allow]
to apply only tomod inner
, makes the bug go away.Bizarrely, changing
mod inner;
tomod inner {}
makes the bug go away too!In my actual project I'm using
#![allow(clippy::complexity)]
at the crate top-level.The text was updated successfully, but these errors were encountered: