]>
Commit | Line | Data |
---|---|---|
dfeec247 | 1 | // build-pass |
ba9703b0 | 2 | // ignore-pass (test emits codegen-time warnings and verifies that they are not errors) |
dfeec247 | 3 | |
74b04a01 | 4 | #![warn(const_err, unconditional_panic)] |
dfeec247 | 5 | |
48663c56 | 6 | fn main() { |
dfeec247 | 7 | &{ [1, 2, 3][4] }; |
74b04a01 | 8 | //~^ WARN operation will panic |
dfeec247 XL |
9 | //~| WARN reaching this expression at runtime will panic or abort |
10 | //~| WARN erroneous constant used [const_err] | |
48663c56 | 11 | } |