diff options
Diffstat (limited to 'tests/ui/consts/const-array-oob.rs')
| -rw-r--r-- | tests/ui/consts/const-array-oob.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/ui/consts/const-array-oob.rs b/tests/ui/consts/const-array-oob.rs index 4b457d1c23c..dc713b74d7f 100644 --- a/tests/ui/consts/const-array-oob.rs +++ b/tests/ui/consts/const-array-oob.rs @@ -1,11 +1,9 @@ const FOO: [usize; 3] = [1, 2, 3]; const BAR: usize = FOO[5]; -//~^ ERROR: evaluation of constant value failed -//~| NOTE index out of bounds: the length is 3 but the index is 5 +//~^ ERROR: index out of bounds: the length is 3 but the index is 5 const BLUB: [u32; FOO[4]] = [5, 6]; -//~^ ERROR evaluation of constant value failed [E0080] -//~| NOTE index out of bounds: the length is 3 but the index is 4 +//~^ ERROR index out of bounds: the length is 3 but the index is 4 fn main() { let _ = BAR; |
