]> git.lizzy.rs Git - rust.git/blob - tests/ui/iter_skip_next.stderr
Auto merge of #4478 - tsurai:master, r=flip1995
[rust.git] / tests / ui / iter_skip_next.stderr
1 error: called `skip(x).next()` on an iterator. This is more succinctly expressed by calling `nth(x)`
2   --> $DIR/iter_skip_next.rs:13:13
3    |
4 LL |     let _ = some_vec.iter().skip(42).next();
5    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6    |
7    = note: `-D clippy::iter-skip-next` implied by `-D warnings`
8
9 error: called `skip(x).next()` on an iterator. This is more succinctly expressed by calling `nth(x)`
10   --> $DIR/iter_skip_next.rs:14:13
11    |
12 LL |     let _ = some_vec.iter().cycle().skip(42).next();
13    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
14
15 error: called `skip(x).next()` on an iterator. This is more succinctly expressed by calling `nth(x)`
16   --> $DIR/iter_skip_next.rs:15:13
17    |
18 LL |     let _ = (1..10).skip(10).next();
19    |             ^^^^^^^^^^^^^^^^^^^^^^^
20
21 error: called `skip(x).next()` on an iterator. This is more succinctly expressed by calling `nth(x)`
22   --> $DIR/iter_skip_next.rs:16:14
23    |
24 LL |     let _ = &some_vec[..].iter().skip(3).next();
25    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
26
27 error: aborting due to 4 previous errors
28