mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-24 07:44:10 +00:00
8 lines
176 B
Rust
8 lines
176 B
Rust
//@ build-fail
|
|
|
|
fn main() {
|
|
let xs: [i32; 5] = [1, 2, 3, 4, 5];
|
|
let _ = &xs;
|
|
let _ = xs[7]; //~ ERROR: this operation will panic at runtime [unconditional_panic]
|
|
}
|