rust-lang / chalk

An implementation and definition of the Rust trait system using a PROLOG-like logic solver
https://rust-lang.github.io/chalk/book/
Other
1.81k stars 179 forks source link

Support trait upcasting #796

Open lowr opened 1 year ago

lowr commented 1 year ago

This PR implements RFC3324, dyn Trait upcasting (cc rust-lang/rust#65991).

As explained in the RFC, this PR adds builtin clauses for Unsize with applicability checks:

// when Trait2 is a super trait of Trait1 and AutoY is a subset of AutoX:
dyn Trait1 + AutoX + 'a: Unsize<dyn Trait2 + AutoY + 'b> :- EqGoal(...), 'a: 'b.
jackh726 commented 1 year ago

This one I'll have to get back to

bors commented 1 year ago

:umbrella: The latest upstream changes (presumably #780) made this pull request unmergeable. Please resolve the merge conflicts.