False positive from cmp_owned? #7365
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
Lint name:
cmp_owned
I tried this code:
I expected to see this happen: nothing.
Instead, this happened:
First, it's weird that the comparison operator changes from
<
to==
. Second, the suggestion doesn't even work becauseOrderedFloat
doesn't implementOrd
withf32
itself. Third, sinceOrderedFloat
isCopy
clippy should probably not warn about creating an owned value of that type anyway.Meta
cargo clippy -V
: e.g. clippy 0.1.53 (53cb7b09 2021-06-17)rustc -Vv
:The text was updated successfully, but these errors were encountered: