summary refs log tree commit diff
path: root/src/tools/clippy/tests/ui/iter_skip_next.stderr
blob: 5709f3355298bb396337aa7a259dc6040c3d5da4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
error: called `skip(x).next()` on an iterator
  --> $DIR/iter_skip_next.rs:13:13
   |
LL |     let _ = some_vec.iter().skip(42).next();
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: `-D clippy::iter-skip-next` implied by `-D warnings`
   = help: this is more succinctly expressed by calling `nth(x)`

error: called `skip(x).next()` on an iterator
  --> $DIR/iter_skip_next.rs:14:13
   |
LL |     let _ = some_vec.iter().cycle().skip(42).next();
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: this is more succinctly expressed by calling `nth(x)`

error: called `skip(x).next()` on an iterator
  --> $DIR/iter_skip_next.rs:15:13
   |
LL |     let _ = (1..10).skip(10).next();
   |             ^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: this is more succinctly expressed by calling `nth(x)`

error: called `skip(x).next()` on an iterator
  --> $DIR/iter_skip_next.rs:16:14
   |
LL |     let _ = &some_vec[..].iter().skip(3).next();
   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: this is more succinctly expressed by calling `nth(x)`

error: aborting due to 4 previous errors