@@ -67,7 +67,7 @@ struct NeedsDropTypes<'tcx, F> {
67
67
tcx : TyCtxt < ' tcx > ,
68
68
param_env : ty:: ParamEnv < ' tcx > ,
69
69
// Whether to reveal coroutine witnesses, this is set
70
- // to `false` unless we compute `needs_drop` for a generator witness.
70
+ // to `false` unless we compute `needs_drop` for a coroutine witness.
71
71
reveal_coroutine_witnesses : bool ,
72
72
query_ty : Ty < ' tcx > ,
73
73
seen_tys : FxHashSet < Ty < ' tcx > > ,
@@ -138,11 +138,11 @@ where
138
138
// computed on MIR, while this very method is used to build MIR.
139
139
// To avoid cycles, we consider that coroutines always require drop.
140
140
//
141
- // HACK: Because we erase regions contained in the generator witness, we
141
+ // HACK: Because we erase regions contained in the coroutine witness, we
142
142
// have to conservatively assume that every region captured by the
143
- // generator has to be live when dropped. This results in a lot of
143
+ // coroutine has to be live when dropped. This results in a lot of
144
144
// undesirable borrowck errors. During borrowck, we call `needs_drop`
145
- // for the generator witness and check whether any of the contained types
145
+ // for the coroutine witness and check whether any of the contained types
146
146
// need to be dropped, and only require the captured types to be live
147
147
// if they do.
148
148
ty:: Coroutine ( _, args, _) => {
0 commit comments