-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Restore impl Future<Output = Type>
to async blocks
#95263
Conversation
r? @jackh726 (rust-highfive has picked a reviewer for you, use r? to override) |
☔ The latest upstream changes (presumably #94081) made this pull request unmergeable. Please resolve the merge conflicts. |
// Skip printing `<[generator@] as Generator<_>>::Return` from async blocks, | ||
// unless we can find out what generator return type it comes from. |
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.
Seems to say the inverse of what it should say
// Skip printing `<[generator@] as Generator<_>>::Return` from async blocks, | |
// unless we can find out what generator return type it comes from. | |
// Skip printing `<[generator@] as Generator<_>>::Return` from async blocks | |
// if we can find out what generator return type it comes from. |
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.
Maybe our perspectives are inverted -- so it does two things, 1. skips printing <[generator@] as Generator<_>>::Return
regardless, but 2. will instead print Output=Type
if it can find the return type. If it can't, it skips printing altogether.
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.
Oh, then the comment makes sense 👍🏼
r=me after rebase |
30a7f8b
to
7b2eaa3
Compare
@bors r=jackh726 |
📌 Commit 7b2eaa3 has been approved by |
Rollup of 5 pull requests Successful merges: - rust-lang#95130 (Stabilize thread::is_finished) - rust-lang#95263 (Restore `impl Future<Output = Type>` to async blocks) - rust-lang#95471 (Don't ICE when opaque types get their hidden type constrained again.) - rust-lang#95491 (Stabilize feature vec_retain_mut on Vec and VecDeque) - rust-lang#95497 (Spellchecking compiler comments) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
☔ The latest upstream changes (presumably #95506) made this pull request unmergeable. Please resolve the merge conflicts. |
I was sad when I undid some of the code I wrote in #91096 in the PR #95225, so I fixed it here to not print
[async output]
.This PR "manually" normalizes the associated type
<[generator] as Generator>::Return
type which appears very frequently inimpl Future
types that result from async block desugaring.