Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 3eee82c

Browse files
committed
Auto merge of rust-lang#139289 - compiler-errors:folder-experiment-3, r=<try>
Folder experiment: Account for type flags in fold_predicate in OpportunisticVarResolver **NOTE:** This is one of a series of perf experiments that I've come up with while sick in bed. I'm assigning them to lqd b/c you're a good reviewer and you'll hopefully be awake when these experiments finish, lol. r? lqd Same as rust-lang#139288, but for the var resolver. I could've probably merged these into one, but I want to test these things in parallel. Close this if it ends up neutral.
2 parents d5b4c2e + 9caa7f5 commit 3eee82c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

compiler/rustc_infer/src/infer/resolve.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ impl<'a, 'tcx> TypeFolder<TyCtxt<'tcx>> for OpportunisticVarResolver<'a, 'tcx> {
5656
ct.super_fold_with(self)
5757
}
5858
}
59+
60+
fn fold_predicate(&mut self, p: ty::Predicate<'tcx>) -> ty::Predicate<'tcx> {
61+
if !p.has_non_region_infer() { p } else { p.super_fold_with(self) }
62+
}
5963
}
6064

6165
/// The opportunistic region resolver opportunistically resolves regions

0 commit comments

Comments
 (0)