-
Notifications
You must be signed in to change notification settings - Fork 533
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
Describe Type Alias Impl Trait (TAIT) Inference Algorithm #1297
Conversation
Regarding |
Can you post a screenshot of what the mdbook-mermaid output looks like? cc @rust-lang/wg-rustc-dev-guide since this adds a new build tool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here are the links
* Explain how it invokes `type_of` | ||
* We look at the bounds, we are able to type check it as is | ||
|
||
```mermaid |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The `type_of` query, when applied to an opaque type O, returns the hidden type. That hidden type is computed by combining the results from each constraining function within defining scope of O. | ||
|
||
```mermaid | ||
flowchart TD |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
### Within the ordinary type check of a single function | ||
|
||
```mermaid | ||
flowchart TD |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When queries encounter a `opaque_ty_obligation`, they do not try to process them, but instead just store the constraints into the infcx. | ||
|
||
```mermaid | ||
graph TD |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay, adding an additional seems fine, @nikomatsakis do you know the best person to review this PR? Maybe oli-obk? |
@oli-obk is this alright |
needs another sync with the hackmd, but yea, we should merge this once it passes CI again. We can iterate on the details later |
@nikomatsakis Could you fix the CI failure? |
@JohnTitor CI says logs are deleted... are you able to see what the error is, and how does one restart CI? |
I cannot either as it's too old, but CI stopped at "Check line lengths" so there should be a long line. Actually, L3 on src/opaque-types-type-alias-impl-trait-inference.md has more than 100 characters. |
will merge this after CI succeeds, then sync with hackmd |
This PR contains a draft writeup explaining rust-lang/rust#92007. Mostly at this point it has diagrams that I wrote. The idea was to help myself understand that PR.
cc @oli-obk, who is going to help me finish it up
This hackmd is linked to the branch so that we can edit it live.