Skip to content

Commit 5576833

Browse files
committed
Remove unneeded origin arg from iterate_until_fixed_point's closure.
1 parent e2f221c commit 5576833

File tree

1 file changed

+6
-7
lines changed
  • src/librustc/infer/lexical_region_resolve

1 file changed

+6
-7
lines changed

src/librustc/infer/lexical_region_resolve/mod.rs

+6-7
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,8 @@ impl<'cx, 'gcx, 'tcx> LexicalResolver<'cx, 'gcx, 'tcx> {
186186
}
187187

188188
fn expansion(&self, var_values: &mut LexicalRegionResolutions<'tcx>) {
189-
self.iterate_until_fixed_point("Expansion", |constraint, origin| {
190-
debug!("expansion: constraint={:?} origin={:?}", constraint, origin);
189+
self.iterate_until_fixed_point("Expansion", |constraint| {
190+
debug!("expansion: constraint={:?}", constraint);
191191
match *constraint {
192192
Constraint::RegSubVar(a_region, b_vid) => {
193193
let b_data = var_values.value_mut(b_vid);
@@ -722,18 +722,17 @@ impl<'cx, 'gcx, 'tcx> LexicalResolver<'cx, 'gcx, 'tcx> {
722722
}
723723

724724
fn iterate_until_fixed_point<F>(&self, tag: &str, mut body: F)
725-
where
726-
F: FnMut(&Constraint<'tcx>, &SubregionOrigin<'tcx>) -> (bool, bool),
725+
where F: FnMut(&Constraint<'tcx>) -> (bool, bool),
727726
{
728-
let mut constraints: SmallVec<[_; 16]> = self.data.constraints.iter().collect();
727+
let mut constraints: SmallVec<[_; 16]> = self.data.constraints.keys().collect();
729728
let mut iteration = 0;
730729
let mut changed = true;
731730
while changed {
732731
changed = false;
733732
iteration += 1;
734733
debug!("---- {} Iteration {}{}", "#", tag, iteration);
735-
constraints.retain(|(constraint, origin)| {
736-
let (edge_changed, retain) = body(constraint, origin);
734+
constraints.retain(|constraint| {
735+
let (edge_changed, retain) = body(constraint);
737736
if edge_changed {
738737
debug!("Updated due to constraint {:?}", constraint);
739738
changed = true;

0 commit comments

Comments
 (0)