if_then_panic
doesn't fire when edition is 2021
#7723
Labels
C-bug
Category: Clippy is not doing the correct thing
I-false-negative
Issue: The lint should have been triggered on code, but wasn't
Lint name: if_then_panic
I tried this code:
src/main.rs
Cargo.toml
I expected to see this happen: The lint to be triggered
Instead, this happened: Nothing. It's a false negative.
Meta
Rust version (
rustc -Vv
):Comments
I think the problem is that rustc produces different HIR for
panic!
in the 2021 edition andclippy_utils::higher
doesn't handle it. It's possible that other lints will have similar problems.The text was updated successfully, but these errors were encountered: