rust/tests/mir-opt/lower_intrinsics.write_via_move_string.LowerIntrinsics.diff

37 lines
2.2 KiB
Diff
Raw Normal View History

- // 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
}
}