x if x == <float literal>
is marked as "redundant guard"
#11304
Labels
C-bug
Category: Clippy is not doing the correct thing
I-false-positive
Issue: The lint was triggered on code it shouldn't have
Summary
In spite of rustc considering floating point literals a deprecated match pattern, clippy emits a "redundant guard" warning for
x if x == <float literal>
and instead suggests replacing that with the literal itself.Lint Name
redundant_guards
Reproducer
I tried this code:
I saw this happen:
I expected to see this happen:
no warnings from clippy
Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: