]> git.lizzy.rs Git - rust.git/blob - src/test/mir-opt/deaggregator_test_enum_2.test1.Deaggregator.diff
Actually fix
[rust.git] / src / test / mir-opt / deaggregator_test_enum_2.test1.Deaggregator.diff
1 - // MIR for `test1` before Deaggregator
2 + // MIR for `test1` after Deaggregator
3   
4   fn test1(_1: bool, _2: i32) -> Foo {
5       debug x => _1;                       // in scope 0 at $DIR/deaggregator_test_enum_2.rs:9:10: 9:11
6       debug y => _2;                       // in scope 0 at $DIR/deaggregator_test_enum_2.rs:9:19: 9:20
7       let mut _0: Foo;                     // return place in scope 0 at $DIR/deaggregator_test_enum_2.rs:9:30: 9:33
8       let mut _3: bool;                    // in scope 0 at $DIR/deaggregator_test_enum_2.rs:10:8: 10:9
9       let mut _4: i32;                     // in scope 0 at $DIR/deaggregator_test_enum_2.rs:11:16: 11:17
10       let mut _5: i32;                     // in scope 0 at $DIR/deaggregator_test_enum_2.rs:13:16: 13:17
11       scope 1 {
12       }
13   
14       bb0: {
15           StorageLive(_3);                 // scope 1 at $DIR/deaggregator_test_enum_2.rs:10:8: 10:9
16           _3 = _1;                         // scope 1 at $DIR/deaggregator_test_enum_2.rs:10:8: 10:9
17           switchInt(move _3) -> [false: bb2, otherwise: bb1]; // scope 1 at $DIR/deaggregator_test_enum_2.rs:10:8: 10:9
18       }
19   
20       bb1: {
21           StorageLive(_4);                 // scope 1 at $DIR/deaggregator_test_enum_2.rs:11:16: 11:17
22           _4 = _2;                         // scope 1 at $DIR/deaggregator_test_enum_2.rs:11:16: 11:17
23 -         _0 = Foo::A(move _4);            // scope 1 at $DIR/deaggregator_test_enum_2.rs:11:9: 11:18
24 +         Deinit(_0);                      // scope 1 at $DIR/deaggregator_test_enum_2.rs:11:9: 11:18
25 +         ((_0 as A).0: i32) = move _4;    // scope 1 at $DIR/deaggregator_test_enum_2.rs:11:9: 11:18
26 +         discriminant(_0) = 0;            // scope 1 at $DIR/deaggregator_test_enum_2.rs:11:9: 11:18
27           StorageDead(_4);                 // scope 1 at $DIR/deaggregator_test_enum_2.rs:11:17: 11:18
28           goto -> bb3;                     // scope 0 at $DIR/deaggregator_test_enum_2.rs:10:5: 14:6
29       }
30   
31       bb2: {
32           StorageLive(_5);                 // scope 0 at $DIR/deaggregator_test_enum_2.rs:13:16: 13:17
33           _5 = _2;                         // scope 0 at $DIR/deaggregator_test_enum_2.rs:13:16: 13:17
34 -         _0 = Foo::B(move _5);            // scope 0 at $DIR/deaggregator_test_enum_2.rs:13:9: 13:18
35 +         Deinit(_0);                      // scope 0 at $DIR/deaggregator_test_enum_2.rs:13:9: 13:18
36 +         ((_0 as B).0: i32) = move _5;    // scope 0 at $DIR/deaggregator_test_enum_2.rs:13:9: 13:18
37 +         discriminant(_0) = 1;            // scope 0 at $DIR/deaggregator_test_enum_2.rs:13:9: 13:18
38           StorageDead(_5);                 // scope 0 at $DIR/deaggregator_test_enum_2.rs:13:17: 13:18
39           goto -> bb3;                     // scope 0 at $DIR/deaggregator_test_enum_2.rs:10:5: 14:6
40       }
41   
42       bb3: {
43           StorageDead(_3);                 // scope 0 at $DIR/deaggregator_test_enum_2.rs:14:5: 14:6
44           return;                          // scope 0 at $DIR/deaggregator_test_enum_2.rs:15:2: 15:2
45       }
46   }
47