summaryrefslogtreecommitdiffstats
path: root/tests/ui/consts/array-literal-index-oob.rs
blob: 67b49b1ba2be23c9e50ff753219f2e4f75a6f229 (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
}