Skip to content

Commit bcd0546

Browse files
committed
Auto merge of #47515 - jimmantooth:patch-1, r=QuietMisdreavus
Punctuation and clarity fixes.
2 parents 679f30e + c2e2612 commit bcd0546

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/doc/unstable-book/src/language-features/generators.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,11 @@ closure-like semantics. Namely:
139139
types and such.
140140

141141
* Traits like `Send` and `Sync` are automatically implemented for a `Generator`
142-
depending on the captured variables of the environment. Unlike closures though
142+
depending on the captured variables of the environment. Unlike closures,
143143
generators also depend on variables live across suspension points. This means
144144
that although the ambient environment may be `Send` or `Sync`, the generator
145145
itself may not be due to internal variables live across `yield` points being
146-
not-`Send` or not-`Sync`. Note, though, that generators, like closures, do
146+
not-`Send` or not-`Sync`. Note that generators, like closures, do
147147
not implement traits like `Copy` or `Clone` automatically.
148148

149149
* Whenever a generator is dropped it will drop all captured environment
@@ -155,7 +155,7 @@ lifted at a future date, the design is ongoing!
155155

156156
### Generators as state machines
157157

158-
In the compiler generators are currently compiled as state machines. Each
158+
In the compiler, generators are currently compiled as state machines. Each
159159
`yield` expression will correspond to a different state that stores all live
160160
variables over that suspension point. Resumption of a generator will dispatch on
161161
the current state and then execute internally until a `yield` is reached, at

0 commit comments

Comments
 (0)