collapsible_match
suggestion incomplete
#14155
Labels
C-bug
Category: Clippy is not doing the correct thing
I-suggestion-causes-error
Issue: The suggestions provided by this Lint cause an ICE/error when applied
Summary
I have the following code:
Clippy warns about this:
I tried doing what it suggested and got three compiler errors:
What I ended up needing to do was:
It feels a little weird to be putting referenced, static strings inside a
Some()
pattern match like that. Anyway, I wanted to alert to the fact that the Clippy suggestion isn't sufficient in this case. Should this be special-cased, or does this actually count as a False-Positive?Reproducer
I tried this code:
I expected to see this happen: No warning, I think? Not sure.
Instead, this happened: Warning
Version:
Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: