mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-15 10:07:30 +00:00
29 lines
1006 B
Plaintext
29 lines
1006 B
Plaintext
error: called `skip(x).next()` on an iterator
|
|
--> $DIR/iter_skip_next.rs:15: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`
|
|
|
|
error: called `skip(x).next()` on an iterator
|
|
--> $DIR/iter_skip_next.rs:16:36
|
|
|
|
|
LL | let _ = some_vec.iter().cycle().skip(42).next();
|
|
| ^^^^^^^^^^^^^^^^ help: use `nth` instead: `.nth(42)`
|
|
|
|
error: called `skip(x).next()` on an iterator
|
|
--> $DIR/iter_skip_next.rs:17:20
|
|
|
|
|
LL | let _ = (1..10).skip(10).next();
|
|
| ^^^^^^^^^^^^^^^^ help: use `nth` instead: `.nth(10)`
|
|
|
|
error: called `skip(x).next()` on an iterator
|
|
--> $DIR/iter_skip_next.rs:18:33
|
|
|
|
|
LL | let _ = &some_vec[..].iter().skip(3).next();
|
|
| ^^^^^^^^^^^^^^^ help: use `nth` instead: `.nth(3)`
|
|
|
|
error: aborting due to 4 previous errors
|
|
|