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

Commit 9caa7f5

Browse files
Account for type flags in fold_predicate in OpportunisticVarResolver
1 parent 70dab5a commit 9caa7f5

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)