Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

align chalk and rustc dyn representation #30

Open
nikomatsakis opened this issue May 18, 2021 · 4 comments
Open

align chalk and rustc dyn representation #30

nikomatsakis opened this issue May 18, 2021 · 4 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@nikomatsakis
Copy link
Contributor

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).

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.

@nikomatsakis nikomatsakis added the help wanted Extra attention is needed label May 18, 2021
@nikomatsakis
Copy link
Contributor Author

nikomatsakis commented May 18, 2021

We may want to refactor rustc to have a WhereClause; ExistentialPredicate is almost a Binder<WhereClause>

@csmoe
Copy link
Member

csmoe commented May 19, 2021

@rustbot claim

@nikomatsakis
Copy link
Contributor Author

@csmoe note that this probably requires an MCP.

@csmoe
Copy link
Member

csmoe commented May 19, 2021

okay, I'll create that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants