Refactor call terminator to always hold a destination place
This commit is contained in:
@@ -450,7 +450,8 @@ impl<'tcx> CloneShimBuilder<'tcx> {
|
||||
TerminatorKind::Call {
|
||||
func,
|
||||
args: vec![Operand::Move(ref_loc)],
|
||||
destination: Some((dest, next)),
|
||||
destination: dest,
|
||||
target: Some(next),
|
||||
cleanup: Some(cleanup),
|
||||
from_hir_call: true,
|
||||
fn_span: self.span,
|
||||
@@ -676,7 +677,8 @@ fn build_call_shim<'tcx>(
|
||||
TerminatorKind::Call {
|
||||
func: callee,
|
||||
args,
|
||||
destination: Some((Place::return_place(), BasicBlock::new(1))),
|
||||
destination: Place::return_place(),
|
||||
target: Some(BasicBlock::new(1)),
|
||||
cleanup: if let Some(Adjustment::RefMut) = rcvr_adjustment {
|
||||
Some(BasicBlock::new(3))
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user