-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Restore impl Future<Output = Type>
to async blocks
#95263
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
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.