Use Place directly on make_return_dest, it's Copy

This commit is contained in:
Santiago Pastorino
2020-03-31 14:31:34 -03:00
parent afcd7fc51d
commit 5f8a6edbbb
+2 -2
View File
@@ -619,7 +619,7 @@ fn codegen_call_terminator(
let mut llargs = Vec::with_capacity(arg_count);
// Prepare the return value destination
let ret_dest = if let Some((ref dest, _)) = *destination {
let ret_dest = if let Some((dest, _)) = *destination {
let is_intrinsic = intrinsic.is_some();
self.make_return_dest(&mut bx, dest, &fn_abi.ret, &mut llargs, is_intrinsic)
} else {
@@ -1123,7 +1123,7 @@ pub fn build_block(&self, bb: mir::BasicBlock) -> Bx {
fn make_return_dest(
&mut self,
bx: &mut Bx,
dest: &mir::Place<'tcx>,
dest: mir::Place<'tcx>,
fn_ret: &ArgAbi<'tcx, Ty<'tcx>>,
llargs: &mut Vec<Bx::Value>,
is_intrinsic: bool,