mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-18 03:25:55 +00:00
9 lines
204 B
Rust
9 lines
204 B
Rust
const FOO: &'static[u32] = &[1, 2, 3];
|
|
const BAR: u32 = FOO[5];
|
|
//~^ index out of bounds: the length is 3 but the index is 5
|
|
//~| ERROR evaluation of constant value failed
|
|
|
|
fn main() {
|
|
let _ = BAR;
|
|
}
|