Skip to content

Commit 7201c1b

Browse files
committed
remove DerefTemp and CopyFromDeref from runtime mir
1 parent cc00f45 commit 7201c1b

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/base.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -600,11 +600,6 @@ fn codegen_stmt<'tcx>(fx: &mut FunctionCx<'_, '_, 'tcx>, cur_block: Block, stmt:
600600
let val = codegen_operand(fx, operand);
601601
lval.write_cvalue(fx, val);
602602
}
603-
Rvalue::CopyForDeref(place) => {
604-
let cplace = codegen_place(fx, place);
605-
let val = cplace.to_cvalue(fx);
606-
lval.write_cvalue(fx, val)
607-
}
608603
Rvalue::Ref(_, _, place) | Rvalue::RawPtr(_, place) => {
609604
let place = codegen_place(fx, place);
610605
let ref_ = place.place_ref(fx, lval.layout());
@@ -928,6 +923,7 @@ fn codegen_stmt<'tcx>(fx: &mut FunctionCx<'_, '_, 'tcx>, cur_block: Block, stmt:
928923
let operand = codegen_operand(fx, operand);
929924
lval.write_cvalue_transmute(fx, operand);
930925
}
926+
Rvalue::CopyForDeref(_) => bug!("`CopyForDeref` in codegen"),
931927
}
932928
}
933929
StatementKind::StorageLive(_)

0 commit comments

Comments
 (0)