fork/rust
git clone https://git.julia.blue/fork/rust
49cae55760d
1.44.0
1// MIR for `main` after ElaborateDrops 2 3fn main() -> () { 4 let mut _0: (); // return place in scope 0 at $DIR/issue-41888.rs:6:11: 6:11 5 let _1: E; // in scope 0 at $DIR/issue-41888.rs:7:9: 7:10 6 let mut _2: bool; // in scope 0 at $DIR/issue-41888.rs:8:8: 8:14 7 let mut _3: E; // in scope 0 at $DIR/issue-41888.rs:9:13: 9:20 8 let mut _4: K; // in scope 0 at $DIR/issue-41888.rs:9:18: 9:19 9 let mut _5: isize; // in scope 0 at $DIR/issue-41888.rs:10:16: 10:24 10 let mut _7: bool; // in scope 0 at $DIR/issue-41888.rs:15:1: 15:2 11 let mut _8: bool; // in scope 0 at $DIR/issue-41888.rs:15:1: 15:2 12 let mut _9: bool; // in scope 0 at $DIR/issue-41888.rs:15:1: 15:2 13 let mut _10: isize; // in scope 0 at $DIR/issue-41888.rs:15:1: 15:2 14 let mut _11: isize; // in scope 0 at $DIR/issue-41888.rs:15:1: 15:2 15 scope 1 { 16 debug e => _1; // in scope 1 at $DIR/issue-41888.rs:7:9: 7:10 17 let _6: K; // in scope 1 at $DIR/issue-41888.rs:10:21: 10:23 18 scope 2 { 19 debug _k => _6; // in scope 2 at $DIR/issue-41888.rs:10:21: 10:23 20 } 21 } 22 23 bb0: { 24 _9 = const false; // bb0[0]: scope 0 at $DIR/issue-41888.rs:7:9: 7:10 25 // ty::Const 26 // + ty: bool 27 // + val: Value(Scalar(0x00)) 28 // mir::Constant 29 // + span: $DIR/issue-41888.rs:7:9: 7:10 30 // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } 31 _7 = const false; // bb0[1]: scope 0 at $DIR/issue-41888.rs:7:9: 7:10 32 // ty::Const 33 // + ty: bool 34 // + val: Value(Scalar(0x00)) 35 // mir::Constant 36 // + span: $DIR/issue-41888.rs:7:9: 7:10 37 // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } 38 _8 = const false; // bb0[2]: scope 0 at $DIR/issue-41888.rs:7:9: 7:10 39 // ty::Const 40 // + ty: bool 41 // + val: Value(Scalar(0x00)) 42 // mir::Constant 43 // + span: $DIR/issue-41888.rs:7:9: 7:10 44 // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } 45 StorageLive(_1); // bb0[3]: scope 0 at $DIR/issue-41888.rs:7:9: 7:10 46 StorageLive(_2); // bb0[4]: scope 1 at $DIR/issue-41888.rs:8:8: 8:14 47 _2 = const cond() -> [return: bb2, unwind: bb3]; // bb0[5]: scope 1 at $DIR/issue-41888.rs:8:8: 8:14 48 // ty::Const 49 // + ty: fn() -> bool {cond} 50 // + val: Value(Scalar(<ZST>)) 51 // mir::Constant 52 // + span: $DIR/issue-41888.rs:8:8: 8:12 53 // + literal: Const { ty: fn() -> bool {cond}, val: Value(Scalar(<ZST>)) } 54 } 55 56 bb1 (cleanup): { 57 resume; // bb1[0]: scope 0 at $DIR/issue-41888.rs:6:1: 15:2 58 } 59 60 bb2: { 61 switchInt(_2) -> [false: bb4, otherwise: bb5]; // bb2[0]: scope 1 at $DIR/issue-41888.rs:8:5: 14:6 62 } 63 64 bb3 (cleanup): { 65 goto -> bb1; // bb3[0]: scope 0 at $DIR/issue-41888.rs:15:1: 15:2 66 } 67 68 bb4: { 69 _0 = const (); // bb4[0]: scope 1 at $DIR/issue-41888.rs:8:5: 14:6 70 // ty::Const 71 // + ty: () 72 // + val: Value(Scalar(<ZST>)) 73 // mir::Constant 74 // + span: $DIR/issue-41888.rs:8:5: 14:6 75 // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) } 76 goto -> bb11; // bb4[1]: scope 1 at $DIR/issue-41888.rs:8:5: 14:6 77 } 78 79 bb5: { 80 StorageLive(_3); // bb5[0]: scope 1 at $DIR/issue-41888.rs:9:13: 9:20 81 StorageLive(_4); // bb5[1]: scope 1 at $DIR/issue-41888.rs:9:18: 9:19 82 _4 = K; // bb5[2]: scope 1 at $DIR/issue-41888.rs:9:18: 9:19 83 _3 = E::F(move _4); // bb5[3]: scope 1 at $DIR/issue-41888.rs:9:13: 9:20 84 StorageDead(_4); // bb5[4]: scope 1 at $DIR/issue-41888.rs:9:19: 9:20 85 goto -> bb14; // bb5[5]: scope 1 at $DIR/issue-41888.rs:9:9: 9:10 86 } 87 88 bb6: { 89 goto -> bb8; // bb6[0]: scope 1 at $DIR/issue-41888.rs:9:19: 9:20 90 } 91 92 bb7 (cleanup): { 93 goto -> bb3; // bb7[0]: scope 1 at $DIR/issue-41888.rs:9:19: 9:20 94 } 95 96 bb8: { 97 StorageDead(_3); // bb8[0]: scope 1 at $DIR/issue-41888.rs:9:19: 9:20 98 _5 = discriminant(_1); // bb8[1]: scope 1 at $DIR/issue-41888.rs:10:16: 10:24 99 switchInt(move _5) -> [0isize: bb10, otherwise: bb9]; // bb8[2]: scope 1 at $DIR/issue-41888.rs:10:16: 10:24 100 } 101 102 bb9: { 103 _0 = const (); // bb9[0]: scope 1 at $DIR/issue-41888.rs:10:9: 13:10 104 // ty::Const 105 // + ty: () 106 // + val: Value(Scalar(<ZST>)) 107 // mir::Constant 108 // + span: $DIR/issue-41888.rs:10:9: 13:10 109 // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) } 110 goto -> bb11; // bb9[1]: scope 1 at $DIR/issue-41888.rs:10:9: 13:10 111 } 112 113 bb10: { 114 StorageLive(_6); // bb10[0]: scope 1 at $DIR/issue-41888.rs:10:21: 10:23 115 _9 = const false; // bb10[1]: scope 1 at $DIR/issue-41888.rs:10:21: 10:23 116 // ty::Const 117 // + ty: bool 118 // + val: Value(Scalar(0x00)) 119 // mir::Constant 120 // + span: $DIR/issue-41888.rs:10:21: 10:23 121 // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } 122 _6 = move ((_1 as F).0: K); // bb10[2]: scope 1 at $DIR/issue-41888.rs:10:21: 10:23 123 _0 = const (); // bb10[3]: scope 2 at $DIR/issue-41888.rs:10:29: 13:10 124 // ty::Const 125 // + ty: () 126 // + val: Value(Scalar(<ZST>)) 127 // mir::Constant 128 // + span: $DIR/issue-41888.rs:10:29: 13:10 129 // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) } 130 StorageDead(_6); // bb10[4]: scope 1 at $DIR/issue-41888.rs:13:9: 13:10 131 goto -> bb11; // bb10[5]: scope 1 at $DIR/issue-41888.rs:10:9: 13:10 132 } 133 134 bb11: { 135 goto -> bb21; // bb11[0]: scope 0 at $DIR/issue-41888.rs:15:1: 15:2 136 } 137 138 bb12: { 139 _7 = const false; // bb12[0]: scope 0 at $DIR/issue-41888.rs:15:1: 15:2 140 // ty::Const 141 // + ty: bool 142 // + val: Value(Scalar(0x00)) 143 // mir::Constant 144 // + span: $DIR/issue-41888.rs:15:1: 15:2 145 // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } 146 _8 = const false; // bb12[1]: scope 0 at $DIR/issue-41888.rs:15:1: 15:2 147 // ty::Const 148 // + ty: bool 149 // + val: Value(Scalar(0x00)) 150 // mir::Constant 151 // + span: $DIR/issue-41888.rs:15:1: 15:2 152 // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } 153 _9 = const false; // bb12[2]: scope 0 at $DIR/issue-41888.rs:15:1: 15:2 154 // ty::Const 155 // + ty: bool 156 // + val: Value(Scalar(0x00)) 157 // mir::Constant 158 // + span: $DIR/issue-41888.rs:15:1: 15:2 159 // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } 160 StorageDead(_1); // bb12[3]: scope 0 at $DIR/issue-41888.rs:15:1: 15:2 161 StorageDead(_2); // bb12[4]: scope 0 at $DIR/issue-41888.rs:15:1: 15:2 162 return; // bb12[5]: scope 0 at $DIR/issue-41888.rs:15:2: 15:2 163 } 164 165 bb13 (cleanup): { 166 _7 = const true; // bb13[0]: scope 1 at $DIR/issue-41888.rs:9:9: 9:10 167 // ty::Const 168 // + ty: bool 169 // + val: Value(Scalar(0x01)) 170 // mir::Constant 171 // + span: $DIR/issue-41888.rs:9:9: 9:10 172 // + literal: Const { ty: bool, val: Value(Scalar(0x01)) } 173 _8 = const true; // bb13[1]: scope 1 at $DIR/issue-41888.rs:9:9: 9:10 174 // ty::Const 175 // + ty: bool 176 // + val: Value(Scalar(0x01)) 177 // mir::Constant 178 // + span: $DIR/issue-41888.rs:9:9: 9:10 179 // + literal: Const { ty: bool, val: Value(Scalar(0x01)) } 180 _9 = const true; // bb13[2]: scope 1 at $DIR/issue-41888.rs:9:9: 9:10 181 // ty::Const 182 // + ty: bool 183 // + val: Value(Scalar(0x01)) 184 // mir::Constant 185 // + span: $DIR/issue-41888.rs:9:9: 9:10 186 // + literal: Const { ty: bool, val: Value(Scalar(0x01)) } 187 _1 = move _3; // bb13[3]: scope 1 at $DIR/issue-41888.rs:9:9: 9:10 188 goto -> bb7; // bb13[4]: scope 1 at $DIR/issue-41888.rs:9:9: 9:10 189 } 190 191 bb14: { 192 _7 = const true; // bb14[0]: scope 1 at $DIR/issue-41888.rs:9:9: 9:10 193 // ty::Const 194 // + ty: bool 195 // + val: Value(Scalar(0x01)) 196 // mir::Constant 197 // + span: $DIR/issue-41888.rs:9:9: 9:10 198 // + literal: Const { ty: bool, val: Value(Scalar(0x01)) } 199 _8 = const true; // bb14[1]: scope 1 at $DIR/issue-41888.rs:9:9: 9:10 200 // ty::Const 201 // + ty: bool 202 // + val: Value(Scalar(0x01)) 203 // mir::Constant 204 // + span: $DIR/issue-41888.rs:9:9: 9:10 205 // + literal: Const { ty: bool, val: Value(Scalar(0x01)) } 206 _9 = const true; // bb14[2]: scope 1 at $DIR/issue-41888.rs:9:9: 9:10 207 // ty::Const 208 // + ty: bool 209 // + val: Value(Scalar(0x01)) 210 // mir::Constant 211 // + span: $DIR/issue-41888.rs:9:9: 9:10 212 // + literal: Const { ty: bool, val: Value(Scalar(0x01)) } 213 _1 = move _3; // bb14[3]: scope 1 at $DIR/issue-41888.rs:9:9: 9:10 214 goto -> bb6; // bb14[4]: scope 1 at $DIR/issue-41888.rs:9:9: 9:10 215 } 216 217 bb15: { 218 _7 = const false; // bb15[0]: scope 0 at $DIR/issue-41888.rs:15:1: 15:2 219 // ty::Const 220 // + ty: bool 221 // + val: Value(Scalar(0x00)) 222 // mir::Constant 223 // + span: $DIR/issue-41888.rs:15:1: 15:2 224 // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } 225 goto -> bb12; // bb15[1]: scope 0 at $DIR/issue-41888.rs:15:1: 15:2 226 } 227 228 bb16 (cleanup): { 229 _7 = const false; // bb16[0]: scope 0 at $DIR/issue-41888.rs:15:1: 15:2 230 // ty::Const 231 // + ty: bool 232 // + val: Value(Scalar(0x00)) 233 // mir::Constant 234 // + span: $DIR/issue-41888.rs:15:1: 15:2 235 // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } 236 goto -> bb1; // bb16[1]: scope 0 at $DIR/issue-41888.rs:15:1: 15:2 237 } 238 239 bb17 (cleanup): { 240 goto -> bb16; // bb17[0]: scope 0 at $DIR/issue-41888.rs:15:1: 15:2 241 } 242 243 bb18: { 244 drop(_1) -> [return: bb15, unwind: bb16]; // bb18[0]: scope 0 at $DIR/issue-41888.rs:15:1: 15:2 245 } 246 247 bb19 (cleanup): { 248 drop(_1) -> bb16; // bb19[0]: scope 0 at $DIR/issue-41888.rs:15:1: 15:2 249 } 250 251 bb20: { 252 _10 = discriminant(_1); // bb20[0]: scope 0 at $DIR/issue-41888.rs:15:1: 15:2 253 switchInt(move _10) -> [0isize: bb15, otherwise: bb18]; // bb20[1]: scope 0 at $DIR/issue-41888.rs:15:1: 15:2 254 } 255 256 bb21: { 257 switchInt(_7) -> [false: bb15, otherwise: bb20]; // bb21[0]: scope 0 at $DIR/issue-41888.rs:15:1: 15:2 258 } 259 260 bb22 (cleanup): { 261 _11 = discriminant(_1); // bb22[0]: scope 0 at $DIR/issue-41888.rs:15:1: 15:2 262 switchInt(move _11) -> [0isize: bb17, otherwise: bb19]; // bb22[1]: scope 0 at $DIR/issue-41888.rs:15:1: 15:2 263 } 264 265 bb23 (cleanup): { 266 switchInt(_7) -> [false: bb16, otherwise: bb22]; // bb23[0]: scope 0 at $DIR/issue-41888.rs:15:1: 15:2 267 } 268}