Remove some unnecessary dereferences.

This commit is contained in:
Nicholas Nethercote 2024-08-30 16:09:47 +10:00
parent 4f2588f23a
commit 9cf90b9fc9

View File

@ -639,7 +639,7 @@ impl<'tcx> Inliner<'tcx> {
);
let dest_ty = dest.ty(caller_body, self.tcx);
let temp =
Place::from(self.new_call_temp(caller_body, &callsite, dest_ty, return_block));
Place::from(self.new_call_temp(caller_body, callsite, dest_ty, return_block));
caller_body[callsite.block].statements.push(Statement {
source_info: callsite.source_info,
kind: StatementKind::Assign(Box::new((temp, dest))),
@ -658,7 +658,7 @@ impl<'tcx> Inliner<'tcx> {
true,
self.new_call_temp(
caller_body,
&callsite,
callsite,
destination.ty(caller_body, self.tcx).ty,
return_block,
),
@ -666,7 +666,7 @@ impl<'tcx> Inliner<'tcx> {
};
// Copy the arguments if needed.
let args = self.make_call_args(args, &callsite, caller_body, &callee_body, return_block);
let args = self.make_call_args(args, callsite, caller_body, &callee_body, return_block);
let mut integrator = Integrator {
args: &args,