summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/iter_skip_next.stderr
blob: 39b173e7586931258c1f43501cc8841bad7ad220 (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
36
37
38
39
40
41
42
43
44
45
46
47
error: called `skip(..).next()` on an iterator
  --> $DIR/iter_skip_next.rs:17:28
   |
LL |     let _ = some_vec.iter().skip(42).next();
   |                            ^^^^^^^^^^^^^^^^ help: use `nth` instead: `.nth(42)`
   |
   = note: `-D clippy::iter-skip-next` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::iter_skip_next)]`

error: called `skip(..).next()` on an iterator
  --> $DIR/iter_skip_next.rs:18:36
   |
LL |     let _ = some_vec.iter().cycle().skip(42).next();
   |                                    ^^^^^^^^^^^^^^^^ help: use `nth` instead: `.nth(42)`

error: called `skip(..).next()` on an iterator
  --> $DIR/iter_skip_next.rs:19:20
   |
LL |     let _ = (1..10).skip(10).next();
   |                    ^^^^^^^^^^^^^^^^ help: use `nth` instead: `.nth(10)`

error: called `skip(..).next()` on an iterator
  --> $DIR/iter_skip_next.rs:20:33
   |
LL |     let _ = &some_vec[..].iter().skip(3).next();
   |                                 ^^^^^^^^^^^^^^^ help: use `nth` instead: `.nth(3)`

error: called `skip(..).next()` on an iterator
  --> $DIR/iter_skip_next.rs:28:26
   |
LL |     let _: Vec<&str> = sp.skip(1).next().unwrap().split(' ').collect();
   |                          ^^^^^^^^^^^^^^^ help: use `nth` instead: `.nth(1)`

error: called `skip(..).next()` on an iterator
  --> $DIR/iter_skip_next.rs:30:29
   |
LL |         let _: Vec<&str> = s.skip(1).next().unwrap().split(' ').collect();
   |                             ^^^^^^^^^^^^^^^ help: use `nth` instead: `.nth(1)`

error: called `skip(..).next()` on an iterator
  --> $DIR/iter_skip_next.rs:36:29
   |
LL |         let _: Vec<&str> = s.skip(1).next().unwrap().split(' ').collect();
   |                             ^^^^^^^^^^^^^^^ help: use `nth` instead: `.nth(1)`

error: aborting due to 7 previous errors