]> git.lizzy.rs Git - rust.git/commitdiff
Use Place directly in codegen_transmute, it's Copy
authorSantiago Pastorino <spastorino@gmail.com>
Tue, 31 Mar 2020 17:35:01 +0000 (14:35 -0300)
committerSantiago Pastorino <spastorino@gmail.com>
Tue, 31 Mar 2020 20:37:54 +0000 (17:37 -0300)
src/librustc_codegen_ssa/mir/block.rs

index d75818dfbacb9f77a8f1b1b4e47a332f02c42c1e..931fab6ae01da93a013d8a1baaee9cf4a65dc327 100644 (file)
@@ -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),