Only check predicates for late-bound non-lifetime vars in object candidate assembly

This commit is contained in:
Michael Goulet 2023-11-05 13:36:00 +00:00
parent fb61292105
commit 24e14dd8b4
2 changed files with 23 additions and 1 deletions

View file

@ -628,7 +628,10 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
}
self.infcx.probe(|_snapshot| {
if obligation.has_non_region_late_bound() {
// FIXME(non_lifetime_binders): Really, we care only to check that we don't
// have any non-region *escaping* bound vars, but that's hard to check and
// we shouldn't really ever encounter those anyways.
if obligation.self_ty().has_non_region_late_bound() {
return;
}