Restore impl Future<Output = Type> to async blocks#95263
Restore impl Future<Output = Type> to async blocks#95263bors merged 1 commit intorust-lang:masterfrom
impl Future<Output = Type> to async blocks#95263Conversation
|
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. |
There was a problem hiding this comment.
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.
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.
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>::Returntype which appears very frequently inimpl Futuretypes that result from async block desugaring.