rust-clippy/tests/ui/iter_nth.stderr

60 lines
1.9 KiB
Text
Raw Normal View History

2020-01-24 08:04:46 +00:00
error: called `.iter().nth()` on a Vec
--> $DIR/iter_nth.rs:33:23
|
LL | let bad_vec = some_vec.iter().nth(3);
| ^^^^^^^^^^^^^^^^^^^^^^
|
2020-01-25 22:01:16 +00:00
= help: calling `.get()` is both faster and more readable
2022-09-22 16:04:22 +00:00
= note: `-D clippy::iter-nth` implied by `-D warnings`
2020-01-24 08:04:46 +00:00
error: called `.iter().nth()` on a slice
--> $DIR/iter_nth.rs:34:26
|
LL | let bad_slice = &some_vec[..].iter().nth(3);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
2020-01-24 08:04:46 +00:00
|
2020-01-25 22:01:16 +00:00
= help: calling `.get()` is both faster and more readable
2020-01-24 08:04:46 +00:00
error: called `.iter().nth()` on a slice
--> $DIR/iter_nth.rs:35:31
|
LL | let bad_boxed_slice = boxed_slice.iter().nth(3);
| ^^^^^^^^^^^^^^^^^^^^^^^^^
2020-01-24 08:04:46 +00:00
|
2020-01-25 22:01:16 +00:00
= help: calling `.get()` is both faster and more readable
2020-01-24 08:04:46 +00:00
error: called `.iter().nth()` on a VecDeque
--> $DIR/iter_nth.rs:36:29
|
LL | let bad_vec_deque = some_vec_deque.iter().nth(3);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2020-01-24 08:04:46 +00:00
|
2020-01-25 22:01:16 +00:00
= help: calling `.get()` is both faster and more readable
2020-01-24 08:04:46 +00:00
error: called `.iter_mut().nth()` on a Vec
--> $DIR/iter_nth.rs:41:23
|
LL | let bad_vec = some_vec.iter_mut().nth(3);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
2020-01-24 08:04:46 +00:00
|
2020-01-25 22:01:16 +00:00
= help: calling `.get_mut()` is both faster and more readable
2020-01-24 08:04:46 +00:00
error: called `.iter_mut().nth()` on a slice
--> $DIR/iter_nth.rs:44:26
|
LL | let bad_slice = &some_vec[..].iter_mut().nth(3);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2020-01-24 08:04:46 +00:00
|
2020-01-25 22:01:16 +00:00
= help: calling `.get_mut()` is both faster and more readable
2020-01-24 08:04:46 +00:00
error: called `.iter_mut().nth()` on a VecDeque
--> $DIR/iter_nth.rs:47:29
|
LL | let bad_vec_deque = some_vec_deque.iter_mut().nth(3);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2020-01-24 08:04:46 +00:00
|
2020-01-25 22:01:16 +00:00
= help: calling `.get_mut()` is both faster and more readable
error: aborting due to 7 previous errors