cargo new x && cd x
echo 'pub fn f() { println!("{}", *&10) }' > src/lib.rs
cargo clippy # show the warning deref_addrof
cargo clippy # do not show the warning
I would expect that the warnings to be shown again... If this is a feature, I think something must be write in the docs.
Note that adding a binary and running cargo clippy again does not show the warning in lib:
echo 'fn main() { println!("{}", *&10) }' > src/main.rs
cargo clippy # show one warning in main.rs but not in lib.rs
I would expect that the warnings to be shown again... If this is a feature, I think something must be write in the docs.
Note that adding a binary and running
cargo clippyagain does not show the warning in lib: