2023-06-08 02:18:34 -05:00
|
|
|
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
2020-01-10 13:15:16 -06:00
|
|
|
pub enum Empty {}
|
|
|
|
|
|
|
|
fn empty() -> Option<Empty> {
|
|
|
|
None
|
|
|
|
}
|
|
|
|
|
|
|
|
fn loop_forever() {
|
|
|
|
loop {}
|
|
|
|
}
|
|
|
|
|
2020-07-27 14:22:43 -05:00
|
|
|
// EMIT_MIR unreachable_diverging.main.UnreachablePropagation.diff
|
2020-01-10 13:15:16 -06:00
|
|
|
fn main() {
|
|
|
|
let x = true;
|
|
|
|
if let Some(bomb) = empty() {
|
|
|
|
if x {
|
|
|
|
loop_forever()
|
|
|
|
}
|
|
|
|
match bomb {}
|
|
|
|
}
|
|
|
|
}
|