about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/parser
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-05-09 05:16:40 +0000
committerbors <bors@rust-lang.org>2025-05-09 05:16:40 +0000
commita7b1b24587dcbebf12455c41ed828d9b486487be (patch)
tree27891e5f5afa94ed826ea1805f509822e00c8d73 /compiler/rustc_parse/src/parser
parentc8b7f32434c0306db5c1b974ee43443746098a92 (diff)
parent0984db553ddd25c0d16ef68b91bd731825309ac5 (diff)
downloadrust-a7b1b24587dcbebf12455c41ed828d9b486487be.tar.gz
rust-a7b1b24587dcbebf12455c41ed828d9b486487be.zip
Auto merge of #140252 - nnethercote:rm-Ident-empty, r=oli-obk
Remove `Ident::empty`

All uses have been removed. And it's nonsensical: an identifier by definition has at least one char.

r? `@oli-obk`
Diffstat (limited to 'compiler/rustc_parse/src/parser')
-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 f3b53971b29..2a7910a6af4 100644
--- a/compiler/rustc_parse/src/parser/expr.rs
+++ b/compiler/rustc_parse/src/parser/expr.rs
@@ -3828,7 +3828,7 @@ impl<'a> Parser<'a> {
         // Convert `label` -> `'label`,
         // so that nameres doesn't complain about non-existing label
         let label = format!("'{}", ident.name);
-        let ident = Ident { name: Symbol::intern(&label), span: ident.span };
+        let ident = Ident::new(Symbol::intern(&label), ident.span);
 
         self.dcx().emit_err(errors::ExpectedLabelFoundIdent {
             span: ident.span,