-
Notifications
You must be signed in to change notification settings - Fork 182
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
Generate clauses for placeholder associated types #795
Generate clauses for placeholder associated types #795
Conversation
4699940
to
5ffee10
Compare
@bors r+ |
🔒 Merge conflict This pull request and the master branch diverged in a way that cannot be automatically merged. Please rebase on top of the latest master branch, and let the reviewer approve again. How do I rebase?Assuming
You may also read Git Rebasing to Resolve Conflicts by Drew Blessing for a short tutorial. Please avoid the "Resolve conflicts" button on GitHub. It uses Sometimes step 4 will complete without asking for resolution. This is usually due to difference between how Error message
|
☔ The latest upstream changes (presumably #780) made this pull request unmergeable. Please resolve the merge conflicts. |
I'll rebase this one after #792 lands as it's likely to cause another conflict. |
5ffee10
to
52b52cf
Compare
@bors r+ |
☀️ Test successful - checks-actions |
Currently, we don't generate clauses for placeholder associated types (
TyKind::AssociatedType
) except for someFromEnv
s. This leads toNoSolution
for goals like(IntoIterator::IntoIter)<Opaque>: Iterator
whereOpaque = impl IntoIterator
.For every associated type in a trait definition
chalk with this patch generates
To be honest, I'm not entirely sure if
AssociatedTyDatum::to_program_clauses()
is the best place to generate those clauses in, but analogous clauses for placeholder opaque types are generated inOpaqueTyDatum::to_program_clauses()
, which I modeled after.Spotted in rust-lang/rust-analyzer#14680.