summary refs log tree commit diff
path: root/tests/mir-opt/lower_intrinsics.write_via_move_string.LowerIntrinsics.diff
blob: 38d99f661dc648337c8d94bee234dbb5f21451fc (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
34
35
36
- // 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;                       // in scope 0 at $DIR/lower_intrinsics.rs:+0:30: +0:31
      debug v => _2;                       // in scope 0 at $DIR/lower_intrinsics.rs:+0:46: +0:47
      let mut _0: ();                      // return place in scope 0 at $DIR/lower_intrinsics.rs:+0:57: +0:57
      let mut _3: *mut std::string::String; // in scope 0 at $DIR/lower_intrinsics.rs:+1:47: +1:48
      let mut _4: std::string::String;     // in scope 0 at $DIR/lower_intrinsics.rs:+1:50: +1:51
      scope 1 {
      }
  
      bb0: {
          StorageLive(_3);                 // scope 1 at $DIR/lower_intrinsics.rs:+1:47: +1:48
          _3 = &raw mut (*_1);             // scope 1 at $DIR/lower_intrinsics.rs:+1:47: +1:48
          StorageLive(_4);                 // scope 1 at $DIR/lower_intrinsics.rs:+1:50: +1:51
          _4 = move _2;                    // scope 1 at $DIR/lower_intrinsics.rs:+1:50: +1:51
-         _0 = write_via_move::<String>(move _3, move _4) -> [return: bb1, unwind unreachable]; // scope 1 at $DIR/lower_intrinsics.rs:+1:14: +1:52
-                                          // mir::Constant
-                                          // + span: $DIR/lower_intrinsics.rs:129:14: 129:46
-                                          // + literal: Const { ty: unsafe extern "rust-intrinsic" fn(*mut String, String) {write_via_move::<String>}, val: Value(<ZST>) }
+         (*_3) = move _4;                 // scope 1 at $DIR/lower_intrinsics.rs:+1:14: +1:52
+         goto -> bb1;                     // scope 1 at $DIR/lower_intrinsics.rs:+1:14: +1:52
      }
  
      bb1: {
          StorageDead(_4);                 // scope 1 at $DIR/lower_intrinsics.rs:+1:51: +1:52
          StorageDead(_3);                 // scope 1 at $DIR/lower_intrinsics.rs:+1:51: +1:52
          goto -> bb2;                     // scope 0 at $DIR/lower_intrinsics.rs:+2:1: +2:2
      }
  
      bb2: {
          return;                          // scope 0 at $DIR/lower_intrinsics.rs:+2:2: +2:2
      }
  }