collapsible_match suggestion does not compile #9647
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-suggestion-causes-error
Issue: The suggestions provided by this Lint cause an ICE/error when applied
Summary
collapisble_match warning gives an incorrect suggestion for code that cannot compile. Even with some tweaks, I haven't been able to compress the statement.
I suspect the syn crate may be doing something interesting, but I haven't investigated it deeply.
Lint Name
collapsible_match
Reproducer
I tried this code:
I saw this happen:
I changed the code to the suggestion:
This happened:
Version
Additional Labels
@rustbot label +l-suggestion-causes-error
The text was updated successfully, but these errors were encountered: