mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-02 18:27:37 +00:00
8 lines
164 B
Rust
8 lines
164 B
Rust
const FOO: &'static [u32] = &[1, 2, 3];
|
|
const BAR: u32 = FOO[5];
|
|
//~^ ERROR index out of bounds: the length is 3 but the index is 5
|
|
|
|
fn main() {
|
|
let _ = BAR;
|
|
}
|