@@ -9,18 +9,6 @@ LL | const REF: &i32 = &ARR[idx()]; // This should be linted, since `suppress-re
9
9
= note: `-D clippy::indexing-slicing` implied by `-D warnings`
10
10
= help: to override `-D warnings` add `#[allow(clippy::indexing_slicing)]`
11
11
12
- error[E0080]: evaluation of `main::{constant#3}` failed
13
- --> tests/ui/indexing_slicing_index.rs:69:14
14
- |
15
- LL | const { &ARR[idx4()] };
16
- | ^^^^^^^^^^^ index out of bounds: the length is 2 but the index is 4
17
-
18
- note: erroneous constant encountered
19
- --> tests/ui/indexing_slicing_index.rs:69:5
20
- |
21
- LL | const { &ARR[idx4()] };
22
- | ^^^^^^^^^^^^^^^^^^^^^^
23
-
24
12
error: indexing may panic
25
13
--> tests/ui/indexing_slicing_index.rs:48:5
26
14
|
@@ -63,63 +51,62 @@ LL | const { &ARR[idx4()] };
63
51
= note: the suggestion might not be applicable in constant blocks
64
52
65
53
error: index is out of bounds
66
- --> tests/ui/indexing_slicing_index.rs:77 :5
54
+ --> tests/ui/indexing_slicing_index.rs:76 :5
67
55
|
68
56
LL | y[4];
69
57
| ^^^^
70
58
71
59
error: indexing may panic
72
- --> tests/ui/indexing_slicing_index.rs:81 :5
60
+ --> tests/ui/indexing_slicing_index.rs:80 :5
73
61
|
74
62
LL | v[0];
75
63
| ^^^^
76
64
|
77
65
= help: consider using `.get(n)` or `.get_mut(n)` instead
78
66
79
67
error: indexing may panic
80
- --> tests/ui/indexing_slicing_index.rs:83 :5
68
+ --> tests/ui/indexing_slicing_index.rs:82 :5
81
69
|
82
70
LL | v[10];
83
71
| ^^^^^
84
72
|
85
73
= help: consider using `.get(n)` or `.get_mut(n)` instead
86
74
87
75
error: indexing may panic
88
- --> tests/ui/indexing_slicing_index.rs:85 :5
76
+ --> tests/ui/indexing_slicing_index.rs:84 :5
89
77
|
90
78
LL | v[1 << 3];
91
79
| ^^^^^^^^^
92
80
|
93
81
= help: consider using `.get(n)` or `.get_mut(n)` instead
94
82
95
83
error: index is out of bounds
96
- --> tests/ui/indexing_slicing_index.rs:93 :5
84
+ --> tests/ui/indexing_slicing_index.rs:92 :5
97
85
|
98
86
LL | x[N];
99
87
| ^^^^
100
88
101
89
error: indexing may panic
102
- --> tests/ui/indexing_slicing_index.rs:97 :5
90
+ --> tests/ui/indexing_slicing_index.rs:96 :5
103
91
|
104
92
LL | v[N];
105
93
| ^^^^
106
94
|
107
95
= help: consider using `.get(n)` or `.get_mut(n)` instead
108
96
109
97
error: indexing may panic
110
- --> tests/ui/indexing_slicing_index.rs:99 :5
98
+ --> tests/ui/indexing_slicing_index.rs:98 :5
111
99
|
112
100
LL | v[M];
113
101
| ^^^^
114
102
|
115
103
= help: consider using `.get(n)` or `.get_mut(n)` instead
116
104
117
105
error: index is out of bounds
118
- --> tests/ui/indexing_slicing_index.rs:103 :13
106
+ --> tests/ui/indexing_slicing_index.rs:102 :13
119
107
|
120
108
LL | let _ = x[4];
121
109
| ^^^^
122
110
123
- error: aborting due to 15 previous errors
111
+ error: aborting due to 14 previous errors
124
112
125
- For more information about this error, try `rustc --explain E0080`.
0 commit comments