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