rust/src/test/mir-opt/unreachable.rs
2020-04-07 15:09:01 +00:00

21 lines
290 B
Rust

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