Another let_and_return false positive #8114
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
There are already a few issues involving
let_and_return
false positives with E0597, but all of them are closed. I've found another case that still reproduces on Nightly (very similar to the one fixed by #5680).Lint Name
let_and_return
Reproducer
I tried this code:
The code runs correctly, printing
true
to the console. However, there is a single clippy lint reported:After applying the suggestion, the code no longer compiles. The following error is reported:
I expected to see this happen:
The original code should not suggest any clippy lints.
Version
Additional Labels
@rustbot label +I-suggestion-causes-error
The text was updated successfully, but these errors were encountered: