about summary refs log tree commit diff
path: root/src/tools/clippy/tests/ui/iter_next_loop.stderr
blob: c076e86db93bb03c8a20f784ac920a77170bcc65 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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: 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:26:14
   |
LL |     for _ in dbg!([1, 2].iter()).next() {}
   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to 2 previous errors