]> git.lizzy.rs Git - rust.git/blob - src/test/mir-opt/dest-prop/union.main.DestinationPropagation.diff
Rollup merge of #76867 - poliorcetics:intra-doc-core-iter, r=jyn514
[rust.git] / src / test / mir-opt / dest-prop / union.main.DestinationPropagation.diff
1 - // MIR for `main` before DestinationPropagation
2 + // MIR for `main` after DestinationPropagation
3   
4   fn main() -> () {
5       let mut _0: ();                      // return place in scope 0 at $DIR/union.rs:8:11: 8:11
6       let _1: main::Un;                    // in scope 0 at $DIR/union.rs:13:9: 13:11
7       let mut _2: u32;                     // in scope 0 at $DIR/union.rs:13:23: 13:28
8       let _3: ();                          // in scope 0 at $DIR/union.rs:15:5: 15:27
9       let mut _4: u32;                     // in scope 0 at $DIR/union.rs:15:10: 15:26
10       scope 1 {
11           debug un => _1;                  // in scope 1 at $DIR/union.rs:13:9: 13:11
12           scope 2 {
13           }
14           scope 3 {
15               debug _x => _4;              // in scope 3 at $SRC_DIR/core/src/mem/mod.rs:LL:COL
16           }
17       }
18   
19       bb0: {
20           StorageLive(_1);                 // scope 0 at $DIR/union.rs:13:9: 13:11
21           StorageLive(_2);                 // scope 0 at $DIR/union.rs:13:23: 13:28
22           _2 = val() -> bb1;               // scope 0 at $DIR/union.rs:13:23: 13:28
23                                            // mir::Constant
24                                            // + span: $DIR/union.rs:13:23: 13:26
25                                            // + literal: Const { ty: fn() -> u32 {val}, val: Value(Scalar(<ZST>)) }
26       }
27   
28       bb1: {
29           (_1.0: u32) = move _2;           // scope 0 at $DIR/union.rs:13:14: 13:30
30           StorageDead(_2);                 // scope 0 at $DIR/union.rs:13:29: 13:30
31           StorageLive(_3);                 // scope 1 at $DIR/union.rs:15:5: 15:27
32           StorageLive(_4);                 // scope 1 at $DIR/union.rs:15:10: 15:26
33           _4 = (_1.0: u32);                // scope 2 at $DIR/union.rs:15:19: 15:24
34           _3 = const ();                   // scope 3 at $SRC_DIR/core/src/mem/mod.rs:LL:COL
35           drop(_4) -> bb2;                 // scope 3 at $SRC_DIR/core/src/mem/mod.rs:LL:COL
36       }
37   
38       bb2: {
39           StorageDead(_4);                 // scope 1 at $DIR/union.rs:15:26: 15:27
40           StorageDead(_3);                 // scope 1 at $DIR/union.rs:15:27: 15:28
41           _0 = const ();                   // scope 0 at $DIR/union.rs:8:11: 16:2
42           StorageDead(_1);                 // scope 0 at $DIR/union.rs:16:1: 16:2
43           return;                          // scope 0 at $DIR/union.rs:16:2: 16:2
44       }
45   }
46