summaryrefslogtreecommitdiffstats
path: root/src/test/ui/consts/array-literal-index-oob.rs
blob: 9b3f735b1f849a43a9bd1226357a4c7ccd1ab9ba (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(const_err, unconditional_panic)]

fn main() {
    &{ [1, 2, 3][4] };
    //~^ WARN operation will panic
}