Skip to content
Permalink
Browse files

improve comments on `GeneratorKind` and `AsyncGeneratorKind`

  • Loading branch information...
nikomatsakis committed Oct 2, 2019
1 parent 3ae4abb commit a9991321135e0b6cfcc95c91b738879f68c4cf7c
Showing with 5 additions and 3 deletions.
  1. +5 −3 src/librustc/hir/mod.rs
@@ -1362,7 +1362,6 @@ impl Body {
}

/// The type of source expression that caused this generator to be created.
// Not `IsAsync` because we want to eventually add support for `AsyncGen`
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, HashStable,
RustcEncodable, RustcDecodable, Hash, Debug, Copy)]
pub enum GeneratorKind {
@@ -1382,8 +1381,11 @@ impl fmt::Display for GeneratorKind {
}
}

/// The type of source expression that caused this generator to be created.
// Not `IsAsync` because we want to eventually add support for `AsyncGen`
/// In the case of a generator created as part of an async construct,
/// which kind of async construct caused it to be created?
///
/// This helps error messages but is also used to drive coercions in
/// type-checking (see #60424).
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, HashStable,
RustcEncodable, RustcDecodable, Hash, Debug, Copy)]
pub enum AsyncGeneratorKind {

0 comments on commit a999132

Please sign in to comment.
You can’t perform that action at this time.