rust-clippy/tests/ui/iter_next_slice.stderr

30 lines
984 B
Text
Raw Normal View History

error: using `.iter().next()` on an array
2024-02-17 12:16:29 +00:00
--> tests/ui/iter_next_slice.rs:9:13
|
LL | let _ = s.iter().next();
| ^^^^^^^^^^^^^^^ help: try calling: `s.first()`
|
= note: `-D clippy::iter-next-slice` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::iter_next_slice)]`
error: using `.iter().next()` on a Slice without end index
2024-02-17 12:16:29 +00:00
--> tests/ui/iter_next_slice.rs:12:13
|
LL | let _ = s[2..].iter().next();
| ^^^^^^^^^^^^^^^^^^^^ help: try calling: `s.get(2)`
error: using `.iter().next()` on a Slice without end index
2024-02-17 12:16:29 +00:00
--> tests/ui/iter_next_slice.rs:15:13
|
LL | let _ = v[5..].iter().next();
| ^^^^^^^^^^^^^^^^^^^^ help: try calling: `v.get(5)`
error: using `.iter().next()` on an array
2024-02-17 12:16:29 +00:00
--> tests/ui/iter_next_slice.rs:18:13
|
LL | let _ = v.iter().next();
| ^^^^^^^^^^^^^^^ help: try calling: `v.first()`
error: aborting due to 4 previous errors