]> git.proxmox.com Git - rustc.git/blame - src/test/ui/array-slice-vec/array_const_index-1.rs
New upstream version 1.67.1+dfsg1
[rustc.git] / src / test / ui / array-slice-vec / array_const_index-1.rs
CommitLineData
5869c6ff
XL
1const A: [i32; 0] = [];
2const B: i32 = A[1];
3//~^ index out of bounds: the length is 0 but the index is 1
2b03887a 4//~| ERROR evaluation of constant value failed
223e47cc 5
92a42be0 6fn main() {
5869c6ff 7 let _ = B;
92a42be0 8}