rust-clippy/tests/ui/iter_next_loop.stderr

12 lines
422 B
Text
Raw Normal View History

2024-07-10 15:18:05 +00:00
error: you are iterating over `Iterator::next()` which is an Option; this will compile but is probably not what you want
2024-02-17 12:16:29 +00:00
--> tests/ui/iter_next_loop.rs:6:14
|
2024-07-10 15:18:05 +00:00
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