fork/rust
git clone https://git.julia.blue/fork/rust
49cae55760d
1.44.0
1// MIR for `main` before PromoteTemps 2 3fn main() -> () { 4 let mut _0: (); // return place in scope 0 at $DIR/match_false_edges.rs:34:11: 34:11 5 let mut _1: i32; // in scope 0 at $DIR/match_false_edges.rs:35:13: 40:6 6 let mut _2: std::option::Option<i32>; // in scope 0 at $DIR/match_false_edges.rs:35:19: 35:26 7 let mut _3: isize; // in scope 0 at $DIR/match_false_edges.rs:38:9: 38:16 8 let mut _4: isize; // in scope 0 at $DIR/match_false_edges.rs:36:9: 36:17 9 let mut _5: &std::option::Option<i32>; // in scope 0 at $DIR/match_false_edges.rs:35:19: 35:26 10 let _6: i32; // in scope 0 at $DIR/match_false_edges.rs:36:14: 36:16 11 let _7: &i32; // in scope 0 at $DIR/match_false_edges.rs:36:14: 36:16 12 let mut _8: bool; // in scope 0 at $DIR/match_false_edges.rs:36:21: 36:28 13 let _9: std::option::Option<i32>; // in scope 0 at $DIR/match_false_edges.rs:37:9: 37:11 14 let _10: i32; // in scope 0 at $DIR/match_false_edges.rs:38:14: 38:15 15 let _11: &i32; // in scope 0 at $DIR/match_false_edges.rs:38:14: 38:15 16 let mut _12: bool; // in scope 0 at $DIR/match_false_edges.rs:38:20: 38:29 17 let mut _13: i32; // in scope 0 at $DIR/match_false_edges.rs:38:27: 38:28 18 let _14: std::option::Option<i32>; // in scope 0 at $DIR/match_false_edges.rs:39:9: 39:11 19 scope 1 { 20 } 21 scope 2 { 22 debug _w => _6; // in scope 2 at $DIR/match_false_edges.rs:36:14: 36:16 23 debug _w => _7; // in scope 2 at $DIR/match_false_edges.rs:36:14: 36:16 24 } 25 scope 3 { 26 debug _x => _9; // in scope 3 at $DIR/match_false_edges.rs:37:9: 37:11 27 } 28 scope 4 { 29 debug y => _10; // in scope 4 at $DIR/match_false_edges.rs:38:14: 38:15 30 debug y => _11; // in scope 4 at $DIR/match_false_edges.rs:38:14: 38:15 31 } 32 scope 5 { 33 debug _z => _14; // in scope 5 at $DIR/match_false_edges.rs:39:9: 39:11 34 } 35 36 bb0: { 37 StorageLive(_1); // bb0[0]: scope 0 at $DIR/match_false_edges.rs:35:13: 40:6 38 StorageLive(_2); // bb0[1]: scope 0 at $DIR/match_false_edges.rs:35:19: 35:26 39 _2 = std::option::Option::<i32>::Some(const 1i32); // bb0[2]: scope 0 at $DIR/match_false_edges.rs:35:19: 35:26 40 // ty::Const 41 // + ty: i32 42 // + val: Value(Scalar(0x00000001)) 43 // mir::Constant 44 // + span: $DIR/match_false_edges.rs:35:24: 35:25 45 // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) } 46 FakeRead(ForMatchedPlace, _2); // bb0[3]: scope 0 at $DIR/match_false_edges.rs:35:19: 35:26 47 _4 = discriminant(_2); // bb0[4]: scope 0 at $DIR/match_false_edges.rs:36:9: 36:17 48 switchInt(move _4) -> [1isize: bb3, otherwise: bb2]; // bb0[5]: scope 0 at $DIR/match_false_edges.rs:36:9: 36:17 49 } 50 51 bb1 (cleanup): { 52 resume; // bb1[0]: scope 0 at $DIR/match_false_edges.rs:34:1: 41:2 53 } 54 55 bb2: { 56 falseEdges -> [real: bb10, imaginary: bb5]; // bb2[0]: scope 0 at $DIR/match_false_edges.rs:37:9: 37:11 57 } 58 59 bb3: { 60 falseEdges -> [real: bb6, imaginary: bb2]; // bb3[0]: scope 0 at $DIR/match_false_edges.rs:36:9: 36:17 61 } 62 63 bb4: { 64 StorageLive(_14); // bb4[0]: scope 0 at $DIR/match_false_edges.rs:39:9: 39:11 65 _14 = _2; // bb4[1]: scope 0 at $DIR/match_false_edges.rs:39:9: 39:11 66 _1 = const 4i32; // bb4[2]: scope 5 at $DIR/match_false_edges.rs:39:15: 39:16 67 // ty::Const 68 // + ty: i32 69 // + val: Value(Scalar(0x00000004)) 70 // mir::Constant 71 // + span: $DIR/match_false_edges.rs:39:15: 39:16 72 // + literal: Const { ty: i32, val: Value(Scalar(0x00000004)) } 73 StorageDead(_14); // bb4[3]: scope 0 at $DIR/match_false_edges.rs:39:16: 39:17 74 goto -> bb15; // bb4[4]: scope 0 at $DIR/match_false_edges.rs:35:13: 40:6 75 } 76 77 bb5: { 78 falseEdges -> [real: bb11, imaginary: bb4]; // bb5[0]: scope 0 at $DIR/match_false_edges.rs:38:9: 38:16 79 } 80 81 bb6: { 82 StorageLive(_7); // bb6[0]: scope 0 at $DIR/match_false_edges.rs:36:14: 36:16 83 _7 = &((_2 as Some).0: i32); // bb6[1]: scope 0 at $DIR/match_false_edges.rs:36:14: 36:16 84 _5 = &shallow _2; // bb6[2]: scope 0 at $DIR/match_false_edges.rs:35:19: 35:26 85 StorageLive(_8); // bb6[3]: scope 0 at $DIR/match_false_edges.rs:36:21: 36:28 86 _8 = const guard() -> [return: bb7, unwind: bb1]; // bb6[4]: scope 0 at $DIR/match_false_edges.rs:36:21: 36:28 87 // ty::Const 88 // + ty: fn() -> bool {guard} 89 // + val: Value(Scalar(<ZST>)) 90 // mir::Constant 91 // + span: $DIR/match_false_edges.rs:36:21: 36:26 92 // + literal: Const { ty: fn() -> bool {guard}, val: Value(Scalar(<ZST>)) } 93 } 94 95 bb7: { 96 switchInt(move _8) -> [false: bb9, otherwise: bb8]; // bb7[0]: scope 0 at $DIR/match_false_edges.rs:36:21: 36:28 97 } 98 99 bb8: { 100 StorageDead(_8); // bb8[0]: scope 0 at $DIR/match_false_edges.rs:36:33: 36:34 101 FakeRead(ForMatchGuard, _5); // bb8[1]: scope 0 at $DIR/match_false_edges.rs:36:27: 36:28 102 FakeRead(ForGuardBinding, _7); // bb8[2]: scope 0 at $DIR/match_false_edges.rs:36:27: 36:28 103 StorageLive(_6); // bb8[3]: scope 0 at $DIR/match_false_edges.rs:36:14: 36:16 104 _6 = ((_2 as Some).0: i32); // bb8[4]: scope 0 at $DIR/match_false_edges.rs:36:14: 36:16 105 _1 = const 1i32; // bb8[5]: scope 2 at $DIR/match_false_edges.rs:36:32: 36:33 106 // ty::Const 107 // + ty: i32 108 // + val: Value(Scalar(0x00000001)) 109 // mir::Constant 110 // + span: $DIR/match_false_edges.rs:36:32: 36:33 111 // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) } 112 StorageDead(_6); // bb8[6]: scope 0 at $DIR/match_false_edges.rs:36:33: 36:34 113 StorageDead(_7); // bb8[7]: scope 0 at $DIR/match_false_edges.rs:36:33: 36:34 114 goto -> bb15; // bb8[8]: scope 0 at $DIR/match_false_edges.rs:35:13: 40:6 115 } 116 117 bb9: { 118 StorageDead(_8); // bb9[0]: scope 0 at $DIR/match_false_edges.rs:36:33: 36:34 119 StorageDead(_7); // bb9[1]: scope 0 at $DIR/match_false_edges.rs:36:33: 36:34 120 falseEdges -> [real: bb2, imaginary: bb2]; // bb9[2]: scope 0 at $DIR/match_false_edges.rs:36:21: 36:28 121 } 122 123 bb10: { 124 StorageLive(_9); // bb10[0]: scope 0 at $DIR/match_false_edges.rs:37:9: 37:11 125 _9 = _2; // bb10[1]: scope 0 at $DIR/match_false_edges.rs:37:9: 37:11 126 _1 = const 2i32; // bb10[2]: scope 3 at $DIR/match_false_edges.rs:37:15: 37:16 127 // ty::Const 128 // + ty: i32 129 // + val: Value(Scalar(0x00000002)) 130 // mir::Constant 131 // + span: $DIR/match_false_edges.rs:37:15: 37:16 132 // + literal: Const { ty: i32, val: Value(Scalar(0x00000002)) } 133 StorageDead(_9); // bb10[3]: scope 0 at $DIR/match_false_edges.rs:37:16: 37:17 134 goto -> bb15; // bb10[4]: scope 0 at $DIR/match_false_edges.rs:35:13: 40:6 135 } 136 137 bb11: { 138 StorageLive(_11); // bb11[0]: scope 0 at $DIR/match_false_edges.rs:38:14: 38:15 139 _11 = &((_2 as Some).0: i32); // bb11[1]: scope 0 at $DIR/match_false_edges.rs:38:14: 38:15 140 _5 = &shallow _2; // bb11[2]: scope 0 at $DIR/match_false_edges.rs:35:19: 35:26 141 StorageLive(_12); // bb11[3]: scope 0 at $DIR/match_false_edges.rs:38:20: 38:29 142 StorageLive(_13); // bb11[4]: scope 0 at $DIR/match_false_edges.rs:38:27: 38:28 143 _13 = (*_11); // bb11[5]: scope 0 at $DIR/match_false_edges.rs:38:27: 38:28 144 _12 = const guard2(move _13) -> [return: bb12, unwind: bb1]; // bb11[6]: scope 0 at $DIR/match_false_edges.rs:38:20: 38:29 145 // ty::Const 146 // + ty: fn(i32) -> bool {guard2} 147 // + val: Value(Scalar(<ZST>)) 148 // mir::Constant 149 // + span: $DIR/match_false_edges.rs:38:20: 38:26 150 // + literal: Const { ty: fn(i32) -> bool {guard2}, val: Value(Scalar(<ZST>)) } 151 } 152 153 bb12: { 154 StorageDead(_13); // bb12[0]: scope 0 at $DIR/match_false_edges.rs:38:28: 38:29 155 switchInt(move _12) -> [false: bb14, otherwise: bb13]; // bb12[1]: scope 0 at $DIR/match_false_edges.rs:38:20: 38:29 156 } 157 158 bb13: { 159 StorageDead(_12); // bb13[0]: scope 0 at $DIR/match_false_edges.rs:38:34: 38:35 160 FakeRead(ForMatchGuard, _5); // bb13[1]: scope 0 at $DIR/match_false_edges.rs:38:28: 38:29 161 FakeRead(ForGuardBinding, _11); // bb13[2]: scope 0 at $DIR/match_false_edges.rs:38:28: 38:29 162 StorageLive(_10); // bb13[3]: scope 0 at $DIR/match_false_edges.rs:38:14: 38:15 163 _10 = ((_2 as Some).0: i32); // bb13[4]: scope 0 at $DIR/match_false_edges.rs:38:14: 38:15 164 _1 = const 3i32; // bb13[5]: scope 4 at $DIR/match_false_edges.rs:38:33: 38:34 165 // ty::Const 166 // + ty: i32 167 // + val: Value(Scalar(0x00000003)) 168 // mir::Constant 169 // + span: $DIR/match_false_edges.rs:38:33: 38:34 170 // + literal: Const { ty: i32, val: Value(Scalar(0x00000003)) } 171 StorageDead(_10); // bb13[6]: scope 0 at $DIR/match_false_edges.rs:38:34: 38:35 172 StorageDead(_11); // bb13[7]: scope 0 at $DIR/match_false_edges.rs:38:34: 38:35 173 goto -> bb15; // bb13[8]: scope 0 at $DIR/match_false_edges.rs:35:13: 40:6 174 } 175 176 bb14: { 177 StorageDead(_12); // bb14[0]: scope 0 at $DIR/match_false_edges.rs:38:34: 38:35 178 StorageDead(_11); // bb14[1]: scope 0 at $DIR/match_false_edges.rs:38:34: 38:35 179 falseEdges -> [real: bb4, imaginary: bb4]; // bb14[2]: scope 0 at $DIR/match_false_edges.rs:38:20: 38:29 180 } 181 182 bb15: { 183 StorageDead(_2); // bb15[0]: scope 0 at $DIR/match_false_edges.rs:40:6: 40:7 184 StorageDead(_1); // bb15[1]: scope 0 at $DIR/match_false_edges.rs:40:6: 40:7 185 _0 = const (); // bb15[2]: scope 0 at $DIR/match_false_edges.rs:34:11: 41:2 186 // ty::Const 187 // + ty: () 188 // + val: Value(Scalar(<ZST>)) 189 // mir::Constant 190 // + span: $DIR/match_false_edges.rs:34:11: 41:2 191 // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) } 192 return; // bb15[3]: scope 0 at $DIR/match_false_edges.rs:41:2: 41:2 193 } 194}