option_if_let_else
generates wrong suggestion for Result
s
#10335
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
The suggestions generated by the
option_if_let_else
lint for aResult
with an impure expression in theelse
branch does not compile.Reproducer
I tried this code:
Playground
I expected Clippy to suggest the following fix:
Instead, Clippy outputs this (notice the missing
_
in the arguments to the first closure):Version
Additional Labels
@rustbot label +I-suggestion-causes-error
The text was updated successfully, but these errors were encountered: