Skip to content

Commit

Permalink
Remove tag from iterate_until_fixed_point().
Browse files Browse the repository at this point in the history
The function only has one call site, so we don't need a tag argument.
  • Loading branch information
nnethercote committed Oct 10, 2019
1 parent 59e41ed commit 8cd25e7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/librustc/infer/lexical_region_resolve/mod.rs
Expand Up @@ -304,7 +304,7 @@ impl<'cx, 'tcx> LexicalResolver<'cx, 'tcx> {
}

fn expansion(&self, var_values: &mut LexicalRegionResolutions<'tcx>) {
self.iterate_until_fixed_point("Expansion", |constraint| {
self.iterate_until_fixed_point(|constraint| {
debug!("expansion: constraint={:?}", constraint);
let (a_region, b_vid, b_data, retain) = match *constraint {
Constraint::RegSubVar(a_region, b_vid) => {
Expand Down Expand Up @@ -866,7 +866,7 @@ impl<'cx, 'tcx> LexicalResolver<'cx, 'tcx> {
}
}

fn iterate_until_fixed_point<F>(&self, tag: &str, mut body: F)
fn iterate_until_fixed_point<F>(&self, mut body: F)
where
F: FnMut(&Constraint<'tcx>) -> (bool, bool),
{
Expand All @@ -876,7 +876,7 @@ impl<'cx, 'tcx> LexicalResolver<'cx, 'tcx> {
while changed {
changed = false;
iteration += 1;
debug!("---- {} Iteration {}{}", "#", tag, iteration);
debug!("---- Expansion iteration {}", iteration);
constraints.retain(|constraint| {
let (edge_changed, retain) = body(constraint);
if edge_changed {
Expand All @@ -886,7 +886,7 @@ impl<'cx, 'tcx> LexicalResolver<'cx, 'tcx> {
retain
});
}
debug!("---- {} Complete after {} iteration(s)", tag, iteration);
debug!("---- Expansion complete after {} iteration(s)", iteration);
}

fn bound_is_met(
Expand Down

0 comments on commit 8cd25e7

Please sign in to comment.