2020-01-08 14:31:08 -06:00
|
|
|
// build-pass
|
2020-04-19 08:06:00 -05:00
|
|
|
// ignore-pass (test emits codegen-time warnings and verifies that they are not errors)
|
2020-01-08 14:31:08 -06:00
|
|
|
|
2022-09-21 06:05:20 -05:00
|
|
|
#![warn(unconditional_panic)]
|
2019-12-13 21:28:32 -06:00
|
|
|
|
2019-06-06 14:23:17 -05:00
|
|
|
fn main() {
|
2020-01-08 14:31:08 -06:00
|
|
|
&{ [1, 2, 3][4] };
|
2020-02-15 03:47:27 -06:00
|
|
|
//~^ WARN operation will panic
|
2019-06-06 14:23:17 -05:00
|
|
|
}
|