Skip to content

Commit cec4c4d

Browse files
committed
Undo a micro-optimization.
This micro-optimization made sense before 0 and 1 were special-cased within this function, but it's now much less important.
1 parent b0f665e commit cec4c4d

File tree

1 file changed

+3
-12
lines changed
  • compiler/rustc_trait_selection/src/traits

1 file changed

+3
-12
lines changed

compiler/rustc_trait_selection/src/traits/fulfill.rs

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -230,18 +230,9 @@ impl<'a, 'tcx> ObligationProcessor for FulfillProcessor<'a, 'tcx> {
230230
// In this case we haven't changed, but wish to make a change.
231231
true
232232
}
233-
_ => {
234-
// This `for` loop was once a call to `all()`, but this lower-level
235-
// form was a perf win. See #64545 for details.
236-
(|| {
237-
for &infer_var in &pending_obligation.stalled_on {
238-
if self.selcx.infcx.uninlined_ty_or_const_infer_var_changed(infer_var) {
239-
return true;
240-
}
241-
}
242-
false
243-
})()
244-
}
233+
_ => pending_obligation.stalled_on.iter().any(|&infer_var| {
234+
self.selcx.infcx.uninlined_ty_or_const_infer_var_changed(infer_var)
235+
}),
245236
}
246237
}
247238

0 commit comments

Comments
 (0)