if_not_else
lints firing on else-if
s
#7892
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-false-positive
Issue: The lint was triggered on code it shouldn't have
Lint name:
if_not_else
I tried this code:
I expected to see this happen: nothing
Instead, this happened: clippy suggests swapping the order of
else-if
andelse
block, which makes it less clear imo. There are scenarios where using not inelse-if
s makes it more readable like the one above - you would expect it to be written in order of priority/preference. (tryfoo()
, then trybar()
, else do nothing)Meta
Rust version (
rustc -Vv
):See #7877 (comment)
The text was updated successfully, but these errors were encountered: