fork/rust

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

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

1.44.0
7.8 KiB145 linesraw
1// MIR for `test` after ElaborateDrops
2
3fn 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;                // bb0[0]: scope 0 at $DIR/issue-41110.rs:15:9: 15:10
20                                         // ty::Const
21                                         // + ty: bool
22                                         // + val: Value(Scalar(0x00))
23                                         // mir::Constant
24                                         // + span: $DIR/issue-41110.rs:15:9: 15:10
25                                         // + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
26        StorageLive(_1);                 // bb0[1]: scope 0 at $DIR/issue-41110.rs:15:9: 15:10
27        _6 = const true;                 // bb0[2]: scope 0 at $DIR/issue-41110.rs:15:13: 15:14
28                                         // ty::Const
29                                         // + ty: bool
30                                         // + val: Value(Scalar(0x01))
31                                         // mir::Constant
32                                         // + span: $DIR/issue-41110.rs:15:13: 15:14
33                                         // + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
34        _1 = S;                          // bb0[3]: scope 0 at $DIR/issue-41110.rs:15:13: 15:14
35        StorageLive(_2);                 // bb0[4]: scope 1 at $DIR/issue-41110.rs:16:9: 16:14
36        _2 = S;                          // bb0[5]: scope 1 at $DIR/issue-41110.rs:16:17: 16:18
37        StorageLive(_3);                 // bb0[6]: scope 2 at $DIR/issue-41110.rs:17:5: 17:12
38        StorageLive(_4);                 // bb0[7]: scope 2 at $DIR/issue-41110.rs:17:10: 17:11
39        _4 = move _2;                    // bb0[8]: scope 2 at $DIR/issue-41110.rs:17:10: 17:11
40        _3 = const std::mem::drop::<S>(move _4) -> [return: bb2, unwind: bb5]; // bb0[9]: scope 2 at $DIR/issue-41110.rs:17:5: 17:12
41                                         // ty::Const
42                                         // + ty: fn(S) {std::mem::drop::<S>}
43                                         // + val: Value(Scalar(<ZST>))
44                                         // mir::Constant
45                                         // + span: $DIR/issue-41110.rs:17:5: 17:9
46                                         // + literal: Const { ty: fn(S) {std::mem::drop::<S>}, val: Value(Scalar(<ZST>)) }
47    }
48
49    bb1 (cleanup): {
50        resume;                          // bb1[0]: scope 0 at $DIR/issue-41110.rs:14:1: 19:2
51    }
52
53    bb2: {
54        StorageDead(_4);                 // bb2[0]: scope 2 at $DIR/issue-41110.rs:17:11: 17:12
55        StorageDead(_3);                 // bb2[1]: scope 2 at $DIR/issue-41110.rs:17:12: 17:13
56        StorageLive(_5);                 // bb2[2]: scope 2 at $DIR/issue-41110.rs:18:9: 18:10
57        _6 = const false;                // bb2[3]: scope 2 at $DIR/issue-41110.rs:18:9: 18:10
58                                         // ty::Const
59                                         // + ty: bool
60                                         // + val: Value(Scalar(0x00))
61                                         // mir::Constant
62                                         // + span: $DIR/issue-41110.rs:18:9: 18:10
63                                         // + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
64        _5 = move _1;                    // bb2[4]: scope 2 at $DIR/issue-41110.rs:18:9: 18:10
65        goto -> bb12;                    // bb2[5]: scope 2 at $DIR/issue-41110.rs:18:5: 18:6
66    }
67
68    bb3 (cleanup): {
69        goto -> bb15;                    // bb3[0]: scope 0 at $DIR/issue-41110.rs:19:1: 19:2
70    }
71
72    bb4 (cleanup): {
73        goto -> bb3;                     // bb4[0]: scope 1 at $DIR/issue-41110.rs:19:1: 19:2
74    }
75
76    bb5 (cleanup): {
77        goto -> bb4;                     // bb5[0]: scope 2 at $DIR/issue-41110.rs:17:11: 17:12
78    }
79
80    bb6: {
81        goto -> bb8;                     // bb6[0]: scope 2 at $DIR/issue-41110.rs:18:9: 18:10
82    }
83
84    bb7 (cleanup): {
85        goto -> bb4;                     // bb7[0]: scope 2 at $DIR/issue-41110.rs:18:9: 18:10
86    }
87
88    bb8: {
89        StorageDead(_5);                 // bb8[0]: scope 2 at $DIR/issue-41110.rs:18:9: 18:10
90        _0 = const ();                   // bb8[1]: scope 0 at $DIR/issue-41110.rs:14:15: 19:2
91                                         // ty::Const
92                                         // + ty: ()
93                                         // + val: Value(Scalar(<ZST>))
94                                         // mir::Constant
95                                         // + span: $DIR/issue-41110.rs:14:15: 19:2
96                                         // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
97        drop(_2) -> [return: bb9, unwind: bb3]; // bb8[2]: scope 1 at $DIR/issue-41110.rs:19:1: 19:2
98    }
99
100    bb9: {
101        StorageDead(_2);                 // bb9[0]: scope 1 at $DIR/issue-41110.rs:19:1: 19:2
102        goto -> bb10;                    // bb9[1]: scope 0 at $DIR/issue-41110.rs:19:1: 19:2
103    }
104
105    bb10: {
106        _6 = const false;                // bb10[0]: scope 0 at $DIR/issue-41110.rs:19:1: 19:2
107                                         // ty::Const
108                                         // + ty: bool
109                                         // + val: Value(Scalar(0x00))
110                                         // mir::Constant
111                                         // + span: $DIR/issue-41110.rs:19:1: 19:2
112                                         // + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
113        StorageDead(_1);                 // bb10[1]: scope 0 at $DIR/issue-41110.rs:19:1: 19:2
114        return;                          // bb10[2]: scope 0 at $DIR/issue-41110.rs:19:2: 19:2
115    }
116
117    bb11 (cleanup): {
118        _2 = move _5;                    // bb11[0]: scope 2 at $DIR/issue-41110.rs:18:5: 18:6
119        goto -> bb7;                     // bb11[1]: scope 2 at $DIR/issue-41110.rs:18:5: 18:6
120    }
121
122    bb12: {
123        _2 = move _5;                    // bb12[0]: scope 2 at $DIR/issue-41110.rs:18:5: 18:6
124        goto -> bb6;                     // bb12[1]: scope 2 at $DIR/issue-41110.rs:18:5: 18:6
125    }
126
127    bb13 (cleanup): {
128        drop(_1) -> bb1;                 // bb13[0]: scope 0 at $DIR/issue-41110.rs:19:1: 19:2
129    }
130
131    bb14 (cleanup): {
132        _6 = const false;                // bb14[0]: scope 0 at $DIR/issue-41110.rs:19:1: 19:2
133                                         // ty::Const
134                                         // + ty: bool
135                                         // + val: Value(Scalar(0x00))
136                                         // mir::Constant
137                                         // + span: $DIR/issue-41110.rs:19:1: 19:2
138                                         // + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
139        goto -> bb13;                    // bb14[1]: scope 0 at $DIR/issue-41110.rs:19:1: 19:2
140    }
141
142    bb15 (cleanup): {
143        switchInt(_6) -> [false: bb1, otherwise: bb14]; // bb15[0]: scope 0 at $DIR/issue-41110.rs:19:1: 19:2
144    }
145}