while_let_on_iterator
suggestion doesn't compile
#7510
Labels
C-bug
Category: Clippy is not doing the correct thing
while_let_on_iterator
suggestion doesn't compile
#7510
I tried this code:
I expected to see this happen: Clippy suggests code that compiles:
Instead, this happened: Clippy's suggestion doesn't compile.
(
for _ in self {}
doesn't compile either because it movesself
, and it's used again afterwards.)Meta
cargo clippy -V
: clippy 0.1.54 (a178d03 2021-07-26)rustc -Vv
:rustc 1.54.0 (a178d0322 2021-07-26)
binary: rustc
commit-hash: a178d0322ce20e33eac124758e837cbd80a6f633
commit-date: 2021-07-26
host: x86_64-unknown-linux-gnu
release: 1.54.0
LLVM version: 12.0.1
The text was updated successfully, but these errors were encountered: