fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.1 KiB43 linesraw
1- // MIR for `nrvo` before DestinationPropagation
2+ // MIR for `nrvo` after DestinationPropagation
3  
4  fn nrvo(_1: for<'a> fn(&'a mut [u8; 1024])) -> [u8; 1024] {
5      debug init => _1;
6      let mut _0: [u8; 1024];
7      let mut _2: [u8; 1024];
8      let _3: ();
9      let mut _4: for<'a> fn(&'a mut [u8; 1024]);
10      let mut _5: &mut [u8; 1024];
11      let mut _6: &mut [u8; 1024];
12      scope 1 {
13          debug buf => _2;
14      }
15  
16      bb0: {
17          StorageLive(_2);
18          _2 = [const 0_u8; 1024];
19          StorageLive(_3);
20-         StorageLive(_4);
21-         _4 = _1;
22+         nop;
23+         nop;
24          StorageLive(_5);
25          StorageLive(_6);
26          _6 = &mut _2;
27          _5 = &mut (*_6);
28-         _3 = move _4(move _5) -> [return: bb1, unwind unreachable];
29+         _3 = move _1(move _5) -> [return: bb1, unwind unreachable];
30      }
31  
32      bb1: {
33          StorageDead(_5);
34-         StorageDead(_4);
35+         nop;
36          StorageDead(_6);
37          StorageDead(_3);
38          _0 = _2;
39          StorageDead(_2);
40          return;
41      }
42  }
43