Skip to content

Commit e289e75

Browse files
authored
Merge pull request #2444 from smanilov/patch-22
Trivial: dedup word
2 parents d9f2873 + 64ccd09 commit e289e75

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/coroutine-closures.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ See the "follow-up: when do..." section below for an elaborated answer. The full
102102

103103
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.
104104

105-
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.
105+
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.
106106

107107
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.
108108

0 commit comments

Comments
 (0)