summaryrefslogtreecommitdiffstats
path: root/src/test/mir-opt/uninhabited_enum_branching2.main.UninhabitedEnumBranching.diff
blob: 77b358a4801e5b7870c8f3424f87270325d03bee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
- // MIR for `main` before UninhabitedEnumBranching
+ // MIR for `main` after UninhabitedEnumBranching
  
  fn main() -> () {
      let mut _0: ();                      // return place in scope 0 at $DIR/uninhabited_enum_branching2.rs:+0:11: +0:11
      let _1: Plop;                        // in scope 0 at $DIR/uninhabited_enum_branching2.rs:+1:9: +1:13
      let mut _2: Test1;                   // in scope 0 at $DIR/uninhabited_enum_branching2.rs:+1:38: +1:46
      let _3: &str;                        // in scope 0 at $DIR/uninhabited_enum_branching2.rs:+3:5: +8:6
      let mut _4: &Test1;                  // in scope 0 at $DIR/uninhabited_enum_branching2.rs:+3:11: +3:22
      let mut _5: isize;                   // in scope 0 at $DIR/uninhabited_enum_branching2.rs:+4:9: +4:20
      let _6: &str;                        // in scope 0 at $DIR/uninhabited_enum_branching2.rs:+5:24: +5:34
      let _7: &str;                        // in scope 0 at $DIR/uninhabited_enum_branching2.rs:+6:21: +6:24
      let _8: &str;                        // in scope 0 at $DIR/uninhabited_enum_branching2.rs:+7:21: +7:24
      let _9: &str;                        // in scope 0 at $DIR/uninhabited_enum_branching2.rs:+10:5: +15:6
      let mut _10: isize;                  // in scope 0 at $DIR/uninhabited_enum_branching2.rs:+11:9: +11:20
      let _11: &str;                       // in scope 0 at $DIR/uninhabited_enum_branching2.rs:+12:24: +12:34
      let _12: &str;                       // in scope 0 at $DIR/uninhabited_enum_branching2.rs:+13:21: +13:24
      let _13: &str;                       // in scope 0 at $DIR/uninhabited_enum_branching2.rs:+14:21: +14:24
      scope 1 {
          debug plop => _1;                // in scope 1 at $DIR/uninhabited_enum_branching2.rs:+1:9: +1:13
      }
  
      bb0: {
          StorageLive(_1);                 // scope 0 at $DIR/uninhabited_enum_branching2.rs:+1:9: +1:13
          StorageLive(_2);                 // scope 0 at $DIR/uninhabited_enum_branching2.rs:+1:38: +1:46
          Deinit(_2);                      // scope 0 at $DIR/uninhabited_enum_branching2.rs:+1:38: +1:46
          discriminant(_2) = 2;            // scope 0 at $DIR/uninhabited_enum_branching2.rs:+1:38: +1:46
          Deinit(_1);                      // scope 0 at $DIR/uninhabited_enum_branching2.rs:+1:16: +1:48
          (_1.0: u32) = const 51_u32;      // scope 0 at $DIR/uninhabited_enum_branching2.rs:+1:16: +1:48
          (_1.1: Test1) = move _2;         // scope 0 at $DIR/uninhabited_enum_branching2.rs:+1:16: +1:48
          StorageDead(_2);                 // scope 0 at $DIR/uninhabited_enum_branching2.rs:+1:47: +1:48
          StorageLive(_3);                 // scope 1 at $DIR/uninhabited_enum_branching2.rs:+3:5: +8:6
          StorageLive(_4);                 // scope 1 at $DIR/uninhabited_enum_branching2.rs:+3:11: +3:22
          _4 = &(_1.1: Test1);             // scope 1 at $DIR/uninhabited_enum_branching2.rs:+3:11: +3:22
          _5 = discriminant((*_4));        // scope 1 at $DIR/uninhabited_enum_branching2.rs:+3:11: +3:22
-         switchInt(move _5) -> [0_isize: bb3, 1_isize: bb4, 2_isize: bb5, 3_isize: bb1, otherwise: bb2]; // scope 1 at $DIR/uninhabited_enum_branching2.rs:+3:5: +3:22
+         switchInt(move _5) -> [2_isize: bb5, 3_isize: bb1, otherwise: bb2]; // scope 1 at $DIR/uninhabited_enum_branching2.rs:+3:5: +3:22
      }
  
      bb1: {
          StorageLive(_8);                 // scope 1 at $DIR/uninhabited_enum_branching2.rs:+7:21: +7:24
          _8 = const "D";                  // scope 1 at $DIR/uninhabited_enum_branching2.rs:+7:21: +7:24
                                           // mir::Constant
                                           // + span: $DIR/uninhabited_enum_branching2.rs:25:21: 25:24
                                           // + literal: Const { ty: &str, val: Value(Slice(..)) }
          _3 = &(*_8);                     // scope 1 at $DIR/uninhabited_enum_branching2.rs:+7:21: +7:24
          StorageDead(_8);                 // scope 1 at $DIR/uninhabited_enum_branching2.rs:+7:23: +7:24
          goto -> bb6;                     // scope 1 at $DIR/uninhabited_enum_branching2.rs:+7:23: +7:24
      }
  
      bb2: {
          unreachable;                     // scope 1 at $DIR/uninhabited_enum_branching2.rs:+3:11: +3:22
      }
  
      bb3: {
          _3 = const "A(Empty)";           // scope 1 at $DIR/uninhabited_enum_branching2.rs:+4:24: +4:34
                                           // mir::Constant
                                           // + span: $DIR/uninhabited_enum_branching2.rs:22:24: 22:34
                                           // + literal: Const { ty: &str, val: Value(Slice(..)) }
          goto -> bb6;                     // scope 1 at $DIR/uninhabited_enum_branching2.rs:+4:24: +4:34
      }
  
      bb4: {
          StorageLive(_6);                 // scope 1 at $DIR/uninhabited_enum_branching2.rs:+5:24: +5:34
          _6 = const "B(Empty)";           // scope 1 at $DIR/uninhabited_enum_branching2.rs:+5:24: +5:34
                                           // mir::Constant
                                           // + span: $DIR/uninhabited_enum_branching2.rs:23:24: 23:34
                                           // + literal: Const { ty: &str, val: Value(Slice(..)) }
          _3 = &(*_6);                     // scope 1 at $DIR/uninhabited_enum_branching2.rs:+5:24: +5:34
          StorageDead(_6);                 // scope 1 at $DIR/uninhabited_enum_branching2.rs:+5:33: +5:34
          goto -> bb6;                     // scope 1 at $DIR/uninhabited_enum_branching2.rs:+5:33: +5:34
      }
  
      bb5: {
          StorageLive(_7);                 // scope 1 at $DIR/uninhabited_enum_branching2.rs:+6:21: +6:24
          _7 = const "C";                  // scope 1 at $DIR/uninhabited_enum_branching2.rs:+6:21: +6:24
                                           // mir::Constant
                                           // + span: $DIR/uninhabited_enum_branching2.rs:24:21: 24:24
                                           // + literal: Const { ty: &str, val: Value(Slice(..)) }
          _3 = &(*_7);                     // scope 1 at $DIR/uninhabited_enum_branching2.rs:+6:21: +6:24
          StorageDead(_7);                 // scope 1 at $DIR/uninhabited_enum_branching2.rs:+6:23: +6:24
          goto -> bb6;                     // scope 1 at $DIR/uninhabited_enum_branching2.rs:+6:23: +6:24
      }
  
      bb6: {
          StorageDead(_4);                 // scope 1 at $DIR/uninhabited_enum_branching2.rs:+8:6: +8:7
          StorageDead(_3);                 // scope 1 at $DIR/uninhabited_enum_branching2.rs:+8:6: +8:7
          StorageLive(_9);                 // scope 1 at $DIR/uninhabited_enum_branching2.rs:+10:5: +15:6
          _10 = discriminant((_1.1: Test1)); // scope 1 at $DIR/uninhabited_enum_branching2.rs:+10:11: +10:21
-         switchInt(move _10) -> [0_isize: bb9, 1_isize: bb10, 2_isize: bb11, 3_isize: bb7, otherwise: bb8]; // scope 1 at $DIR/uninhabited_enum_branching2.rs:+10:5: +10:21
+         switchInt(move _10) -> [2_isize: bb11, 3_isize: bb7, otherwise: bb8]; // scope 1 at $DIR/uninhabited_enum_branching2.rs:+10:5: +10:21
      }
  
      bb7: {
          StorageLive(_13);                // scope 1 at $DIR/uninhabited_enum_branching2.rs:+14:21: +14:24
          _13 = const "D";                 // scope 1 at $DIR/uninhabited_enum_branching2.rs:+14:21: +14:24
                                           // mir::Constant
                                           // + span: $DIR/uninhabited_enum_branching2.rs:32:21: 32:24
                                           // + literal: Const { ty: &str, val: Value(Slice(..)) }
          _9 = &(*_13);                    // scope 1 at $DIR/uninhabited_enum_branching2.rs:+14:21: +14:24
          StorageDead(_13);                // scope 1 at $DIR/uninhabited_enum_branching2.rs:+14:23: +14:24
          goto -> bb12;                    // scope 1 at $DIR/uninhabited_enum_branching2.rs:+14:23: +14:24
      }
  
      bb8: {
          unreachable;                     // scope 1 at $DIR/uninhabited_enum_branching2.rs:+10:11: +10:21
      }
  
      bb9: {
          _9 = const "A(Empty)";           // scope 1 at $DIR/uninhabited_enum_branching2.rs:+11:24: +11:34
                                           // mir::Constant
                                           // + span: $DIR/uninhabited_enum_branching2.rs:29:24: 29:34
                                           // + literal: Const { ty: &str, val: Value(Slice(..)) }
          goto -> bb12;                    // scope 1 at $DIR/uninhabited_enum_branching2.rs:+11:24: +11:34
      }
  
      bb10: {
          StorageLive(_11);                // scope 1 at $DIR/uninhabited_enum_branching2.rs:+12:24: +12:34
          _11 = const "B(Empty)";          // scope 1 at $DIR/uninhabited_enum_branching2.rs:+12:24: +12:34
                                           // mir::Constant
                                           // + span: $DIR/uninhabited_enum_branching2.rs:30:24: 30:34
                                           // + literal: Const { ty: &str, val: Value(Slice(..)) }
          _9 = &(*_11);                    // scope 1 at $DIR/uninhabited_enum_branching2.rs:+12:24: +12:34
          StorageDead(_11);                // scope 1 at $DIR/uninhabited_enum_branching2.rs:+12:33: +12:34
          goto -> bb12;                    // scope 1 at $DIR/uninhabited_enum_branching2.rs:+12:33: +12:34
      }
  
      bb11: {
          StorageLive(_12);                // scope 1 at $DIR/uninhabited_enum_branching2.rs:+13:21: +13:24
          _12 = const "C";                 // scope 1 at $DIR/uninhabited_enum_branching2.rs:+13:21: +13:24
                                           // mir::Constant
                                           // + span: $DIR/uninhabited_enum_branching2.rs:31:21: 31:24
                                           // + literal: Const { ty: &str, val: Value(Slice(..)) }
          _9 = &(*_12);                    // scope 1 at $DIR/uninhabited_enum_branching2.rs:+13:21: +13:24
          StorageDead(_12);                // scope 1 at $DIR/uninhabited_enum_branching2.rs:+13:23: +13:24
          goto -> bb12;                    // scope 1 at $DIR/uninhabited_enum_branching2.rs:+13:23: +13:24
      }
  
      bb12: {
          StorageDead(_9);                 // scope 1 at $DIR/uninhabited_enum_branching2.rs:+15:6: +15:7
          _0 = const ();                   // scope 0 at $DIR/uninhabited_enum_branching2.rs:+0:11: +16:2
          StorageDead(_1);                 // scope 0 at $DIR/uninhabited_enum_branching2.rs:+16:1: +16:2
          return;                          // scope 0 at $DIR/uninhabited_enum_branching2.rs:+16:2: +16:2
      }
  }