fork/rust
git clone https://git.julia.blue/fork/rust
49cae55760d
1.44.0
1// MIR for `main` after SimplifyCfg-after-uninhabited-enum-branching 2 3fn main() -> () { 4 let mut _0: (); // return place in scope 0 at $DIR/uninhabited_enum_branching.rs:19:11: 19:11 5 let _1: &str; // in scope 0 at $DIR/uninhabited_enum_branching.rs:20:5: 24:6 6 let mut _2: Test1; // in scope 0 at $DIR/uninhabited_enum_branching.rs:20:11: 20:19 7 let mut _3: isize; // in scope 0 at $DIR/uninhabited_enum_branching.rs:21:9: 21:20 8 let _4: &str; // in scope 0 at $DIR/uninhabited_enum_branching.rs:22:24: 22:34 9 let _5: &str; // in scope 0 at $DIR/uninhabited_enum_branching.rs:23:21: 23:24 10 let _6: &str; // in scope 0 at $DIR/uninhabited_enum_branching.rs:26:5: 29:6 11 let mut _7: Test2; // in scope 0 at $DIR/uninhabited_enum_branching.rs:26:11: 26:19 12 let mut _8: isize; // in scope 0 at $DIR/uninhabited_enum_branching.rs:27:9: 27:17 13 let _9: &str; // in scope 0 at $DIR/uninhabited_enum_branching.rs:28:21: 28:24 14 15 bb0: { 16 StorageLive(_1); // bb0[0]: scope 0 at $DIR/uninhabited_enum_branching.rs:20:5: 24:6 17 StorageLive(_2); // bb0[1]: scope 0 at $DIR/uninhabited_enum_branching.rs:20:11: 20:19 18 _2 = Test1::C; // bb0[2]: scope 0 at $DIR/uninhabited_enum_branching.rs:20:11: 20:19 19 _3 = discriminant(_2); // bb0[3]: scope 0 at $DIR/uninhabited_enum_branching.rs:21:9: 21:20 20 StorageLive(_5); // bb0[4]: scope 0 at $DIR/uninhabited_enum_branching.rs:23:21: 23:24 21 _5 = const "C"; // bb0[5]: scope 0 at $DIR/uninhabited_enum_branching.rs:23:21: 23:24 22 // ty::Const 23 // + ty: &str 24 // + val: Value(Slice { data: Allocation { bytes: [67], relocations: Relocations(SortedMap { data: [] }), undef_mask: UndefMask { blocks: [1], len: Size { raw: 1 } }, size: Size { raw: 1 }, align: Align { pow2: 0 }, mutability: Not, extra: () }, start: 0, end: 1 }) 25 // mir::Constant 26 // + span: $DIR/uninhabited_enum_branching.rs:23:21: 23:24 27 // + literal: Const { ty: &str, val: Value(Slice { data: Allocation { bytes: [67], relocations: Relocations(SortedMap { data: [] }), undef_mask: UndefMask { blocks: [1], len: Size { raw: 1 } }, size: Size { raw: 1 }, align: Align { pow2: 0 }, mutability: Not, extra: () }, start: 0, end: 1 }) } 28 _1 = &(*_5); // bb0[6]: scope 0 at $DIR/uninhabited_enum_branching.rs:23:21: 23:24 29 StorageDead(_5); // bb0[7]: scope 0 at $DIR/uninhabited_enum_branching.rs:23:23: 23:24 30 StorageDead(_2); // bb0[8]: scope 0 at $DIR/uninhabited_enum_branching.rs:24:6: 24:7 31 StorageDead(_1); // bb0[9]: scope 0 at $DIR/uninhabited_enum_branching.rs:24:6: 24:7 32 StorageLive(_6); // bb0[10]: scope 0 at $DIR/uninhabited_enum_branching.rs:26:5: 29:6 33 StorageLive(_7); // bb0[11]: scope 0 at $DIR/uninhabited_enum_branching.rs:26:11: 26:19 34 _7 = Test2::D; // bb0[12]: scope 0 at $DIR/uninhabited_enum_branching.rs:26:11: 26:19 35 _8 = discriminant(_7); // bb0[13]: scope 0 at $DIR/uninhabited_enum_branching.rs:27:9: 27:17 36 switchInt(move _8) -> [4isize: bb2, otherwise: bb1]; // bb0[14]: scope 0 at $DIR/uninhabited_enum_branching.rs:27:9: 27:17 37 } 38 39 bb1: { 40 StorageLive(_9); // bb1[0]: scope 0 at $DIR/uninhabited_enum_branching.rs:28:21: 28:24 41 _9 = const "E"; // bb1[1]: scope 0 at $DIR/uninhabited_enum_branching.rs:28:21: 28:24 42 // ty::Const 43 // + ty: &str 44 // + val: Value(Slice { data: Allocation { bytes: [69], relocations: Relocations(SortedMap { data: [] }), undef_mask: UndefMask { blocks: [1], len: Size { raw: 1 } }, size: Size { raw: 1 }, align: Align { pow2: 0 }, mutability: Not, extra: () }, start: 0, end: 1 }) 45 // mir::Constant 46 // + span: $DIR/uninhabited_enum_branching.rs:28:21: 28:24 47 // + literal: Const { ty: &str, val: Value(Slice { data: Allocation { bytes: [69], relocations: Relocations(SortedMap { data: [] }), undef_mask: UndefMask { blocks: [1], len: Size { raw: 1 } }, size: Size { raw: 1 }, align: Align { pow2: 0 }, mutability: Not, extra: () }, start: 0, end: 1 }) } 48 _6 = &(*_9); // bb1[2]: scope 0 at $DIR/uninhabited_enum_branching.rs:28:21: 28:24 49 StorageDead(_9); // bb1[3]: scope 0 at $DIR/uninhabited_enum_branching.rs:28:23: 28:24 50 goto -> bb3; // bb1[4]: scope 0 at $DIR/uninhabited_enum_branching.rs:26:5: 29:6 51 } 52 53 bb2: { 54 _6 = const "D"; // bb2[0]: scope 0 at $DIR/uninhabited_enum_branching.rs:27:21: 27:24 55 // ty::Const 56 // + ty: &str 57 // + val: Value(Slice { data: Allocation { bytes: [68], relocations: Relocations(SortedMap { data: [] }), undef_mask: UndefMask { blocks: [1], len: Size { raw: 1 } }, size: Size { raw: 1 }, align: Align { pow2: 0 }, mutability: Not, extra: () }, start: 0, end: 1 }) 58 // mir::Constant 59 // + span: $DIR/uninhabited_enum_branching.rs:27:21: 27:24 60 // + literal: Const { ty: &str, val: Value(Slice { data: Allocation { bytes: [68], relocations: Relocations(SortedMap { data: [] }), undef_mask: UndefMask { blocks: [1], len: Size { raw: 1 } }, size: Size { raw: 1 }, align: Align { pow2: 0 }, mutability: Not, extra: () }, start: 0, end: 1 }) } 61 goto -> bb3; // bb2[1]: scope 0 at $DIR/uninhabited_enum_branching.rs:26:5: 29:6 62 } 63 64 bb3: { 65 StorageDead(_7); // bb3[0]: scope 0 at $DIR/uninhabited_enum_branching.rs:29:6: 29:7 66 StorageDead(_6); // bb3[1]: scope 0 at $DIR/uninhabited_enum_branching.rs:29:6: 29:7 67 _0 = const (); // bb3[2]: scope 0 at $DIR/uninhabited_enum_branching.rs:19:11: 30:2 68 // ty::Const 69 // + ty: () 70 // + val: Value(Scalar(<ZST>)) 71 // mir::Constant 72 // + span: $DIR/uninhabited_enum_branching.rs:19:11: 30:2 73 // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) } 74 return; // bb3[3]: scope 0 at $DIR/uninhabited_enum_branching.rs:30:2: 30:2 75 } 76}