]> git.lizzy.rs Git - rust.git/blob - tests/ui/match_on_vec_items.stderr
Renamed lint to `match_on_vec_items`
[rust.git] / tests / ui / match_on_vec_items.stderr
1 error: indexing vector may panic. Consider using `get`
2   --> $DIR/match_on_vec_items.rs:18:11
3    |
4 LL |     match arr[idx] {
5    |           ^^^^^^^^ help: try this: `arr.get(idx)`
6    |
7    = note: `-D clippy::match-on-vec-items` implied by `-D warnings`
8
9 error: indexing vector may panic. Consider using `get`
10   --> $DIR/match_on_vec_items.rs:25:11
11    |
12 LL |     match arr[range] {
13    |           ^^^^^^^^^^ help: try this: `arr.get(range)`
14
15 error: indexing vector may panic. Consider using `get`
16   --> $DIR/match_on_vec_items.rs:38:11
17    |
18 LL |     match arr[idx] {
19    |           ^^^^^^^^ help: try this: `arr.get(idx)`
20
21 error: indexing vector may panic. Consider using `get`
22   --> $DIR/match_on_vec_items.rs:45:11
23    |
24 LL |     match arr[range] {
25    |           ^^^^^^^^^^ help: try this: `arr.get(range)`
26
27 error: indexing vector may panic. Consider using `get`
28   --> $DIR/match_on_vec_items.rs:58:11
29    |
30 LL |     match arr[idx] {
31    |           ^^^^^^^^ help: try this: `arr.get(idx)`
32
33 error: indexing vector may panic. Consider using `get`
34   --> $DIR/match_on_vec_items.rs:65:11
35    |
36 LL |     match arr[range] {
37    |           ^^^^^^^^^^ help: try this: `arr.get(range)`
38
39 error: indexing vector may panic. Consider using `get`
40   --> $DIR/match_on_vec_items.rs:78:11
41    |
42 LL |     match arr[idx] {
43    |           ^^^^^^^^ help: try this: `arr.get(idx)`
44
45 error: indexing vector may panic. Consider using `get`
46   --> $DIR/match_on_vec_items.rs:85:11
47    |
48 LL |     match arr[range] {
49    |           ^^^^^^^^^^ help: try this: `arr.get(range)`
50
51 error: aborting due to 8 previous errors
52