2020-01-08 21:31:08 +01:00
|
|
|
// build-pass
|
2020-01-18 00:34:33 +03:00
|
|
|
// ignore-pass (emit codegen-time warnings and verify that they are indeed warnings and not errors)
|
2020-01-08 21:31:08 +01:00
|
|
|
|
|
|
|
#![warn(const_err)]
|
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] };
|
|
|
|
//~^ WARN index out of bounds
|
|
|
|
//~| WARN reaching this expression at runtime will panic or abort
|
|
|
|
//~| WARN erroneous constant used [const_err]
|
2019-06-06 12:23:17 -07:00
|
|
|
}
|