]> git.lizzy.rs Git - rust.git/blob - tests/ui/match_on_vec_items.stderr
Auto merge of #68717 - petrochenkov:stabexpat, r=varkor
[rust.git] / tests / ui / match_on_vec_items.stderr
1 error: indexing into a vector may panic
2   --> $DIR/match_on_vec_items.rs:9: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 into a vector may panic
10   --> $DIR/match_on_vec_items.rs:16:11
11    |
12 LL |     match arr[range] {
13    |           ^^^^^^^^^^ help: try this: `arr.get(range)`
14
15 error: indexing into a vector may panic
16   --> $DIR/match_on_vec_items.rs:29:11
17    |
18 LL |     match arr[idx] {
19    |           ^^^^^^^^ help: try this: `arr.get(idx)`
20
21 error: indexing into a vector may panic
22   --> $DIR/match_on_vec_items.rs:36:11
23    |
24 LL |     match arr[range] {
25    |           ^^^^^^^^^^ help: try this: `arr.get(range)`
26
27 error: indexing into a vector may panic
28   --> $DIR/match_on_vec_items.rs:49:11
29    |
30 LL |     match arr[idx] {
31    |           ^^^^^^^^ help: try this: `arr.get(idx)`
32
33 error: indexing into a vector may panic
34   --> $DIR/match_on_vec_items.rs:56:11
35    |
36 LL |     match arr[range] {
37    |           ^^^^^^^^^^ help: try this: `arr.get(range)`
38
39 error: indexing into a vector may panic
40   --> $DIR/match_on_vec_items.rs:69:11
41    |
42 LL |     match arr[idx] {
43    |           ^^^^^^^^ help: try this: `arr.get(idx)`
44
45 error: indexing into a vector may panic
46   --> $DIR/match_on_vec_items.rs:76:11
47    |
48 LL |     match arr[range] {
49    |           ^^^^^^^^^^ help: try this: `arr.get(range)`
50
51 error: aborting due to 8 previous errors
52