Skip to content

Commit

Permalink
Prefer Move over Copy when dereferencing rvalue objects.
Browse files Browse the repository at this point in the history
  • Loading branch information
qnighy committed Oct 24, 2018
1 parent 7ccf661 commit 7c965e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustc_mir/shim.rs
Expand Up @@ -717,7 +717,7 @@ fn build_call_shim<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
assert!(arg_ty.is_self());
local_decls[rcvr_arg].ty = tcx.mk_mut_ptr(arg_ty);

Operand::Copy(rcvr_l.deref())
Operand::Move(rcvr_l.deref())
}
Adjustment::RefMut => {
// let rcvr = &mut rcvr;
Expand Down

0 comments on commit 7c965e3

Please sign in to comment.