]> git.lizzy.rs Git - rust.git/blob - tests/mir-opt/simplify_locals.r.SimplifyLocals-before-const-prop.diff
Rollup merge of #105172 - alexs-sh:issue-98861-fix-next, r=scottmcm
[rust.git] / tests / mir-opt / simplify_locals.r.SimplifyLocals-before-const-prop.diff
1 - // MIR for `r` before SimplifyLocals-before-const-prop
2 + // MIR for `r` after SimplifyLocals-before-const-prop
3   
4   fn r() -> () {
5       let mut _0: ();                      // return place in scope 0 at $DIR/simplify_locals.rs:+0:8: +0:8
6       let mut _1: i32;                     // in scope 0 at $DIR/simplify_locals.rs:+1:9: +1:14
7 -     let mut _2: &i32;                    // in scope 0 at $DIR/simplify_locals.rs:+3:13: +3:15
8 -     let mut _3: &mut i32;                // in scope 0 at $DIR/simplify_locals.rs:+4:13: +4:19
9       scope 1 {
10           debug a => _1;                   // in scope 1 at $DIR/simplify_locals.rs:+1:9: +1:14
11           scope 2 {
12               scope 3 {
13               }
14           }
15       }
16   
17       bb0: {
18           StorageLive(_1);                 // scope 0 at $DIR/simplify_locals.rs:+1:9: +1:14
19           _1 = const 1_i32;                // scope 0 at $DIR/simplify_locals.rs:+1:17: +1:18
20 -         StorageLive(_2);                 // scope 1 at $DIR/simplify_locals.rs:+3:13: +3:15
21 -         _2 = &_1;                        // scope 1 at $DIR/simplify_locals.rs:+3:13: +3:15
22 -         StorageDead(_2);                 // scope 1 at $DIR/simplify_locals.rs:+3:15: +3:16
23 -         StorageLive(_3);                 // scope 2 at $DIR/simplify_locals.rs:+4:13: +4:19
24 -         _3 = &mut _1;                    // scope 2 at $DIR/simplify_locals.rs:+4:13: +4:19
25 -         StorageDead(_3);                 // scope 2 at $DIR/simplify_locals.rs:+4:19: +4:20
26           _0 = const ();                   // scope 0 at $DIR/simplify_locals.rs:+0:8: +5:2
27           StorageDead(_1);                 // scope 0 at $DIR/simplify_locals.rs:+5:1: +5:2
28           return;                          // scope 0 at $DIR/simplify_locals.rs:+5:2: +5:2
29       }
30   }
31