summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/match_on_vec_items.stderr
blob: 140a458cb9a4c6f0c54598fbfe8c69e38f7b2961 (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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
error: indexing into a vector may panic
  --> $DIR/match_on_vec_items.rs:10:11
   |
LL |     match arr[idx] {
   |           ^^^^^^^^ help: try: `arr.get(idx)`
   |
   = note: `-D clippy::match-on-vec-items` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::match_on_vec_items)]`

error: indexing into a vector may panic
  --> $DIR/match_on_vec_items.rs:19:11
   |
LL |     match arr[range] {
   |           ^^^^^^^^^^ help: try: `arr.get(range)`

error: indexing into a vector may panic
  --> $DIR/match_on_vec_items.rs:33:11
   |
LL |     match arr[idx] {
   |           ^^^^^^^^ help: try: `arr.get(idx)`

error: indexing into a vector may panic
  --> $DIR/match_on_vec_items.rs:41:11
   |
LL |     match arr[range] {
   |           ^^^^^^^^^^ help: try: `arr.get(range)`

error: indexing into a vector may panic
  --> $DIR/match_on_vec_items.rs:55:11
   |
LL |     match arr[idx] {
   |           ^^^^^^^^ help: try: `arr.get(idx)`

error: indexing into a vector may panic
  --> $DIR/match_on_vec_items.rs:63:11
   |
LL |     match arr[range] {
   |           ^^^^^^^^^^ help: try: `arr.get(range)`

error: indexing into a vector may panic
  --> $DIR/match_on_vec_items.rs:77:11
   |
LL |     match arr[idx] {
   |           ^^^^^^^^ help: try: `arr.get(idx)`

error: indexing into a vector may panic
  --> $DIR/match_on_vec_items.rs:85:11
   |
LL |     match arr[range] {
   |           ^^^^^^^^^^ help: try: `arr.get(range)`

error: aborting due to 8 previous errors