Skip to content

Commit 7c965e3

Browse files
committed
Prefer Move over Copy when dereferencing rvalue objects.
1 parent 7ccf661 commit 7c965e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc_mir/shim.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -717,7 +717,7 @@ fn build_call_shim<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
717717
assert!(arg_ty.is_self());
718718
local_decls[rcvr_arg].ty = tcx.mk_mut_ptr(arg_ty);
719719

720-
Operand::Copy(rcvr_l.deref())
720+
Operand::Move(rcvr_l.deref())
721721
}
722722
Adjustment::RefMut => {
723723
// let rcvr = &mut rcvr;

0 commit comments

Comments
 (0)