Remove LocalKind::Var.
This commit is contained in:
parent
d31386a52b
commit
50d0959a2f
7 changed files with 17 additions and 18 deletions
|
@ -788,7 +788,7 @@ impl<'tcx> Visitor<'tcx> for FindAssignments<'_, '_, 'tcx> {
|
|||
fn is_local_required(local: Local, body: &Body<'_>) -> bool {
|
||||
match body.local_kind(local) {
|
||||
LocalKind::Arg | LocalKind::ReturnPointer => true,
|
||||
LocalKind::Var | LocalKind::Temp => false,
|
||||
LocalKind::Temp => false,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -102,7 +102,7 @@ fn local_eligible_for_nrvo(body: &mut mir::Body<'_>) -> Option<Local> {
|
|||
mir::LocalKind::Arg => return None,
|
||||
|
||||
mir::LocalKind::ReturnPointer => bug!("Return place was assigned to itself?"),
|
||||
mir::LocalKind::Var | mir::LocalKind::Temp => {}
|
||||
mir::LocalKind::Temp => {}
|
||||
}
|
||||
|
||||
// If multiple different locals are copied to the return place. We can't pick a
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue