]> git.lizzy.rs Git - rust.git/blob - tests/ui/iter_nth.stderr
Auto merge of #4478 - tsurai:master, r=flip1995
[rust.git] / tests / ui / iter_nth.stderr
1 error: called `.iter().nth()` on a Vec. Calling `.get()` is both faster and more readable
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
9 error: called `.iter().nth()` on a slice. Calling `.get()` is both faster and more readable
10   --> $DIR/iter_nth.rs:34:26
11    |
12 LL |         let bad_slice = &some_vec[..].iter().nth(3);
13    |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^
14
15 error: called `.iter().nth()` on a slice. Calling `.get()` is both faster and more readable
16   --> $DIR/iter_nth.rs:35:31
17    |
18 LL |         let bad_boxed_slice = boxed_slice.iter().nth(3);
19    |                               ^^^^^^^^^^^^^^^^^^^^^^^^^
20
21 error: called `.iter().nth()` on a VecDeque. Calling `.get()` is both faster and more readable
22   --> $DIR/iter_nth.rs:36:29
23    |
24 LL |         let bad_vec_deque = some_vec_deque.iter().nth(3);
25    |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
26
27 error: called `.iter_mut().nth()` on a Vec. Calling `.get_mut()` is both faster and more readable
28   --> $DIR/iter_nth.rs:41:23
29    |
30 LL |         let bad_vec = some_vec.iter_mut().nth(3);
31    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^
32
33 error: called `.iter_mut().nth()` on a slice. Calling `.get_mut()` is both faster and more readable
34   --> $DIR/iter_nth.rs:44:26
35    |
36 LL |         let bad_slice = &some_vec[..].iter_mut().nth(3);
37    |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
38
39 error: called `.iter_mut().nth()` on a VecDeque. Calling `.get_mut()` is both faster and more readable
40   --> $DIR/iter_nth.rs:47:29
41    |
42 LL |         let bad_vec_deque = some_vec_deque.iter_mut().nth(3);
43    |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
44
45 error: aborting due to 7 previous errors
46