float_cmp
could catch float literals in match
expressions
#11555
Labels
C-enhancement
Category: Enhancement of lints, like adding more cases or adding help messages
Summary
rust-lang/rust#116098 removes the
illegal_floating_point_literal_pattern
lint. A float literal in amatch
expression is semantically equivalent to==
and, if this is merged, I think it makes sense to suggest a guard.If this lint is kept, this should be closed
Lint Name
float_cmp
Reproducer
I tried this code:
I expected to see this happen:
Clippy suggests:
Instead, this happened: No warning (from clippy)
Version
The text was updated successfully, but these errors were encountered: