3 const FOO: &'static[u32] = &[1, 2, 3];
4 const BAR: u32 = FOO[5];
5 //~^ index out of bounds: the length is 3 but the index is 5
6 //~| ERROR any use of this value will cause an error
7 //~| WARN this was previously accepted by the compiler but is being phased out