]> git.proxmox.com Git - rustc.git/blame - src/test/ui/array-slice-vec/array_const_index-0.rs
New upstream version 1.66.0+dfsg1
[rustc.git] / src / test / ui / array-slice-vec / array_const_index-0.rs
CommitLineData
a7813a04
XL
1const A: &'static [i32] = &[];
2const B: i32 = (&A)[1];
1b1a35ee 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
SL
6fn main() {
7 let _ = B;
8}