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

Avoid inference guessing in trait solver (e.g., favoring where-clauses over impls) #120

Open
nikomatsakis opened this issue Oct 11, 2023 · 1 comment
Labels
roadmap-tracking-issue Tracks an item on our types team roadmap.
Milestone

Comments

@nikomatsakis
Copy link
Contributor

nikomatsakis commented Oct 11, 2023

The current trait solver performs "inference guessing" in various places, leading to incompleteness (failure to find solutions that exist). We avoid unsoundness by eliminating incompletness in coherence. But it may be possible to refactor the trait solver to instead return "guidance"; it would be up to HIR type check or other phases to decide if/when to apply this guidance. This would lead to more programs being compiled but also a cleaner overall setup. Experimentation is required to see if this truly works.

cc rust-lang/rust#41756

@nikomatsakis nikomatsakis converted this from a draft issue Oct 11, 2023
@nikomatsakis nikomatsakis added the roadmap-tracking-issue Tracks an item on our types team roadmap. label Oct 11, 2023
@nikomatsakis nikomatsakis added this to the Heat Death milestone Oct 11, 2023
@lcnr
Copy link
Contributor

lcnr commented Dec 4, 2023

update: not actively worked on, requires the solver to be more settled, currently not a main focus.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
roadmap-tracking-issue Tracks an item on our types team roadmap.
Projects
Status: No status
Development

No branches or pull requests

2 participants