mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-30 08:30:45 +00:00
11 lines
422 B
Text
11 lines
422 B
Text
error: you are iterating over `Iterator::next()` which is an Option; this will compile but is probably not what you want
|
|
--> tests/ui/iter_next_loop.rs:6:14
|
|
|
|
|
LL | for _ in x.iter().next() {}
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
|
= note: `-D clippy::iter-next-loop` implied by `-D warnings`
|
|
= help: to override `-D warnings` add `#[allow(clippy::iter_next_loop)]`
|
|
|
|
error: aborting due to 1 previous error
|
|
|