]> git.lizzy.rs Git - rust.git/blob - tests/mir-opt/unreachable.rs
Rollup merge of #106244 - atouchet:readme3, r=workingjubilee
[rust.git] / tests / mir-opt / unreachable.rs
1 enum Empty {}
2
3 fn empty() -> Option<Empty> {
4     None
5 }
6
7 // EMIT_MIR unreachable.main.UnreachablePropagation.diff
8 fn main() {
9     if let Some(_x) = empty() {
10         let mut _y;
11
12         if true {
13             _y = 21;
14         } else {
15             _y = 42;
16         }
17
18         match _x { }
19     }
20 }