mirror of
https://git.proxmox.com/git/rustc
synced 2025-05-29 11:08:24 +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;
|
|
}
|