1
Fork 0
rust/src/test/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
217 B
Rust
Raw Normal View History

// build-pass
// ignore-pass (test emits codegen-time warnings and verifies that they are not errors)
2020-02-18 22:49:47 +01:00
#![warn(const_err, unconditional_panic)]
fn main() {
&{ [1, 2, 3][4] };
//~^ WARN operation will panic
}