about summary refs log tree commit diff
path: root/compiler/rustc_ast_pretty/src/pprust/state.rs
diff options
context:
space:
mode:
authorEric Holk <ericholk@microsoft.com>2023-11-30 16:39:56 -0800
committerEric Holk <ericholk@microsoft.com>2023-12-04 13:03:37 -0800
commitf9d1f922dcd335e534d40923ab54088c07a5403e (patch)
treec268e5049e6492ebdbe081b049c562b51031d799 /compiler/rustc_ast_pretty/src/pprust/state.rs
parent48d5f1f0f26b78f76c5fcf0dda5ac93b8754aeb6 (diff)
downloadrust-f9d1f922dcd335e534d40923ab54088c07a5403e.tar.gz
rust-f9d1f922dcd335e534d40923ab54088c07a5403e.zip
Option<CoroutineKind>
Diffstat (limited to 'compiler/rustc_ast_pretty/src/pprust/state.rs')
-rw-r--r--compiler/rustc_ast_pretty/src/pprust/state.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_ast_pretty/src/pprust/state.rs b/compiler/rustc_ast_pretty/src/pprust/state.rs
index 1e69674d30a..1ad28ffbf2b 100644
--- a/compiler/rustc_ast_pretty/src/pprust/state.rs
+++ b/compiler/rustc_ast_pretty/src/pprust/state.rs
@@ -1492,7 +1492,6 @@ impl<'a> State<'a> {
 
     fn print_coro_kind(&mut self, coro_kind: ast::CoroutineKind) {
         match coro_kind {
-            ast::CoroutineKind::None => {}
             ast::CoroutineKind::Gen { .. } => {
                 self.word_nbsp("gen");
             }
@@ -1691,7 +1690,7 @@ impl<'a> State<'a> {
 
     fn print_fn_header_info(&mut self, header: ast::FnHeader) {
         self.print_constness(header.constness);
-        self.print_coro_kind(header.coro_kind);
+        header.coro_kind.map(|coro_kind| self.print_coro_kind(coro_kind));
         self.print_unsafety(header.unsafety);
 
         match header.ext {