about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/parser/expr.rs
diff options
context:
space:
mode:
authorJacob Pratt <jacob@jhpratt.dev>2025-08-22 22:00:47 -0400
committerGitHub <noreply@github.com>2025-08-22 22:00:47 -0400
commit2dbd411d229ee382b1cf2ec3af84cd581d56d521 (patch)
tree6b1323a95a2e0d5e1cf13638ca3ed674906e25fb /compiler/rustc_parse/src/parser/expr.rs
parent2bd39222cdb9b6bb182c4de44cde99048942683b (diff)
parent4970127c33a2cfd7b7035daedba7cac512a2e201 (diff)
downloadrust-2dbd411d229ee382b1cf2ec3af84cd581d56d521.tar.gz
rust-2dbd411d229ee382b1cf2ec3af84cd581d56d521.zip
Rollup merge of #144897 - fee1-dead-contrib:raw_lifetimes_printing, r=fmease
print raw lifetime idents with r#

This replaces rust-lang/rust#143185 and fixes rust-lang/rust#143150

cc ``@fmease``
Diffstat (limited to 'compiler/rustc_parse/src/parser/expr.rs')
-rw-r--r--compiler/rustc_parse/src/parser/expr.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_parse/src/parser/expr.rs b/compiler/rustc_parse/src/parser/expr.rs
index 6aa6fc2c790..1499808966c 100644
--- a/compiler/rustc_parse/src/parser/expr.rs
+++ b/compiler/rustc_parse/src/parser/expr.rs
@@ -3094,7 +3094,7 @@ impl<'a> Parser<'a> {
         if let Some((ident, is_raw)) = self.token.lifetime() {
             // Disallow `'fn`, but with a better error message than `expect_lifetime`.
             if matches!(is_raw, IdentIsRaw::No) && ident.without_first_quote().is_reserved() {
-                self.dcx().emit_err(errors::InvalidLabel { span: ident.span, name: ident.name });
+                self.dcx().emit_err(errors::KeywordLabel { span: ident.span });
             }
 
             self.bump();