fork/rust

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

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

master
1.7 KiB74 linesraw
1- // MIR for `match_guard` before CleanupPostBorrowck
2+ // MIR for `match_guard` after CleanupPostBorrowck
3  
4  fn match_guard(_1: Option<&&i32>, _2: bool) -> i32 {
5      debug x => _1;
6      debug c => _2;
7      let mut _0: i32;
8      let mut _3: isize;
9      let mut _4: &std::option::Option<&&i32>;
10      let mut _5: &&i32;
11      let mut _6: &&&i32;
12      let mut _7: &i32;
13      let mut _8: bool;
14  
15      bb0: {
16-         FakeRead(ForMatchedPlace(None), _1);
17+         nop;
18          _3 = discriminant(_1);
19          switchInt(move _3) -> [1: bb2, otherwise: bb1];
20      }
21  
22      bb1: {
23          _0 = const 1_i32;
24          goto -> bb7;
25      }
26  
27      bb2: {
28          switchInt((*(*((_1 as Some).0: &&i32)))) -> [0: bb3, otherwise: bb1];
29      }
30  
31      bb3: {
32-         falseEdge -> [real: bb4, imaginary: bb1];
33+         goto -> bb4;
34      }
35  
36      bb4: {
37-         _4 = &shallow _1;
38-         _5 = &shallow (*((_1 as Some).0: &&i32));
39-         _6 = &shallow ((_1 as Some).0: &&i32);
40-         _7 = &shallow (*(*((_1 as Some).0: &&i32)));
41+         nop;
42+         nop;
43+         nop;
44+         nop;
45          StorageLive(_8);
46          _8 = _2;
47          switchInt(move _8) -> [0: bb6, otherwise: bb5];
48      }
49  
50      bb5: {
51          StorageDead(_8);
52-         FakeRead(ForMatchGuard, _4);
53-         FakeRead(ForMatchGuard, _5);
54-         FakeRead(ForMatchGuard, _6);
55-         FakeRead(ForMatchGuard, _7);
56+         nop;
57+         nop;
58+         nop;
59+         nop;
60          _0 = const 0_i32;
61          goto -> bb7;
62      }
63  
64      bb6: {
65          StorageDead(_8);
66-         falseEdge -> [real: bb1, imaginary: bb1];
67+         goto -> bb1;
68      }
69  
70      bb7: {
71          return;
72      }
73  }
74