]> git.lizzy.rs Git - rust.git/blob - src/test/mir-opt/issue_41110.test.ElaborateDrops.after.mir
Rollup merge of #75837 - GuillaumeGomez:fix-font-color-help-button, r=Cldfire
[rust.git] / src / test / mir-opt / issue_41110.test.ElaborateDrops.after.mir
1 // MIR for `test` after ElaborateDrops
2
3 fn test() -> () {
4     let mut _0: ();                      // return place in scope 0 at $DIR/issue-41110.rs:14:15: 14:15
5     let _1: S;                           // in scope 0 at $DIR/issue-41110.rs:15:9: 15:10
6     let _3: ();                          // in scope 0 at $DIR/issue-41110.rs:17:5: 17:12
7     let mut _4: S;                       // in scope 0 at $DIR/issue-41110.rs:17:10: 17:11
8     let mut _5: S;                       // in scope 0 at $DIR/issue-41110.rs:18:9: 18:10
9     let mut _6: bool;                    // in scope 0 at $DIR/issue-41110.rs:19:1: 19:2
10     scope 1 {
11         debug u => _1;                   // in scope 1 at $DIR/issue-41110.rs:15:9: 15:10
12         let mut _2: S;                   // in scope 1 at $DIR/issue-41110.rs:16:9: 16:14
13         scope 2 {
14             debug v => _2;               // in scope 2 at $DIR/issue-41110.rs:16:9: 16:14
15         }
16     }
17
18     bb0: {
19         _6 = const false;                // scope 0 at $DIR/issue-41110.rs:15:9: 15:10
20         StorageLive(_1);                 // scope 0 at $DIR/issue-41110.rs:15:9: 15:10
21         _6 = const true;                 // scope 0 at $DIR/issue-41110.rs:15:13: 15:14
22         _1 = S;                          // scope 0 at $DIR/issue-41110.rs:15:13: 15:14
23         StorageLive(_2);                 // scope 1 at $DIR/issue-41110.rs:16:9: 16:14
24         _2 = S;                          // scope 1 at $DIR/issue-41110.rs:16:17: 16:18
25         StorageLive(_3);                 // scope 2 at $DIR/issue-41110.rs:17:5: 17:12
26         StorageLive(_4);                 // scope 2 at $DIR/issue-41110.rs:17:10: 17:11
27         _4 = move _2;                    // scope 2 at $DIR/issue-41110.rs:17:10: 17:11
28         _3 = std::mem::drop::<S>(move _4) -> [return: bb2, unwind: bb5]; // scope 2 at $DIR/issue-41110.rs:17:5: 17:12
29                                          // mir::Constant
30                                          // + span: $DIR/issue-41110.rs:17:5: 17:9
31                                          // + literal: Const { ty: fn(S) {std::mem::drop::<S>}, val: Value(Scalar(<ZST>)) }
32     }
33
34     bb1 (cleanup): {
35         resume;                          // scope 0 at $DIR/issue-41110.rs:14:1: 19:2
36     }
37
38     bb2: {
39         StorageDead(_4);                 // scope 2 at $DIR/issue-41110.rs:17:11: 17:12
40         StorageDead(_3);                 // scope 2 at $DIR/issue-41110.rs:17:12: 17:13
41         StorageLive(_5);                 // scope 2 at $DIR/issue-41110.rs:18:9: 18:10
42         _6 = const false;                // scope 2 at $DIR/issue-41110.rs:18:9: 18:10
43         _5 = move _1;                    // scope 2 at $DIR/issue-41110.rs:18:9: 18:10
44         goto -> bb12;                    // scope 2 at $DIR/issue-41110.rs:18:5: 18:6
45     }
46
47     bb3 (cleanup): {
48         goto -> bb15;                    // scope 0 at $DIR/issue-41110.rs:19:1: 19:2
49     }
50
51     bb4 (cleanup): {
52         goto -> bb3;                     // scope 1 at $DIR/issue-41110.rs:19:1: 19:2
53     }
54
55     bb5 (cleanup): {
56         goto -> bb4;                     // scope 2 at $DIR/issue-41110.rs:17:11: 17:12
57     }
58
59     bb6: {
60         goto -> bb8;                     // scope 2 at $DIR/issue-41110.rs:18:9: 18:10
61     }
62
63     bb7 (cleanup): {
64         goto -> bb4;                     // scope 2 at $DIR/issue-41110.rs:18:9: 18:10
65     }
66
67     bb8: {
68         StorageDead(_5);                 // scope 2 at $DIR/issue-41110.rs:18:9: 18:10
69         _0 = const ();                   // scope 0 at $DIR/issue-41110.rs:14:15: 19:2
70         drop(_2) -> [return: bb9, unwind: bb3]; // scope 1 at $DIR/issue-41110.rs:19:1: 19:2
71     }
72
73     bb9: {
74         StorageDead(_2);                 // scope 1 at $DIR/issue-41110.rs:19:1: 19:2
75         goto -> bb10;                    // scope 0 at $DIR/issue-41110.rs:19:1: 19:2
76     }
77
78     bb10: {
79         _6 = const false;                // scope 0 at $DIR/issue-41110.rs:19:1: 19:2
80         StorageDead(_1);                 // scope 0 at $DIR/issue-41110.rs:19:1: 19:2
81         return;                          // scope 0 at $DIR/issue-41110.rs:19:2: 19:2
82     }
83
84     bb11 (cleanup): {
85         _2 = move _5;                    // scope 2 at $DIR/issue-41110.rs:18:5: 18:6
86         goto -> bb7;                     // scope 2 at $DIR/issue-41110.rs:18:5: 18:6
87     }
88
89     bb12: {
90         _2 = move _5;                    // scope 2 at $DIR/issue-41110.rs:18:5: 18:6
91         goto -> bb6;                     // scope 2 at $DIR/issue-41110.rs:18:5: 18:6
92     }
93
94     bb13 (cleanup): {
95         drop(_1) -> bb1;                 // scope 0 at $DIR/issue-41110.rs:19:1: 19:2
96     }
97
98     bb14 (cleanup): {
99         _6 = const false;                // scope 0 at $DIR/issue-41110.rs:19:1: 19:2
100         goto -> bb13;                    // scope 0 at $DIR/issue-41110.rs:19:1: 19:2
101     }
102
103     bb15 (cleanup): {
104         switchInt(_6) -> [false: bb1, otherwise: bb14]; // scope 0 at $DIR/issue-41110.rs:19:1: 19:2
105     }
106 }