manual_let_else
produces a wrong suggestion with or-patterns
#9938
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
Uh oh!
There was an error while loading. Please reload this page.
Summary
When using an or-pattern with two different variants,
manual_let_else
will not wrap them in parentheses, which are needed for the pattern to be valid in that context.Reproducer
I tried this code:
I expected to see this happen:
This is valid, producing no errors.
Instead, this happened:
Which produces the error:
Version
Additional Labels
@rustbot label +I-suggestion-causes-error
The text was updated successfully, but these errors were encountered: