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
206 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 06:05:20 -05:00
#![warn(unconditional_panic)]
fn main() {
&{ [1, 2, 3][4] };
//~^ WARN operation will panic
}