Skip to content

Commit e71ab56

Browse files
author
Oliver Schneider
committed
update tests to match error reporting
1 parent e4db677 commit e71ab56

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/test/compile-fail/array_const_index-0.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// except according to those terms.
1010

1111
static a: &'static [i32] = &[];
12-
static b: i32 = (&a)[1]; //~ ERROR: constant indexing failed: array index out of bounds
12+
static b: i32 = (&a)[1]; //~ ERROR: array index out of bounds
13+
//~^ ERROR: constant indexing failed
1314

1415
fn main() {}

src/test/compile-fail/const-array-oob.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
// except according to those terms.
1010

1111
const FOO: [u32; 3] = [1, 2, 3];
12-
const BAR: u32 = FOO[5]; //~ ERROR constant indexing failed: array index out of bounds
12+
const BAR: u32 = FOO[5]; //~ ERROR array index out of bounds
13+
//~^ ERROR constant indexing failed
1314

1415
fn main() {
1516
let _ = BAR;

0 commit comments

Comments
 (0)