2023-04-05 09:44:20 +01:00
|
|
|
// ignore-wasm32 compiled with panic=abort by default
|
2020-01-10 20:15:16 +01:00
|
|
|
pub enum Empty {}
|
|
|
|
|
|
|
|
fn empty() -> Option<Empty> {
|
|
|
|
None
|
|
|
|
}
|
|
|
|
|
|
|
|
fn loop_forever() {
|
|
|
|
loop {}
|
|
|
|
}
|
|
|
|
|
2020-07-27 21:22:43 +02:00
|
|
|
// EMIT_MIR unreachable_diverging.main.UnreachablePropagation.diff
|
2020-01-10 20:15:16 +01:00
|
|
|
fn main() {
|
|
|
|
let x = true;
|
|
|
|
if let Some(bomb) = empty() {
|
|
|
|
if x {
|
|
|
|
loop_forever()
|
|
|
|
}
|
|
|
|
match bomb {}
|
|
|
|
}
|
|
|
|
}
|