rust/tests/ui/consts/array-literal-index-oob.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

10 lines
208 B
Rust
Raw Normal View History

//@ build-pass
//@ ignore-pass (test emits codegen-time warnings and verifies that they are not errors)
2022-09-21 11:05:20 +00:00
#![warn(unconditional_panic)]
fn main() {
&{ [1, 2, 3][4] };
//~^ WARN operation will panic
}