about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEric Holk <eric@theincredibleholk.org>2025-03-18 10:50:33 -0700
committerGitHub <noreply@github.com>2025-03-18 10:50:33 -0700
commit299e5d05147c3d3deefd3f85f6e994b5d05fb2f8 (patch)
tree31d9b639a7948b5d7d55a60f9258740383aa1438
parent9b0e7f62644b629c30b4157ad854296eca36ecf0 (diff)
downloadrust-299e5d05147c3d3deefd3f85f6e994b5d05fb2f8.tar.gz
rust-299e5d05147c3d3deefd3f85f6e994b5d05fb2f8.zip
Apply suggestions from code review
Co-authored-by: Travis Cross <tc@traviscross.com>
-rw-r--r--compiler/rustc_ast_pretty/src/pprust/state/expr.rs2
-rw-r--r--compiler/rustc_parse/src/parser/expr.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_ast_pretty/src/pprust/state/expr.rs b/compiler/rustc_ast_pretty/src/pprust/state/expr.rs
index 9e53ed41c46..caba5f2721a 100644
--- a/compiler/rustc_ast_pretty/src/pprust/state/expr.rs
+++ b/compiler/rustc_ast_pretty/src/pprust/state/expr.rs
@@ -774,7 +774,7 @@ impl<'a> State<'a> {
                 }
             }
             ast::ExprKind::Yield(e, YieldKind::Postfix) => {
-                // it's not possible to have a postfix yield with no expression.
+                // It's not possible to have a postfix yield with no expression.
                 let e = e.as_ref().unwrap();
                 self.print_expr_cond_paren(
                     e,
diff --git a/compiler/rustc_parse/src/parser/expr.rs b/compiler/rustc_parse/src/parser/expr.rs
index 28d100074f3..15a625314b4 100644
--- a/compiler/rustc_parse/src/parser/expr.rs
+++ b/compiler/rustc_parse/src/parser/expr.rs
@@ -1311,7 +1311,7 @@ impl<'a> Parser<'a> {
             return self.parse_match_block(lo, match_span, self_arg, MatchKind::Postfix);
         }
 
-        // Post-fix yield
+        // Parse a postfix `yield`.
         if self.eat_keyword(exp!(Yield)) {
             let yield_span = self.prev_token.span;
             self.psess.gated_spans.gate(sym::yield_expr, yield_span);