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