]> git.lizzy.rs Git - rust.git/blob - src/test/ui/array_const_index-1.rs
Rollup merge of #57132 - daxpedda:master, r=steveklabnik
[rust.git] / src / test / ui / array_const_index-1.rs
1 const A: [i32; 0] = [];
2 const B: i32 = A[1];
3 //~^ index out of bounds: the len is 0 but the index is 1
4 //~| ERROR any use of this value will cause an error
5
6 fn main() {
7     let _ = B;
8 }