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