]> git.lizzy.rs Git - rust.git/blob - src/test/ui/array_const_index-0.rs
Auto merge of #62748 - luca-barbieri:optimize-refcell-borrow, r=RalfJung
[rust.git] / src / test / ui / array_const_index-0.rs
1 const A: &'static [i32] = &[];
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 }