Skip to content

Commit

Permalink
add probably accidentally missing super_* calls
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Jun 16, 2020
1 parent 6c5345f commit 827ccf7
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/librustc_mir/borrow_check/used_muts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ impl GatherUsedMutsVisitor<'_, '_, '_> {
}

impl<'visit, 'cx, 'tcx> Visitor<'tcx> for GatherUsedMutsVisitor<'visit, 'cx, 'tcx> {
fn visit_terminator(&mut self, terminator: &Terminator<'tcx>, _location: Location) {
fn visit_terminator(&mut self, terminator: &Terminator<'tcx>, location: Location) {
debug!("visit_terminator: terminator={:?}", terminator);
match &terminator.kind {
TerminatorKind::Call { destination: Some((into, _)), .. } => {
Expand All @@ -76,10 +76,10 @@ impl<'visit, 'cx, 'tcx> Visitor<'tcx> for GatherUsedMutsVisitor<'visit, 'cx, 'tc
_ => {}
}

// FIXME: no super_terminator?
self.super_terminator(terminator, location);
}

fn visit_statement(&mut self, statement: &Statement<'tcx>, _location: Location) {
fn visit_statement(&mut self, statement: &Statement<'tcx>, location: Location) {
if let StatementKind::Assign(box (into, _)) = &statement.kind {
debug!(
"visit_statement: statement={:?} local={:?} \
Expand All @@ -89,7 +89,7 @@ impl<'visit, 'cx, 'tcx> Visitor<'tcx> for GatherUsedMutsVisitor<'visit, 'cx, 'tc
self.remove_never_initialized_mut_locals(*into);
}

// FIXME: no super_statement?
self.super_statement(statement, location);
}

fn visit_local(&mut self, local: &Local, place_context: PlaceContext, location: Location) {
Expand All @@ -107,7 +107,5 @@ impl<'visit, 'cx, 'tcx> Visitor<'tcx> for GatherUsedMutsVisitor<'visit, 'cx, 'tc
}
}
}

// FIXME: no super_local?
}
}

0 comments on commit 827ccf7

Please sign in to comment.