fork/rust

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

borsAuto merge of #72883 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum49cae55760d

1.44.0
6.7 KiB117 linesraw
1// MIR for `main` after ElaborateDrops
2
3fn main() -> () {
4    let mut _0: ();                      // return place in scope 0 at $DIR/issue-41110.rs:7:11: 7:11
5    let _1: ();                          // in scope 0 at $DIR/issue-41110.rs:8:9: 8:10
6    let mut _2: S;                       // in scope 0 at $DIR/issue-41110.rs:8:13: 8:14
7    let mut _3: S;                       // in scope 0 at $DIR/issue-41110.rs:8:21: 8:27
8    let mut _4: S;                       // in scope 0 at $DIR/issue-41110.rs:8:21: 8:22
9    let mut _5: bool;                    // in scope 0 at $DIR/issue-41110.rs:8:27: 8:28
10    scope 1 {
11        debug x => _1;                   // in scope 1 at $DIR/issue-41110.rs:8:9: 8:10
12    }
13
14    bb0: {
15        _5 = const false;                // bb0[0]: scope 0 at $DIR/issue-41110.rs:8:9: 8:10
16                                         // ty::Const
17                                         // + ty: bool
18                                         // + val: Value(Scalar(0x00))
19                                         // mir::Constant
20                                         // + span: $DIR/issue-41110.rs:8:9: 8:10
21                                         // + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
22        StorageLive(_1);                 // bb0[1]: scope 0 at $DIR/issue-41110.rs:8:9: 8:10
23        StorageLive(_2);                 // bb0[2]: scope 0 at $DIR/issue-41110.rs:8:13: 8:14
24        _5 = const true;                 // bb0[3]: scope 0 at $DIR/issue-41110.rs:8:13: 8:14
25                                         // ty::Const
26                                         // + ty: bool
27                                         // + val: Value(Scalar(0x01))
28                                         // mir::Constant
29                                         // + span: $DIR/issue-41110.rs:8:13: 8:14
30                                         // + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
31        _2 = S;                          // bb0[4]: scope 0 at $DIR/issue-41110.rs:8:13: 8:14
32        StorageLive(_3);                 // bb0[5]: scope 0 at $DIR/issue-41110.rs:8:21: 8:27
33        StorageLive(_4);                 // bb0[6]: scope 0 at $DIR/issue-41110.rs:8:21: 8:22
34        _4 = S;                          // bb0[7]: scope 0 at $DIR/issue-41110.rs:8:21: 8:22
35        _3 = const S::id(move _4) -> [return: bb2, unwind: bb4]; // bb0[8]: scope 0 at $DIR/issue-41110.rs:8:21: 8:27
36                                         // ty::Const
37                                         // + ty: fn(S) -> S {S::id}
38                                         // + val: Value(Scalar(<ZST>))
39                                         // mir::Constant
40                                         // + span: $DIR/issue-41110.rs:8:23: 8:25
41                                         // + literal: Const { ty: fn(S) -> S {S::id}, val: Value(Scalar(<ZST>)) }
42    }
43
44    bb1 (cleanup): {
45        resume;                          // bb1[0]: scope 0 at $DIR/issue-41110.rs:7:1: 9:2
46    }
47
48    bb2: {
49        StorageDead(_4);                 // bb2[0]: scope 0 at $DIR/issue-41110.rs:8:26: 8:27
50        _5 = const false;                // bb2[1]: scope 0 at $DIR/issue-41110.rs:8:13: 8:28
51                                         // ty::Const
52                                         // + ty: bool
53                                         // + val: Value(Scalar(0x00))
54                                         // mir::Constant
55                                         // + span: $DIR/issue-41110.rs:8:13: 8:28
56                                         // + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
57        _1 = const S::other(move _2, move _3) -> [return: bb6, unwind: bb5]; // bb2[2]: scope 0 at $DIR/issue-41110.rs:8:13: 8:28
58                                         // ty::Const
59                                         // + ty: fn(S, S) {S::other}
60                                         // + val: Value(Scalar(<ZST>))
61                                         // mir::Constant
62                                         // + span: $DIR/issue-41110.rs:8:15: 8:20
63                                         // + literal: Const { ty: fn(S, S) {S::other}, val: Value(Scalar(<ZST>)) }
64    }
65
66    bb3 (cleanup): {
67        goto -> bb9;                     // bb3[0]: scope 0 at $DIR/issue-41110.rs:8:27: 8:28
68    }
69
70    bb4 (cleanup): {
71        goto -> bb3;                     // bb4[0]: scope 0 at $DIR/issue-41110.rs:8:26: 8:27
72    }
73
74    bb5 (cleanup): {
75        goto -> bb3;                     // bb5[0]: scope 0 at $DIR/issue-41110.rs:8:27: 8:28
76    }
77
78    bb6: {
79        StorageDead(_3);                 // bb6[0]: scope 0 at $DIR/issue-41110.rs:8:27: 8:28
80        _5 = const false;                // bb6[1]: scope 0 at $DIR/issue-41110.rs:8:27: 8:28
81                                         // ty::Const
82                                         // + ty: bool
83                                         // + val: Value(Scalar(0x00))
84                                         // mir::Constant
85                                         // + span: $DIR/issue-41110.rs:8:27: 8:28
86                                         // + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
87        StorageDead(_2);                 // bb6[2]: scope 0 at $DIR/issue-41110.rs:8:27: 8:28
88        _0 = const ();                   // bb6[3]: scope 0 at $DIR/issue-41110.rs:7:11: 9:2
89                                         // ty::Const
90                                         // + ty: ()
91                                         // + val: Value(Scalar(<ZST>))
92                                         // mir::Constant
93                                         // + span: $DIR/issue-41110.rs:7:11: 9:2
94                                         // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
95        StorageDead(_1);                 // bb6[4]: scope 0 at $DIR/issue-41110.rs:9:1: 9:2
96        return;                          // bb6[5]: scope 0 at $DIR/issue-41110.rs:9:2: 9:2
97    }
98
99    bb7 (cleanup): {
100        drop(_2) -> bb1;                 // bb7[0]: scope 0 at $DIR/issue-41110.rs:8:27: 8:28
101    }
102
103    bb8 (cleanup): {
104        _5 = const false;                // bb8[0]: scope 0 at $DIR/issue-41110.rs:8:27: 8:28
105                                         // ty::Const
106                                         // + ty: bool
107                                         // + val: Value(Scalar(0x00))
108                                         // mir::Constant
109                                         // + span: $DIR/issue-41110.rs:8:27: 8:28
110                                         // + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
111        goto -> bb7;                     // bb8[1]: scope 0 at $DIR/issue-41110.rs:8:27: 8:28
112    }
113
114    bb9 (cleanup): {
115        switchInt(_5) -> [false: bb1, otherwise: bb8]; // bb9[0]: scope 0 at $DIR/issue-41110.rs:8:27: 8:28
116    }
117}