1 - // MIR for `nrvo` before DestinationPropagation
2 + // MIR for `nrvo` after DestinationPropagation
4 fn nrvo(_1: for<'a> fn(&'a mut [u8; 1024])) -> [u8; 1024] {
5 debug init => _1; // in scope 0 at $DIR/simple.rs:+0:9: +0:13
6 let mut _0: [u8; 1024]; // return place in scope 0 at $DIR/simple.rs:+0:39: +0:49
7 let mut _2: [u8; 1024]; // in scope 0 at $DIR/simple.rs:+1:9: +1:16
8 let _3: (); // in scope 0 at $DIR/simple.rs:+2:5: +2:19
9 let mut _4: for<'a> fn(&'a mut [u8; 1024]); // in scope 0 at $DIR/simple.rs:+2:5: +2:9
10 let mut _5: &mut [u8; 1024]; // in scope 0 at $DIR/simple.rs:+2:10: +2:18
11 let mut _6: &mut [u8; 1024]; // in scope 0 at $DIR/simple.rs:+2:10: +2:18
13 debug buf => _2; // in scope 1 at $DIR/simple.rs:+1:9: +1:16
17 StorageLive(_2); // scope 0 at $DIR/simple.rs:+1:9: +1:16
18 _2 = [const 0_u8; 1024]; // scope 0 at $DIR/simple.rs:+1:19: +1:28
19 StorageLive(_3); // scope 1 at $DIR/simple.rs:+2:5: +2:19
20 - StorageLive(_4); // scope 1 at $DIR/simple.rs:+2:5: +2:9
21 - _4 = _1; // scope 1 at $DIR/simple.rs:+2:5: +2:9
22 + nop; // scope 1 at $DIR/simple.rs:+2:5: +2:9
23 + nop; // scope 1 at $DIR/simple.rs:+2:5: +2:9
24 StorageLive(_5); // scope 1 at $DIR/simple.rs:+2:10: +2:18
25 StorageLive(_6); // scope 1 at $DIR/simple.rs:+2:10: +2:18
26 _6 = &mut _2; // scope 1 at $DIR/simple.rs:+2:10: +2:18
27 _5 = &mut (*_6); // scope 1 at $DIR/simple.rs:+2:10: +2:18
28 - _3 = move _4(move _5) -> bb1; // scope 1 at $DIR/simple.rs:+2:5: +2:19
29 + _3 = move _1(move _5) -> bb1; // scope 1 at $DIR/simple.rs:+2:5: +2:19
33 StorageDead(_5); // scope 1 at $DIR/simple.rs:+2:18: +2:19
34 - StorageDead(_4); // scope 1 at $DIR/simple.rs:+2:18: +2:19
35 + nop; // scope 1 at $DIR/simple.rs:+2:18: +2:19
36 StorageDead(_6); // scope 1 at $DIR/simple.rs:+2:19: +2:20
37 StorageDead(_3); // scope 1 at $DIR/simple.rs:+2:19: +2:20
38 _0 = _2; // scope 1 at $DIR/simple.rs:+3:5: +3:8
39 StorageDead(_2); // scope 0 at $DIR/simple.rs:+4:1: +4:2
40 return; // scope 0 at $DIR/simple.rs:+4:2: +4:2