I tried this code: ```rust #![deny(unused_crate_dependencies)] #![feature(lint_reasons)] fn main() {} ``` `unused_crate_dependencies` is at top level, as expected. But I get the following warning: ``` warning: deny(unused_crate_dependencies) is ignored unless specified at crate level --> src/main.rs:1:9 | 1 | #![deny(unused_crate_dependencies)] | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(unused_attributes)]` on by default ``` Removing the `#[feature(lint_reason)]` removes the warning. Interestingly, adding a `#[deny(…)]` removes the warning too: ``` #![deny(unused_crate_dependencies)] #![deny(non_snake_case)] #![feature(lint_reasons)] fn main() {} ``` gives no warning. But only at certain positions: ``` #![deny(non_snake_case)] #![deny(unused_crate_dependencies)] #![feature(lint_reasons)] fn main() {} ``` gives the warning. ### Meta `rustc --version --verbose`: ``` rustc 1.71.0-nightly (ce5919fce 2023-05-15) binary: rustc commit-hash: ce5919fcef67103098219e1868f741e56fc90963 commit-date: 2023-05-15 host: x86_64-unknown-linux-gnu release: 1.71.0-nightly LLVM version: 16.0.2 ``` (But IIRC I had the warning already with `1.71.0-nightly (473f916d8 2023-05-03)`)