single_match
gives bad suggestion
#7038
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
I-suggestion-causes-error
Issue: The suggestions provided by this Lint cause an ICE/error when applied
Clippy gave me a solution, that lead to compiler error
error[E0369]: binary operation
==cannot be applied to type 'T'
Went to discord for help and bunch of guys unanimously suggested to report this as a bug.
I wrote this simple example below as minimal way to create the same lint.
I tried this code:
This is the original lint to above example:
And the original error when you uncomment the suggested code
Meta
cargo clippy -V
: clippy 0.1.51 (2fd73fa 2021-03-23)rustc -Vv
:The text was updated successfully, but these errors were encountered: