Skip to content

Commit 1f5338c

Browse files
committed
Use Place directly in codegen_transmute, it's Copy
1 parent 5f8a6ed commit 1f5338c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/librustc_codegen_ssa/mir/block.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
580580

581581
if intrinsic == Some("transmute") {
582582
if let Some(destination_ref) = destination.as_ref() {
583-
let &(ref dest, target) = destination_ref;
583+
let &(dest, target) = destination_ref;
584584
self.codegen_transmute(&mut bx, &args[0], dest);
585585
helper.maybe_sideeffect(self.mir, &mut bx, &[target]);
586586
helper.funclet_br(self, &mut bx, target);
@@ -1184,7 +1184,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
11841184
}
11851185
}
11861186

1187-
fn codegen_transmute(&mut self, bx: &mut Bx, src: &mir::Operand<'tcx>, dst: &mir::Place<'tcx>) {
1187+
fn codegen_transmute(&mut self, bx: &mut Bx, src: &mir::Operand<'tcx>, dst: mir::Place<'tcx>) {
11881188
if let Some(index) = dst.as_local() {
11891189
match self.locals[index] {
11901190
LocalRef::Place(place) => self.codegen_transmute_into(bx, src, place),

0 commit comments

Comments
 (0)