fork/rust

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

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

master
1023 B50 linesraw
1- // MIR for `issue_77355_opt` before ConstGoto
2+ // MIR for `issue_77355_opt` after ConstGoto
3  
4  fn issue_77355_opt(_1: Foo) -> u64 {
5      debug num => _1;
6      let mut _0: u64;
7-     let mut _2: bool;
8-     let mut _3: isize;
9+     let mut _2: isize;
10  
11      bb0: {
12-         StorageLive(_2);
13-         _3 = discriminant(_1);
14-         switchInt(move _3) -> [1: bb2, 2: bb2, otherwise: bb1];
15+         _2 = discriminant(_1);
16+         switchInt(move _2) -> [1: bb2, 2: bb2, otherwise: bb1];
17      }
18  
19      bb1: {
20-         _2 = const false;
21+         _0 = const 42_u64;
22          goto -> bb3;
23      }
24  
25      bb2: {
26-         _2 = const true;
27+         _0 = const 23_u64;
28          goto -> bb3;
29      }
30  
31      bb3: {
32-         switchInt(move _2) -> [0: bb5, otherwise: bb4];
33-     }
34- 
35-     bb4: {
36-         _0 = const 23_u64;
37-         goto -> bb6;
38-     }
39- 
40-     bb5: {
41-         _0 = const 42_u64;
42-         goto -> bb6;
43-     }
44- 
45-     bb6: {
46-         StorageDead(_2);
47          return;
48      }
49  }
50