rust/src/test/mir-opt/unreachable.rs
2020-07-29 13:41:11 +02:00

21 lines
296 B
Rust

enum Empty {}
fn empty() -> Option<Empty> {
None
}
// EMIT_MIR unreachable.main.UnreachablePropagation.diff
fn main() {
if let Some(_x) = empty() {
let mut _y;
if true {
_y = 21;
} else {
_y = 42;
}
match _x { }
}
}