Update text/3668-async-closure.md

Co-authored-by: Yosh <github@yosh.is>
This commit is contained in:
Michael Goulet 2024-07-03 10:14:46 -04:00 committed by GitHub
parent 26ded68308
commit b2a8e07d50
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -520,7 +520,7 @@ There isn't currently a way to annotate the future's return type in a closure th
let c = || -> /* ??? */ async { 0 };
```
We could reuse `impl Future` to give users the ability to annotate the type of the future returned by the closure this position, but it would require giving yet another subtly different meaning to `impl Trait`, since async closures return a *different* type when being called by-ref or by-move.
We could reuse `impl Future` to give users the ability to annotate the type of the future returned by the closure in this position, but it would require giving yet another subtly different meaning to `impl Trait`, since async closures return a *different* type when being called by-ref or by-move.
This also would have subtle limitations, e.g.: