]> git.lizzy.rs Git - rust.git/blob - tests/ui/iter_skip_next.stderr
iterate List by value
[rust.git] / tests / ui / iter_skip_next.stderr
1 error: called `skip(x).next()` on an iterator
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    = help: this is more succinctly expressed by calling `nth(x)`
9
10 error: called `skip(x).next()` on an iterator
11   --> $DIR/iter_skip_next.rs:14:13
12    |
13 LL |     let _ = some_vec.iter().cycle().skip(42).next();
14    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15    |
16    = help: this is more succinctly expressed by calling `nth(x)`
17
18 error: called `skip(x).next()` on an iterator
19   --> $DIR/iter_skip_next.rs:15:13
20    |
21 LL |     let _ = (1..10).skip(10).next();
22    |             ^^^^^^^^^^^^^^^^^^^^^^^
23    |
24    = help: this is more succinctly expressed by calling `nth(x)`
25
26 error: called `skip(x).next()` on an iterator
27   --> $DIR/iter_skip_next.rs:16:14
28    |
29 LL |     let _ = &some_vec[..].iter().skip(3).next();
30    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
31    |
32    = help: this is more succinctly expressed by calling `nth(x)`
33
34 error: aborting due to 4 previous errors
35