2015-10-04 13:32:49 -07:00
|
|
|
const FOO: &'static[u32] = &[1, 2, 3];
|
2016-05-26 22:09:48 +03:00
|
|
|
const BAR: u32 = FOO[5];
|
2020-09-15 20:34:50 +01:00
|
|
|
//~^ index out of bounds: the length is 3 but the index is 5
|
2022-09-21 13:05:20 +02:00
|
|
|
//~| ERROR evaluation of constant value failed
|
2015-10-04 13:32:49 -07:00
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let _ = BAR;
|
|
|
|
}
|