about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2023-12-05 21:53:18 +0000
committerMichael Goulet <michael@errs.io>2023-12-08 17:23:26 +0000
commit3ffacf75fef4837cc359de3ee54de572280698f6 (patch)
tree29d37d3d69f61c7f305ac3fbee503b2fc402d9c7 /src
parent6ebb66cea905dd41fc7f80f926171fefa313c03f (diff)
downloadrust-3ffacf75fef4837cc359de3ee54de572280698f6.tar.gz
rust-3ffacf75fef4837cc359de3ee54de572280698f6.zip
Make some matches exhaustive to avoid bugs, fix tools
Diffstat (limited to 'src')
-rw-r--r--src/closures.rs1
-rw-r--r--src/utils.rs1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/closures.rs b/src/closures.rs
index 638955948e9..f698f494ae5 100644
--- a/src/closures.rs
+++ b/src/closures.rs
@@ -275,6 +275,7 @@ fn rewrite_closure_fn_decl(
     let coro = match coroutine_kind {
         Some(ast::CoroutineKind::Async { .. }) => "async ",
         Some(ast::CoroutineKind::Gen { .. }) => "gen ",
+        Some(ast::CoroutineKind::AsyncGen { .. }) => "async gen ",
         None => "",
     };
     let mover = if matches!(capture, ast::CaptureBy::Value { .. }) {
diff --git a/src/utils.rs b/src/utils.rs
index 4392763cea6..7d7bbf11529 100644
--- a/src/utils.rs
+++ b/src/utils.rs
@@ -79,6 +79,7 @@ pub(crate) fn format_coro(coroutine_kind: &ast::CoroutineKind) -> &'static str {
     match coroutine_kind {
         ast::CoroutineKind::Async { .. } => "async ",
         ast::CoroutineKind::Gen { .. } => "gen ",
+        ast::CoroutineKind::AsyncGen { .. } => "async gen ",
     }
 }