3 // need to emit MIR, because const prop (which emits `unconditional_panic`) only runs if
4 // the `optimized_mir` query is run, which it isn't in check-only mode.
5 // compile-flags: --crate-type lib --emit=mir,link
7 #![warn(unconditional_panic)]
9 pub struct Fixed64(i64);
11 // HACK: this test passes only because this is a const fn that is written to metadata
12 pub const fn div(f: Fixed64) {
13 f.0 / 0; //~ WARN will panic at runtime