manual_unwrap_or_default
generates invalid code for nested pattern match
#13161
Labels
C-bug
Category: Clippy is not doing the correct thing
Summary
clippy fails to understand nested pattern matches. It treats
if let Some(Some(a))
the same asif let Some(a)
, resulting in invalid code when--fix
-ing.Reproducer
I tried this code:
I expected to see this happen:
Nothing, really.
Instead, this happened:
Version
No response
Additional Labels
No response
The text was updated successfully, but these errors were encountered: