mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 23:04:33 +00:00
23 lines
363 B
Rust
23 lines
363 B
Rust
// skip-filecheck
|
|
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
|
pub enum Empty {}
|
|
|
|
fn empty() -> Option<Empty> {
|
|
None
|
|
}
|
|
|
|
fn loop_forever() {
|
|
loop {}
|
|
}
|
|
|
|
// EMIT_MIR unreachable_diverging.main.UnreachablePropagation.diff
|
|
fn main() {
|
|
let x = true;
|
|
if let Some(bomb) = empty() {
|
|
if x {
|
|
loop_forever()
|
|
}
|
|
match bomb {}
|
|
}
|
|
}
|