]> git.lizzy.rs Git - rust.git/blob - src/test/mir-opt/remove_fake_borrows.match_guard.CleanupNonCodegenStatements.diff
Auto merge of #104765 - chenyukang:yukang-fix-104639-lifetime-check, r=oli-obk
[rust.git] / src / test / mir-opt / remove_fake_borrows.match_guard.CleanupNonCodegenStatements.diff
1 - // MIR for `match_guard` before CleanupNonCodegenStatements
2 + // MIR for `match_guard` after CleanupNonCodegenStatements
3   
4   fn match_guard(_1: Option<&&i32>, _2: bool) -> i32 {
5       debug x => _1;                       // in scope 0 at $DIR/remove_fake_borrows.rs:+0:16: +0:17
6       debug c => _2;                       // in scope 0 at $DIR/remove_fake_borrows.rs:+0:34: +0:35
7       let mut _0: i32;                     // return place in scope 0 at $DIR/remove_fake_borrows.rs:+0:46: +0:49
8       let mut _3: isize;                   // in scope 0 at $DIR/remove_fake_borrows.rs:+2:9: +2:16
9       let mut _4: &std::option::Option<&&i32>; // in scope 0 at $DIR/remove_fake_borrows.rs:+1:11: +1:12
10       let mut _5: &&i32;                   // in scope 0 at $DIR/remove_fake_borrows.rs:+1:11: +1:12
11       let mut _6: &&&i32;                  // in scope 0 at $DIR/remove_fake_borrows.rs:+1:11: +1:12
12       let mut _7: &i32;                    // in scope 0 at $DIR/remove_fake_borrows.rs:+1:11: +1:12
13       let mut _8: bool;                    // in scope 0 at $DIR/remove_fake_borrows.rs:+2:20: +2:21
14   
15       bb0: {
16 -         FakeRead(ForMatchedPlace(None), _1); // scope 0 at $DIR/remove_fake_borrows.rs:+1:11: +1:12
17 +         nop;                             // scope 0 at $DIR/remove_fake_borrows.rs:+1:11: +1:12
18           _3 = discriminant(_1);           // scope 0 at $DIR/remove_fake_borrows.rs:+1:11: +1:12
19           switchInt(move _3) -> [1: bb2, otherwise: bb1]; // scope 0 at $DIR/remove_fake_borrows.rs:+1:5: +1:12
20       }
21   
22       bb1: {
23           _0 = const 1_i32;                // scope 0 at $DIR/remove_fake_borrows.rs:+3:14: +3:15
24           goto -> bb7;                     // scope 0 at $DIR/remove_fake_borrows.rs:+3:14: +3:15
25       }
26   
27       bb2: {
28           switchInt((*(*((_1 as Some).0: &&i32)))) -> [0: bb3, otherwise: bb1]; // scope 0 at $DIR/remove_fake_borrows.rs:+1:5: +1:12
29       }
30   
31       bb3: {
32           goto -> bb4;                     // scope 0 at $DIR/remove_fake_borrows.rs:+2:9: +2:16
33       }
34   
35       bb4: {
36 -         _4 = &shallow _1;                // scope 0 at $DIR/remove_fake_borrows.rs:+1:11: +1:12
37 -         _5 = &shallow (*((_1 as Some).0: &&i32)); // scope 0 at $DIR/remove_fake_borrows.rs:+1:11: +1:12
38 -         _6 = &shallow ((_1 as Some).0: &&i32); // scope 0 at $DIR/remove_fake_borrows.rs:+1:11: +1:12
39 -         _7 = &shallow (*(*((_1 as Some).0: &&i32))); // scope 0 at $DIR/remove_fake_borrows.rs:+1:11: +1:12
40 +         nop;                             // scope 0 at $DIR/remove_fake_borrows.rs:+1:11: +1:12
41 +         nop;                             // scope 0 at $DIR/remove_fake_borrows.rs:+1:11: +1:12
42 +         nop;                             // scope 0 at $DIR/remove_fake_borrows.rs:+1:11: +1:12
43 +         nop;                             // scope 0 at $DIR/remove_fake_borrows.rs:+1:11: +1:12
44           StorageLive(_8);                 // scope 0 at $DIR/remove_fake_borrows.rs:+2:20: +2:21
45           _8 = _2;                         // scope 0 at $DIR/remove_fake_borrows.rs:+2:20: +2:21
46           switchInt(move _8) -> [0: bb6, otherwise: bb5]; // scope 0 at $DIR/remove_fake_borrows.rs:+2:20: +2:21
47       }
48   
49       bb5: {
50           StorageDead(_8);                 // scope 0 at $DIR/remove_fake_borrows.rs:+2:20: +2:21
51 -         FakeRead(ForMatchGuard, _4);     // scope 0 at $DIR/remove_fake_borrows.rs:+2:20: +2:21
52 -         FakeRead(ForMatchGuard, _5);     // scope 0 at $DIR/remove_fake_borrows.rs:+2:20: +2:21
53 -         FakeRead(ForMatchGuard, _6);     // scope 0 at $DIR/remove_fake_borrows.rs:+2:20: +2:21
54 -         FakeRead(ForMatchGuard, _7);     // scope 0 at $DIR/remove_fake_borrows.rs:+2:20: +2:21
55 +         nop;                             // scope 0 at $DIR/remove_fake_borrows.rs:+2:20: +2:21
56 +         nop;                             // scope 0 at $DIR/remove_fake_borrows.rs:+2:20: +2:21
57 +         nop;                             // scope 0 at $DIR/remove_fake_borrows.rs:+2:20: +2:21
58 +         nop;                             // scope 0 at $DIR/remove_fake_borrows.rs:+2:20: +2:21
59           _0 = const 0_i32;                // scope 0 at $DIR/remove_fake_borrows.rs:+2:25: +2:26
60           goto -> bb7;                     // scope 0 at $DIR/remove_fake_borrows.rs:+2:25: +2:26
61       }
62   
63       bb6: {
64           StorageDead(_8);                 // scope 0 at $DIR/remove_fake_borrows.rs:+2:20: +2:21
65           goto -> bb1;                     // scope 0 at $DIR/remove_fake_borrows.rs:+2:20: +2:21
66       }
67   
68       bb7: {
69           return;                          // scope 0 at $DIR/remove_fake_borrows.rs:+5:2: +5:2
70       }
71   
72       bb8 (cleanup): {
73           resume;                          // scope 0 at $DIR/remove_fake_borrows.rs:+0:1: +5:2
74       }
75   }
76