]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/iter_nth.stderr
Add 'src/tools/clippy/' from commit 'd2708873ef711ec8ab45df1e984ecf24a96cd369'
[rust.git] / src / tools / clippy / tests / ui / iter_nth.stderr
1 error: called `.iter().nth()` on a Vec
2   --> $DIR/iter_nth.rs:33:23
3    |
4 LL |         let bad_vec = some_vec.iter().nth(3);
5    |                       ^^^^^^^^^^^^^^^^^^^^^^
6    |
7    = note: `-D clippy::iter-nth` implied by `-D warnings`
8    = help: calling `.get()` is both faster and more readable
9
10 error: called `.iter().nth()` on a slice
11   --> $DIR/iter_nth.rs:34:26
12    |
13 LL |         let bad_slice = &some_vec[..].iter().nth(3);
14    |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^
15    |
16    = help: calling `.get()` is both faster and more readable
17
18 error: called `.iter().nth()` on a slice
19   --> $DIR/iter_nth.rs:35:31
20    |
21 LL |         let bad_boxed_slice = boxed_slice.iter().nth(3);
22    |                               ^^^^^^^^^^^^^^^^^^^^^^^^^
23    |
24    = help: calling `.get()` is both faster and more readable
25
26 error: called `.iter().nth()` on a VecDeque
27   --> $DIR/iter_nth.rs:36:29
28    |
29 LL |         let bad_vec_deque = some_vec_deque.iter().nth(3);
30    |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
31    |
32    = help: calling `.get()` is both faster and more readable
33
34 error: called `.iter_mut().nth()` on a Vec
35   --> $DIR/iter_nth.rs:41:23
36    |
37 LL |         let bad_vec = some_vec.iter_mut().nth(3);
38    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^
39    |
40    = help: calling `.get_mut()` is both faster and more readable
41
42 error: called `.iter_mut().nth()` on a slice
43   --> $DIR/iter_nth.rs:44:26
44    |
45 LL |         let bad_slice = &some_vec[..].iter_mut().nth(3);
46    |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
47    |
48    = help: calling `.get_mut()` is both faster and more readable
49
50 error: called `.iter_mut().nth()` on a VecDeque
51   --> $DIR/iter_nth.rs:47:29
52    |
53 LL |         let bad_vec_deque = some_vec_deque.iter_mut().nth(3);
54    |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
55    |
56    = help: calling `.get_mut()` is both faster and more readable
57
58 error: aborting due to 7 previous errors
59