mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 23:12:02 +00:00
10 lines
208 B
Rust
10 lines
208 B
Rust
//@ build-pass
|
|
//@ ignore-pass (test emits codegen-time warnings and verifies that they are not errors)
|
|
|
|
#![warn(unconditional_panic)]
|
|
|
|
fn main() {
|
|
&{ [1, 2, 3][4] };
|
|
//~^ WARN operation will panic
|
|
}
|