Skip to content

Commit 14d08e5

Browse files
committed
Rebase fallout
1 parent 8a74be6 commit 14d08e5

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

src/test/ui/const-eval/index_out_of_bounds.rs

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
static FOO: i32 = [][0];
1212
//~^ ERROR E0080
13+
//~| ERROR E0080
1314

1415
fn main() {
1516
let array = [std::env::args().len()];
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,25 @@
1-
error[E0080]: constant evaluation error
1+
error[E0080]: could not evaluate static initializer
22
--> $DIR/index_out_of_bounds.rs:11:19
33
|
44
LL | static FOO: i32 = [][0];
55
| ^^^^^ index out of bounds: the len is 0 but the index is 0
66

7+
error[E0080]: could not evaluate static initializer
8+
--> $DIR/index_out_of_bounds.rs:11:1
9+
|
10+
LL | static FOO: i32 = [][0];
11+
| ^^^^^^^^^^^^^^^^^^-----^
12+
| |
13+
| index out of bounds: the len is 0 but the index is 0
14+
715
error: index out of bounds: the len is 1 but the index is 1
8-
--> $DIR/index_out_of_bounds.rs:16:5
16+
--> $DIR/index_out_of_bounds.rs:17:5
917
|
1018
LL | array[1]; //~ ERROR index out of bounds
1119
| ^^^^^^^^
1220
|
1321
= note: #[deny(const_err)] on by default
1422

15-
error: aborting due to 2 previous errors
23+
error: aborting due to 3 previous errors
1624

1725
For more information about this error, try `rustc --explain E0080`.

0 commit comments

Comments
 (0)