parent
6e5a6ffb14
commit
7aa5ea9a4a
9 changed files with 100 additions and 112 deletions
|
@ -724,12 +724,11 @@ impl<'tcx> Inliner<'tcx> {
|
|||
caller_body: &mut Body<'tcx>,
|
||||
) -> Local {
|
||||
// Reuse the operand if it is a moved temporary.
|
||||
if let Operand::Move(place) = &arg {
|
||||
if let Some(local) = place.as_local() {
|
||||
if caller_body.local_kind(local) == LocalKind::Temp {
|
||||
return local;
|
||||
}
|
||||
}
|
||||
if let Operand::Move(place) = &arg
|
||||
&& let Some(local) = place.as_local()
|
||||
&& caller_body.local_kind(local) == LocalKind::Temp
|
||||
{
|
||||
return local;
|
||||
}
|
||||
|
||||
// Otherwise, create a temporary for the argument.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue