False positive in clippy::while_let_on_iterator
#6491
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
T-MIR
Type: This lint will require working with the MIR
I tried this code: (simplified, the original made more sense)
I expected to see this happen: this passes
cargo clippy
just fine.Instead, this happened: it suggests an invalid improvement:
This moves out of
it
, which isn't allowed because it's needed in the next loop iteration.Meta
cargo clippy -V
: clippy 0.0.212 (891e1a8 2020-04-18)rustc -Vv
:The text was updated successfully, but these errors were encountered: