Open nikomatsakis opened 3 years ago
chalk represents dyn Trait using binders, so that for dyn Debug, you have a predicate like <T> T: Debug (here, the bound variable T represents the self type).
dyn Trait
dyn Debug
<T> T: Debug
T
rustc uses ExistentialPredicate.
ExistentialPredicate
The chalk way seems superior. Better to not have an extra form of predicate.
The goal would be to refactor rustc to use a binder + predicate.
We may want to refactor rustc to have a WhereClause; ExistentialPredicate is almost a Binder<WhereClause>
WhereClause
Binder<WhereClause>
@rustbot claim
@csmoe note that this probably requires an MCP.
okay, I'll create that.
chalk represents
dyn Trait
using binders, so that fordyn Debug
, you have a predicate like<T> T: Debug
(here, the bound variableT
represents the self type).rustc uses
ExistentialPredicate
.The chalk way seems superior. Better to not have an extra form of predicate.
The goal would be to refactor rustc to use a binder + predicate.