summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/iter_nth.stderr
blob: 162e6c3384941f6dfe7978f9b02b10f6ece3fdc0 (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
48
49
50
51
52
53
54
55
56
57
58
59
60
error: called `.iter().nth()` on a `Vec`
  --> $DIR/iter_nth.rs:34:23
   |
LL |         let bad_vec = some_vec.iter().nth(3);
   |                       ^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: calling `.get()` is both faster and more readable
   = note: `-D clippy::iter-nth` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::iter_nth)]`

error: called `.iter().nth()` on a slice
  --> $DIR/iter_nth.rs:35:26
   |
LL |         let bad_slice = &some_vec[..].iter().nth(3);
   |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: calling `.get()` is both faster and more readable

error: called `.iter().nth()` on a slice
  --> $DIR/iter_nth.rs:36:31
   |
LL |         let bad_boxed_slice = boxed_slice.iter().nth(3);
   |                               ^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: calling `.get()` is both faster and more readable

error: called `.iter().nth()` on a `VecDeque`
  --> $DIR/iter_nth.rs:37:29
   |
LL |         let bad_vec_deque = some_vec_deque.iter().nth(3);
   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: calling `.get()` is both faster and more readable

error: called `.iter_mut().nth()` on a `Vec`
  --> $DIR/iter_nth.rs:42:23
   |
LL |         let bad_vec = some_vec.iter_mut().nth(3);
   |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: calling `.get_mut()` is both faster and more readable

error: called `.iter_mut().nth()` on a slice
  --> $DIR/iter_nth.rs:45:26
   |
LL |         let bad_slice = &some_vec[..].iter_mut().nth(3);
   |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: calling `.get_mut()` is both faster and more readable

error: called `.iter_mut().nth()` on a `VecDeque`
  --> $DIR/iter_nth.rs:48:29
   |
LL |         let bad_vec_deque = some_vec_deque.iter_mut().nth(3);
   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: calling `.get_mut()` is both faster and more readable

error: aborting due to 7 previous errors