-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
add various coments to explain how the TAIT code works #86437
Conversation
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.
Something in the docs doesn't add up 100%, r=me with that fixed
/// * `anon_ty` would be `Box<Foo<T>>` where `Foo` is an opaque type | ||
/// scoped to this function (note that it is parameterized by the | ||
/// generics of `foo`). | ||
/// * `revealed_ty` would be `Box<(Foo<T>, u32)>` |
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.
/// * `revealed_ty` would be `Box<(Foo<T>, u32)>` | |
/// * `revealed_ty` would be `Box<(T, u32)>` |
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.
and then this would actually just be (T, u32)
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.
correct
/// | ||
/// In terms of our function parameters: | ||
/// | ||
/// * `anon_ty` would be `Box<Foo<T>>` where `Foo` is an opaque type |
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.
Isn't the anon_ty just Foo<T>
?
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.
No, it's not. It's the return type, which contains opaque types (but also maybe other stuff). That's explicitly why I included the Box
in the example. Let me clarify that.
@bors r=oli-obk |
📌 Commit 831759a has been approved by |
add various coments to explain how the TAIT code works r? `@oli-obk`
☀️ Test successful - checks-actions |
r? @oli-obk