Remove LocalKind::Var.
This commit is contained in:
parent
d31386a52b
commit
50d0959a2f
7 changed files with 17 additions and 18 deletions
|
@ -704,7 +704,7 @@ pub mod ty {
|
|||
|
||||
fn importance(&self) -> DiagnosticImportance {
|
||||
match self.0 {
|
||||
mir::LocalKind::Var | mir::LocalKind::Temp => DiagnosticImportance::Secondary,
|
||||
mir::LocalKind::Temp => DiagnosticImportance::Secondary,
|
||||
mir::LocalKind::ReturnPointer | mir::LocalKind::Arg => {
|
||||
DiagnosticImportance::Primary
|
||||
}
|
||||
|
|
|
@ -106,8 +106,9 @@ impl<'tcx> Visitor<'tcx> for Collector<'_, 'tcx> {
|
|||
debug!("visit_local: index={:?} context={:?} location={:?}", index, context, location);
|
||||
// We're only interested in temporaries and the return place
|
||||
match self.ccx.body.local_kind(index) {
|
||||
LocalKind::Temp | LocalKind::ReturnPointer => {}
|
||||
LocalKind::Arg | LocalKind::Var => return,
|
||||
LocalKind::Arg => return,
|
||||
LocalKind::Temp if self.ccx.body.local_decls[index].is_user_variable() => return,
|
||||
LocalKind::ReturnPointer | LocalKind::Temp => {}
|
||||
}
|
||||
|
||||
// Ignore drops, if the temp gets promoted,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue