Closed
Description
TL;DR
Refactor ty::Predicate
to better align with how chalk handles things and to enable what we need for GATs. Highlights:
Goals:
- Introduce forall and implication predicates so we can model
forall<T> { if (T: Debug) { Vec<T>: Debug } }
. - Remove the "poly" from all the other kinds of predicates (e.g.,
Predicate::Trait
would be an ordinaryTraitRef
) - Change
Predicate<'tcx>
to an interned reference (&'tcx PredicateKind<'tcx>
) to enable recursion
Steps
- Enable recursive predicates (this work has started on a branch of mine and is basically done)
- Rename
Predicate
toPredicateKind
, introducetype Predicate = PredicateKind
- Introduce interned pool for
Predicate
and altertype Predicate<'tcx>
to&'tcx PredicateKind<'tcx>
- Rename
- Introduce forall:
- Introduce
forall
predicate goals and integrate into the fulfillment context- hmm -- this may require finishing up the universe integration work, which is semi-blocked
- Remove the mandatory binder on trait predicates and other predicates and use forall goals instead where needed
- Introduce
- Introduce implication predicates, which extend the
ParamEnv
with new predicates
Mentors or Reviewers
nikomatsakis will mentor