diff options
| author | Stan Manilov <stanislav.manilov@gmail.com> | 2025-06-02 17:02:34 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-02 17:02:34 +0300 |
| commit | 3b85b2f550ef5511aa86b07f28c759ea5a838693 (patch) | |
| tree | 6eeec53a8fe9b6730d594208f369a95856b7426c | |
| parent | d6cc62c8c50a5eb45372dc6c97bf76601653f028 (diff) | |
| download | rust-3b85b2f550ef5511aa86b07f28c759ea5a838693.tar.gz rust-3b85b2f550ef5511aa86b07f28c759ea5a838693.zip | |
Trivial: dedup word
| -rw-r--r-- | src/doc/rustc-dev-guide/src/coroutine-closures.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/doc/rustc-dev-guide/src/coroutine-closures.md b/src/doc/rustc-dev-guide/src/coroutine-closures.md index 04742d03c50..4a708fc8892 100644 --- a/src/doc/rustc-dev-guide/src/coroutine-closures.md +++ b/src/doc/rustc-dev-guide/src/coroutine-closures.md @@ -102,7 +102,7 @@ See the "follow-up: when do..." section below for an elaborated answer. The full When async closures are called with `AsyncFn`/`AsyncFnMut`, they return a coroutine that borrows from the closure. However, when they are called via `AsyncFnOnce`, we consume that closure, and cannot return a coroutine that borrows from data that is now dropped. -To work around around this limitation, we synthesize a separate by-move MIR body for calling `AsyncFnOnce::call_once` on a coroutine-closure that can be called by-ref. +To work around this limitation, we synthesize a separate by-move MIR body for calling `AsyncFnOnce::call_once` on a coroutine-closure that can be called by-ref. This body operates identically to the "normal" coroutine returned from calling the coroutine-closure, except for the fact that it has a different set of upvars, since we must *move* the captures from the parent coroutine-closure into the child coroutine. |
