-
Couldn't load subscription status.
- Fork 72
Closed
Labels
major-changeA proposal to make a major change to rustcA proposal to make a major change to rustcmajor-change-acceptedA major change proposal that was acceptedA major change proposal that was accepted
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::Traitwould 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
PredicatetoPredicateKind, introducetype Predicate = PredicateKind - Introduce interned pool for
Predicateand altertype Predicate<'tcx>to&'tcx PredicateKind<'tcx>
- Rename
- Introduce forall:
- Introduce
forallpredicate 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
ParamEnvwith new predicates
Mentors or Reviewers
nikomatsakis will mentor
Metadata
Metadata
Assignees
Labels
major-changeA proposal to make a major change to rustcA proposal to make a major change to rustcmajor-change-acceptedA major change proposal that was acceptedA major change proposal that was accepted