Skip to content

Commit

Permalink
Untouch back perf sensetive code 😅
Browse files Browse the repository at this point in the history
  • Loading branch information
WaffleLapkin committed Jan 17, 2023
1 parent c21b1f7 commit 4a6d9de
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions compiler/rustc_trait_selection/src/traits/fulfill.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,12 +208,14 @@ impl<'a, 'tcx> ObligationProcessor for FulfillProcessor<'a, 'tcx> {
_ => {
// This `for` loop was once a call to `all()`, but this lower-level
// form was a perf win. See #64545 for details.
for &infer_var in &pending_obligation.stalled_on {
if self.selcx.infcx.ty_or_const_infer_var_changed(infer_var) {
return true;
(|| {
for &infer_var in &pending_obligation.stalled_on {
if self.selcx.infcx.ty_or_const_infer_var_changed(infer_var) {
return true;
}
}
}
false
false
})()
}
}
}
Expand Down

0 comments on commit 4a6d9de

Please sign in to comment.