]> git.lizzy.rs Git - rust.git/blob - src/test/mir-opt/uninhabited_enum_branching.main.SimplifyCfg-after-uninhabited-enum-branching.after.mir
Merge commit '54a20a02ecd0e1352a871aa0990bcc8b8b03173e' into clippyup
[rust.git] / src / test / mir-opt / uninhabited_enum_branching.main.SimplifyCfg-after-uninhabited-enum-branching.after.mir
1 // MIR for `main` after SimplifyCfg-after-uninhabited-enum-branching
2
3 fn 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);                 // scope 0 at $DIR/uninhabited_enum_branching.rs:20:5: 24:6
17         StorageLive(_2);                 // scope 0 at $DIR/uninhabited_enum_branching.rs:20:11: 20:19
18         discriminant(_2) = 2;            // scope 0 at $DIR/uninhabited_enum_branching.rs:20:11: 20:19
19         _3 = discriminant(_2);           // scope 0 at $DIR/uninhabited_enum_branching.rs:21:9: 21:20
20         StorageLive(_5);                 // scope 0 at $DIR/uninhabited_enum_branching.rs:23:21: 23:24
21         _5 = const "C";                  // 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: [] }), init_mask: InitMask { blocks: [1], len: 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: [] }), init_mask: InitMask { blocks: [1], len: Size { raw: 1 } }, align: Align { pow2: 0 }, mutability: Not, extra: () }, start: 0, end: 1 }) }
28         _1 = &(*_5);                     // scope 0 at $DIR/uninhabited_enum_branching.rs:23:21: 23:24
29         StorageDead(_5);                 // scope 0 at $DIR/uninhabited_enum_branching.rs:23:23: 23:24
30         StorageDead(_2);                 // scope 0 at $DIR/uninhabited_enum_branching.rs:24:6: 24:7
31         StorageDead(_1);                 // scope 0 at $DIR/uninhabited_enum_branching.rs:24:6: 24:7
32         StorageLive(_6);                 // scope 0 at $DIR/uninhabited_enum_branching.rs:26:5: 29:6
33         StorageLive(_7);                 // scope 0 at $DIR/uninhabited_enum_branching.rs:26:11: 26:19
34         discriminant(_7) = 0;            // scope 0 at $DIR/uninhabited_enum_branching.rs:26:11: 26:19
35         _8 = discriminant(_7);           // scope 0 at $DIR/uninhabited_enum_branching.rs:27:9: 27:17
36         switchInt(move _8) -> [4_isize: bb2, otherwise: bb1]; // scope 0 at $DIR/uninhabited_enum_branching.rs:27:9: 27:17
37     }
38
39     bb1: {
40         StorageLive(_9);                 // scope 0 at $DIR/uninhabited_enum_branching.rs:28:21: 28:24
41         _9 = const "E";                  // 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: [] }), init_mask: InitMask { blocks: [1], len: 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: [] }), init_mask: InitMask { blocks: [1], len: Size { raw: 1 } }, align: Align { pow2: 0 }, mutability: Not, extra: () }, start: 0, end: 1 }) }
48         _6 = &(*_9);                     // scope 0 at $DIR/uninhabited_enum_branching.rs:28:21: 28:24
49         StorageDead(_9);                 // scope 0 at $DIR/uninhabited_enum_branching.rs:28:23: 28:24
50         goto -> bb3;                     // scope 0 at $DIR/uninhabited_enum_branching.rs:26:5: 29:6
51     }
52
53     bb2: {
54         _6 = const "D";                  // 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: [] }), init_mask: InitMask { blocks: [1], len: 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: [] }), init_mask: InitMask { blocks: [1], len: Size { raw: 1 } }, align: Align { pow2: 0 }, mutability: Not, extra: () }, start: 0, end: 1 }) }
61         goto -> bb3;                     // scope 0 at $DIR/uninhabited_enum_branching.rs:26:5: 29:6
62     }
63
64     bb3: {
65         StorageDead(_7);                 // scope 0 at $DIR/uninhabited_enum_branching.rs:29:6: 29:7
66         StorageDead(_6);                 // scope 0 at $DIR/uninhabited_enum_branching.rs:29:6: 29:7
67         _0 = const ();                   // scope 0 at $DIR/uninhabited_enum_branching.rs:19:11: 30:2
68         return;                          // scope 0 at $DIR/uninhabited_enum_branching.rs:30:2: 30:2
69     }
70 }