]> git.lizzy.rs Git - rust.git/blob - tests/ui/consts/array-literal-index-oob.rs
Rollup merge of #106962 - compiler-errors:use-sugg-span, r=oli-obk
[rust.git] / tests / ui / consts / array-literal-index-oob.rs
1 // build-pass
2 // ignore-pass (test emits codegen-time warnings and verifies that they are not errors)
3
4 #![warn(unconditional_panic)]
5
6 fn main() {
7     &{ [1, 2, 3][4] };
8     //~^ WARN operation will panic
9 }