Closed
Description
It looks to me like the panic
lint doesn't catch panics with formatting. Although maybe this is intentional, I would expect it to treat panics with and without formatting the same way.
I tried this code:
#[deny(clippy::panic)]
pub fn main() {
panic!("{}", "This is a panic");
}
I expected to cargo clippy
to fail on this code, but it passes.
Meta
cargo clippy -V
: clippy 0.0.212 (bb37a0f 2020-06-16)rustc -Vv
:
rustc 1.44.1 (c7087fe00 2020-06-17)
binary: rustc
commit-hash: c7087fe00d2ba919df1d813c040a5d47e43b0fe7
commit-date: 2020-06-17
host: x86_64-apple-darwin
release: 1.44.1
LLVM version: 9.0