about summary refs log tree commit diff
path: root/tests/ui/consts/array-literal-index-oob.rs
blob: ca56206fbdf61216e859e4522bc3558e92fb5527 (plain)
1
2
3
4
5
6
7
8
9
//@ 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
}