Following cmp_owned hint leads to different behaviour #7769
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
I have code which uses different PartialEq implementations, which is arguably not the best design, but clippy complains about unnecessary allocations and its suggestion ends up using another PartialEq implementation.
Lint name: cmp_owned
I tried this code, before the suggestion it prints
Strict!
which is the derivedPartialEq
, after it printsOptimistic!
which is the more optimisticPartialEq
.Meta
Rust version (
rustc -Vv
):The text was updated successfully, but these errors were encountered: