fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.4 KiB65 linesraw
1- // MIR for `main` before UnreachablePropagation
2+ // MIR for `main` after UnreachablePropagation
3  
4  fn main() -> () {
5      let mut _0: ();
6      let _1: bool;
7      let mut _2: std::option::Option<Empty>;
8      let mut _3: isize;
9      let _5: ();
10      let mut _6: bool;
11      let mut _7: !;
12      scope 1 {
13          debug x => _1;
14          scope 2 {
15              debug bomb => _4;
16              let _4: Empty;
17          }
18      }
19  
20      bb0: {
21          StorageLive(_1);
22          _1 = const true;
23          StorageLive(_2);
24          _2 = empty() -> [return: bb1, unwind unreachable];
25      }
26  
27      bb1: {
28          _3 = discriminant(_2);
29          switchInt(move _3) -> [1: bb2, otherwise: bb6];
30      }
31  
32      bb2: {
33          StorageLive(_4);
34          _4 = move ((_2 as Some).0: Empty);
35          StorageLive(_5);
36          StorageLive(_6);
37          _6 = _1;
38          switchInt(move _6) -> [0: bb4, otherwise: bb3];
39      }
40  
41      bb3: {
42          _5 = loop_forever() -> [return: bb5, unwind unreachable];
43      }
44  
45      bb4: {
46-         _5 = const ();
47-         goto -> bb5;
48+         unreachable;
49      }
50  
51      bb5: {
52-         StorageDead(_6);
53-         StorageDead(_5);
54-         StorageLive(_7);
55          unreachable;
56      }
57  
58      bb6: {
59          _0 = const ();
60          StorageDead(_1);
61          StorageDead(_2);
62          return;
63      }
64  }
65