]> git.lizzy.rs Git - rust.git/blob - tests/mir-opt/issue_41110.main.ElaborateDrops.after.mir
Rollup merge of #106717 - klensy:typo, r=lcnr
[rust.git] / tests / mir-opt / issue_41110.main.ElaborateDrops.after.mir
1 // MIR for `main` after ElaborateDrops
2
3 fn main() -> () {
4     let mut _0: ();                      // return place in scope 0 at $DIR/issue_41110.rs:+0:11: +0:11
5     let _1: ();                          // in scope 0 at $DIR/issue_41110.rs:+1:9: +1:10
6     let mut _2: S;                       // in scope 0 at $DIR/issue_41110.rs:+1:13: +1:14
7     let mut _3: S;                       // in scope 0 at $DIR/issue_41110.rs:+1:21: +1:27
8     let mut _4: S;                       // in scope 0 at $DIR/issue_41110.rs:+1:21: +1:22
9     let mut _5: bool;                    // in scope 0 at $DIR/issue_41110.rs:+1:27: +1:28
10     scope 1 {
11         debug x => _1;                   // in scope 1 at $DIR/issue_41110.rs:+1:9: +1:10
12     }
13
14     bb0: {
15         _5 = const false;                // scope 0 at $DIR/issue_41110.rs:+1:9: +1:10
16         StorageLive(_1);                 // scope 0 at $DIR/issue_41110.rs:+1:9: +1:10
17         StorageLive(_2);                 // scope 0 at $DIR/issue_41110.rs:+1:13: +1:14
18         _5 = const true;                 // scope 0 at $DIR/issue_41110.rs:+1:13: +1:14
19         _2 = S;                          // scope 0 at $DIR/issue_41110.rs:+1:13: +1:14
20         StorageLive(_3);                 // scope 0 at $DIR/issue_41110.rs:+1:21: +1:27
21         StorageLive(_4);                 // scope 0 at $DIR/issue_41110.rs:+1:21: +1:22
22         _4 = S;                          // scope 0 at $DIR/issue_41110.rs:+1:21: +1:22
23         _3 = S::id(move _4) -> [return: bb1, unwind: bb4]; // scope 0 at $DIR/issue_41110.rs:+1:21: +1:27
24                                          // mir::Constant
25                                          // + span: $DIR/issue_41110.rs:8:23: 8:25
26                                          // + literal: Const { ty: fn(S) -> S {S::id}, val: Value(<ZST>) }
27     }
28
29     bb1: {
30         StorageDead(_4);                 // scope 0 at $DIR/issue_41110.rs:+1:26: +1:27
31         _5 = const false;                // scope 0 at $DIR/issue_41110.rs:+1:13: +1:28
32         _1 = S::other(move _2, move _3) -> [return: bb2, unwind: bb3]; // scope 0 at $DIR/issue_41110.rs:+1:13: +1:28
33                                          // mir::Constant
34                                          // + span: $DIR/issue_41110.rs:8:15: 8:20
35                                          // + literal: Const { ty: fn(S, S) {S::other}, val: Value(<ZST>) }
36     }
37
38     bb2: {
39         StorageDead(_3);                 // scope 0 at $DIR/issue_41110.rs:+1:27: +1:28
40         _5 = const false;                // scope 0 at $DIR/issue_41110.rs:+1:27: +1:28
41         StorageDead(_2);                 // scope 0 at $DIR/issue_41110.rs:+1:27: +1:28
42         _0 = const ();                   // scope 0 at $DIR/issue_41110.rs:+0:11: +2:2
43         StorageDead(_1);                 // scope 0 at $DIR/issue_41110.rs:+2:1: +2:2
44         return;                          // scope 0 at $DIR/issue_41110.rs:+2:2: +2:2
45     }
46
47     bb3 (cleanup): {
48         goto -> bb5;                     // scope 0 at $DIR/issue_41110.rs:+1:27: +1:28
49     }
50
51     bb4 (cleanup): {
52         goto -> bb5;                     // scope 0 at $DIR/issue_41110.rs:+1:26: +1:27
53     }
54
55     bb5 (cleanup): {
56         goto -> bb8;                     // scope 0 at $DIR/issue_41110.rs:+1:27: +1:28
57     }
58
59     bb6 (cleanup): {
60         resume;                          // scope 0 at $DIR/issue_41110.rs:+0:1: +2:2
61     }
62
63     bb7 (cleanup): {
64         drop(_2) -> bb6;                 // scope 0 at $DIR/issue_41110.rs:+1:27: +1:28
65     }
66
67     bb8 (cleanup): {
68         switchInt(_5) -> [0: bb6, otherwise: bb7]; // scope 0 at $DIR/issue_41110.rs:+1:27: +1:28
69     }
70 }