diff options
| -rw-r--r-- | compiler/rustc_hir/src/hir.rs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/compiler/rustc_hir/src/hir.rs b/compiler/rustc_hir/src/hir.rs index dfeee3f356f..cc6ddad2e15 100644 --- a/compiler/rustc_hir/src/hir.rs +++ b/compiler/rustc_hir/src/hir.rs @@ -1441,7 +1441,7 @@ pub enum AsyncGeneratorKind { /// An explicit `async` block written by the user. Block, - /// An explicit `async` block written by the user. + /// An explicit `async` closure written by the user. Closure, /// The `async` block generated as the body of an async function. @@ -2078,10 +2078,7 @@ pub enum YieldSource { impl YieldSource { pub fn is_await(&self) -> bool { - match self { - YieldSource::Await { .. } => true, - YieldSource::Yield => false, - } + matches!(self, YieldSource::Await { .. }) } } |
