about summary refs log tree commit diff
path: root/compiler/rustc_parse
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-07-29 13:52:40 +0000
committerbors <bors@rust-lang.org>2025-07-29 13:52:40 +0000
commitac0cb05326706ef430a975aa85177e8642f2f457 (patch)
tree7868d247e17d0a09a2f04bffde39a646d2d6ff0e /compiler/rustc_parse
parent7278554d82fa474a4e8b5c67afb009e11e41a841 (diff)
parent7088bf5cc6f85afe9b5f688bc5de5512c0a10a82 (diff)
downloadrust-ac0cb05326706ef430a975aa85177e8642f2f457.tar.gz
rust-ac0cb05326706ef430a975aa85177e8642f2f457.zip
Auto merge of #144637 - Zalathar:rollup-t1yo1jy, r=Zalathar
Rollup of 6 pull requests

Successful merges:

 - rust-lang/rust#144560 (coverage: Treat `#[automatically_derived]` as `#[coverage(off)]`)
 - rust-lang/rust#144566 (Simplify `align_of_val::<[T]>(…)` → `align_of::<T>()`)
 - rust-lang/rust#144587 (expand: Micro-optimize prelude injection)
 - rust-lang/rust#144589 (Account for `.yield` in illegal postfix operator message)
 - rust-lang/rust#144615 (Make resolve_fn_signature responsible for its own rib.)
 - rust-lang/rust#144634 (Fix typo in `DropGuard` doc)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_parse')
-rw-r--r--compiler/rustc_parse/src/parser/expr.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/rustc_parse/src/parser/expr.rs b/compiler/rustc_parse/src/parser/expr.rs
index 3d89530f914..54d8a791025 100644
--- a/compiler/rustc_parse/src/parser/expr.rs
+++ b/compiler/rustc_parse/src/parser/expr.rs
@@ -785,9 +785,13 @@ impl<'a> Parser<'a> {
                     ExprKind::Call(_, _) => "a function call",
                     ExprKind::Await(_, _) => "`.await`",
                     ExprKind::Use(_, _) => "`.use`",
+                    ExprKind::Yield(YieldKind::Postfix(_)) => "`.yield`",
                     ExprKind::Match(_, _, MatchKind::Postfix) => "a postfix match",
                     ExprKind::Err(_) => return Ok(with_postfix),
-                    _ => unreachable!("parse_dot_or_call_expr_with_ shouldn't produce this"),
+                    _ => unreachable!(
+                        "did not expect {:?} as an illegal postfix operator following cast",
+                        with_postfix.kind
+                    ),
                 }
             );
             let mut err = self.dcx().struct_span_err(span, msg);