@@ -298,14 +298,10 @@ static_assert!(MEM_SIZE_OF_TY_KIND: ::std::mem::size_of::<TyKind<'_>>() == 24);
298298///
299299/// ## Generators
300300///
301- /// Perhaps surprisingly, `ClosureSubsts` are also used for
302- /// generators. In that case, what is written above is only half-true
303- /// -- the set of type parameters is similar, but the role of CK and
304- /// CS are different. CK represents the "yield type" and CS
305- /// represents the "return type" of the generator.
306- ///
307- /// It'd be nice to split this struct into ClosureSubsts and
308- /// GeneratorSubsts, I believe. -nmatsakis
301+ /// Generators are handled similarly in `GeneratorSubsts`. The set of
302+ /// type parameters is similar, but the role of CK and CS are
303+ /// different. CK represents the "yield type" and CS represents the
304+ /// "return type" of the generator.
309305#[ derive( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ,
310306 Debug , RustcEncodable , RustcDecodable , HashStable ) ]
311307pub struct ClosureSubsts < ' tcx > {
@@ -391,6 +387,7 @@ impl<'tcx> ClosureSubsts<'tcx> {
391387 }
392388}
393389
390+ /// Similar to `ClosureSubsts`; see the above documentation for more.
394391#[ derive( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash , Debug ,
395392 RustcEncodable , RustcDecodable , HashStable ) ]
396393pub struct GeneratorSubsts < ' tcx > {
0 commit comments