Bad order-of-operations for clippy::if_then_panic 's code suggestion #7759
Labels
C-bug
Category: Clippy is not doing the correct thing
good-first-issue
These issues are a good way to get started with Clippy
I-suggestion-causes-error
Issue: The suggestions provided by this Lint cause an ICE/error when applied
I tried this code:
I expected to see this happen: Clippy should warn about "only a
panic!
in anif
-then statement`, and suggest an alternative like:Instead, this happened: Clippy warned and suggested the following alternative. Notice the lack of parenthesis:
Meta
Rust version (
rustc -Vv
):@rustbot label +I-suggestion-causes-error
The text was updated successfully, but these errors were encountered: