From: Santiago Pastorino Date: Tue, 31 Mar 2020 17:35:01 +0000 (-0300) Subject: Use Place directly in codegen_transmute, it's Copy X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=1f5338cfd61b3eb59c2491fffdd802ce779c6487;p=rust.git Use Place directly in codegen_transmute, it's Copy --- diff --git a/src/librustc_codegen_ssa/mir/block.rs b/src/librustc_codegen_ssa/mir/block.rs index d75818dfbac..931fab6ae01 100644 --- a/src/librustc_codegen_ssa/mir/block.rs +++ b/src/librustc_codegen_ssa/mir/block.rs @@ -580,7 +580,7 @@ fn codegen_call_terminator( if intrinsic == Some("transmute") { if let Some(destination_ref) = destination.as_ref() { - let &(ref dest, target) = destination_ref; + let &(dest, target) = destination_ref; self.codegen_transmute(&mut bx, &args[0], dest); helper.maybe_sideeffect(self.mir, &mut bx, &[target]); helper.funclet_br(self, &mut bx, target); @@ -1184,7 +1184,7 @@ fn make_return_dest( } } - fn codegen_transmute(&mut self, bx: &mut Bx, src: &mir::Operand<'tcx>, dst: &mir::Place<'tcx>) { + fn codegen_transmute(&mut self, bx: &mut Bx, src: &mir::Operand<'tcx>, dst: mir::Place<'tcx>) { if let Some(index) = dst.as_local() { match self.locals[index] { LocalRef::Place(place) => self.codegen_transmute_into(bx, src, place),