summary refs log tree commit diff
path: root/src/tools/clippy/tests/ui/iter_next_slice.stderr
blob: bbf61df0cda68523debcdea9309072eeb61a73e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
error: Using `.iter().next()` on an array
  --> $DIR/iter_next_slice.rs:9:5
   |
LL |     s.iter().next();
   |     ^^^^^^^^^^^^^^^ help: try calling: `s.get(0)`
   |
   = note: `-D clippy::iter-next-slice` implied by `-D warnings`

error: Using `.iter().next()` on a Slice without end index.
  --> $DIR/iter_next_slice.rs:12:5
   |
LL |     s[2..].iter().next();
   |     ^^^^^^^^^^^^^^^^^^^^ help: try calling: `s.get(2)`

error: Using `.iter().next()` on a Slice without end index.
  --> $DIR/iter_next_slice.rs:15:5
   |
LL |     v[5..].iter().next();
   |     ^^^^^^^^^^^^^^^^^^^^ help: try calling: `v.get(5)`

error: Using `.iter().next()` on an array
  --> $DIR/iter_next_slice.rs:18:5
   |
LL |     v.iter().next();
   |     ^^^^^^^^^^^^^^^ help: try calling: `v.get(0)`

error: aborting due to 4 previous errors