]> git.lizzy.rs Git - rust.git/blob - tests/mir-opt/copy-prop/move_arg.f.CopyProp.diff
Auto merge of #107443 - cjgillot:generator-less-query, r=compiler-errors
[rust.git] / tests / mir-opt / copy-prop / move_arg.f.CopyProp.diff
1 - // MIR for `f` before CopyProp
2 + // MIR for `f` after CopyProp
3   
4   fn f(_1: T) -> () {
5       debug a => _1;                       // in scope 0 at $DIR/move_arg.rs:+0:19: +0:20
6       let mut _0: ();                      // return place in scope 0 at $DIR/move_arg.rs:+0:25: +0:25
7       let _2: T;                           // in scope 0 at $DIR/move_arg.rs:+1:9: +1:10
8       let _3: ();                          // in scope 0 at $DIR/move_arg.rs:+2:5: +2:12
9       let mut _4: T;                       // in scope 0 at $DIR/move_arg.rs:+2:7: +2:8
10       let mut _5: T;                       // in scope 0 at $DIR/move_arg.rs:+2:10: +2:11
11       scope 1 {
12 -         debug b => _2;                   // in scope 1 at $DIR/move_arg.rs:+1:9: +1:10
13 +         debug b => _1;                   // in scope 1 at $DIR/move_arg.rs:+1:9: +1:10
14       }
15   
16       bb0: {
17 -         StorageLive(_2);                 // scope 0 at $DIR/move_arg.rs:+1:9: +1:10
18 -         _2 = _1;                         // scope 0 at $DIR/move_arg.rs:+1:13: +1:14
19           StorageLive(_3);                 // scope 1 at $DIR/move_arg.rs:+2:5: +2:12
20 -         StorageLive(_4);                 // scope 1 at $DIR/move_arg.rs:+2:7: +2:8
21 -         _4 = _1;                         // scope 1 at $DIR/move_arg.rs:+2:7: +2:8
22 -         StorageLive(_5);                 // scope 1 at $DIR/move_arg.rs:+2:10: +2:11
23 -         _5 = _2;                         // scope 1 at $DIR/move_arg.rs:+2:10: +2:11
24 -         _3 = g::<T>(move _4, move _5) -> bb1; // scope 1 at $DIR/move_arg.rs:+2:5: +2:12
25 +         _3 = g::<T>(_1, _1) -> bb1;      // scope 1 at $DIR/move_arg.rs:+2:5: +2:12
26                                            // mir::Constant
27                                            // + span: $DIR/move_arg.rs:7:5: 7:6
28                                            // + literal: Const { ty: fn(T, T) {g::<T>}, val: Value(<ZST>) }
29       }
30   
31       bb1: {
32 -         StorageDead(_5);                 // scope 1 at $DIR/move_arg.rs:+2:11: +2:12
33 -         StorageDead(_4);                 // scope 1 at $DIR/move_arg.rs:+2:11: +2:12
34           StorageDead(_3);                 // scope 1 at $DIR/move_arg.rs:+2:12: +2:13
35           _0 = const ();                   // scope 0 at $DIR/move_arg.rs:+0:25: +3:2
36 -         StorageDead(_2);                 // scope 0 at $DIR/move_arg.rs:+3:1: +3:2
37           return;                          // scope 0 at $DIR/move_arg.rs:+3:2: +3:2
38       }
39   }
40