]> git.lizzy.rs Git - rust.git/blob - tests/ui/iter_nth_zero.stderr
iterate List by value
[rust.git] / tests / ui / iter_nth_zero.stderr
1 error: called `.nth(0)` on a `std::iter::Iterator`
2   --> $DIR/iter_nth_zero.rs:20:14
3    |
4 LL |     let _x = s.iter().nth(0);
5    |              ^^^^^^^^^^^^^^^ help: try calling: `s.iter().next()`
6    |
7    = note: `-D clippy::iter-nth-zero` implied by `-D warnings`
8
9 error: called `.nth(0)` on a `std::iter::Iterator`
10   --> $DIR/iter_nth_zero.rs:25:14
11    |
12 LL |     let _y = iter.nth(0);
13    |              ^^^^^^^^^^^ help: try calling: `iter.next()`
14
15 error: called `.nth(0)` on a `std::iter::Iterator`
16   --> $DIR/iter_nth_zero.rs:30:22
17    |
18 LL |     let _unwrapped = iter2.nth(0).unwrap();
19    |                      ^^^^^^^^^^^^ help: try calling: `iter2.next()`
20
21 error: aborting due to 3 previous errors
22