1
Fork 0

Introduce PredicateKind::Clause

This commit is contained in:
Santiago Pastorino 2022-11-24 18:14:58 -03:00
parent 42cc8e8f4e
commit 974e2837bb
No known key found for this signature in database
GPG key ID: 8131A24E0C79EFAF
75 changed files with 568 additions and 407 deletions

View file

@ -187,7 +187,8 @@ pub fn setup_constraining_predicates<'tcx>(
for j in i..predicates.len() {
// Note that we don't have to care about binders here,
// as the impl trait ref never contains any late-bound regions.
if let ty::PredicateKind::Projection(projection) = predicates[j].0.kind().skip_binder()
if let ty::PredicateKind::Clause(ty::Clause::Projection(projection)) =
predicates[j].0.kind().skip_binder()
{
// Special case: watch out for some kind of sneaky attempt
// to project out an associated type defined by this very