@@ -139,11 +139,11 @@ closure-like semantics. Namely:
139
139
types and such.
140
140
141
141
* 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,
143
143
generators also depend on variables live across suspension points. This means
144
144
that although the ambient environment may be ` Send ` or ` Sync ` , the generator
145
145
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
147
147
not implement traits like ` Copy ` or ` Clone ` automatically.
148
148
149
149
* Whenever a generator is dropped it will drop all captured environment
@@ -155,7 +155,7 @@ lifted at a future date, the design is ongoing!
155
155
156
156
### Generators as state machines
157
157
158
- In the compiler generators are currently compiled as state machines. Each
158
+ In the compiler, generators are currently compiled as state machines. Each
159
159
` yield ` expression will correspond to a different state that stores all live
160
160
variables over that suspension point. Resumption of a generator will dispatch on
161
161
the current state and then execute internally until a ` yield ` is reached, at
0 commit comments