summaryrefslogtreecommitdiffstats
path: root/tests/mir-opt/lower_intrinsics.write_via_move_string.LowerIntrinsics.panic-unwind.diff
blob: ddc8cf9a3d9315d7d92891fc3b1dbeb68c842966 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
- // MIR for `write_via_move_string` before LowerIntrinsics
+ // MIR for `write_via_move_string` after LowerIntrinsics
  
  fn write_via_move_string(_1: &mut String, _2: String) -> () {
      debug r => _1;
      debug v => _2;
      let mut _0: ();
      let mut _3: *mut std::string::String;
      let mut _4: std::string::String;
      scope 1 {
      }
  
      bb0: {
          StorageLive(_3);
          _3 = &raw mut (*_1);
          StorageLive(_4);
          _4 = move _2;
-         _0 = write_via_move::<String>(move _3, move _4) -> [return: bb1, unwind unreachable];
+         (*_3) = move _4;
+         goto -> bb1;
      }
  
      bb1: {
          StorageDead(_4);
          StorageDead(_3);
          goto -> bb2;
      }
  
      bb2: {
          return;
      }
  }