All lints in types don't work if types are in const or static.
I tried this code:
#![allow(unused)]
#![deny(clippy::option_option, clippy::vec_box)]
const C1: Option<Option<i32>> = None;
const C2: Vec<Box<i32>> = Vec::new();
I expected to see this happen: option_option and vec_box should be triggered.
Instead, this happened: Nothing.
Meta
cargo clippy -V: clippy 0.1.52 (f5d8117 2021-03-16)
rustc -Vv:
rustc 1.52.0-nightly (f5d8117c3 2021-03-16)
binary: rustc
commit-hash: f5d8117c338a788bd24abec733fd143dfceb25a0
commit-date: 2021-03-16
host: x86_64-unknown-linux-gnu
release: 1.52.0-nightly
LLVM version: 12.0.0
All lints in
typesdon't work if types are inconstorstatic.I tried this code:
I expected to see this happen:
option_optionandvec_boxshould be triggered.Instead, this happened: Nothing.
Meta
cargo clippy -V: clippy 0.1.52 (f5d8117 2021-03-16)rustc -Vv: