diff options
| author | bors <bors@rust-lang.org> | 2024-02-13 08:33:04 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-02-13 08:33:04 +0000 |
| commit | 41555ab4a39e18f59387a576bf1c19ef39093a60 (patch) | |
| tree | 5ed166021ffb0cc6a84667f2801a90486858a747 /compiler/rustc_parse/src/parser | |
| parent | d2e446d39e2390093042a7fd8676cc85f2b573d7 (diff) | |
| parent | 43e9411db839747f650e1125ed06266566c20b65 (diff) | |
| download | rust-41555ab4a39e18f59387a576bf1c19ef39093a60.tar.gz rust-41555ab4a39e18f59387a576bf1c19ef39093a60.zip | |
Auto merge of #3298 - rust-lang:rustup-2024-02-13, r=oli-obk
Automatic Rustup
Diffstat (limited to 'compiler/rustc_parse/src/parser')
| -rw-r--r-- | compiler/rustc_parse/src/parser/ty.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/rustc_parse/src/parser/ty.rs b/compiler/rustc_parse/src/parser/ty.rs index 5fe54a536a7..157fb9e505a 100644 --- a/compiler/rustc_parse/src/parser/ty.rs +++ b/compiler/rustc_parse/src/parser/ty.rs @@ -396,8 +396,9 @@ impl<'a> Parser<'a> { self.parse_record_struct_body(if is_union { "union" } else { "struct" }, lo, false)?; let span = lo.to(self.prev_token.span); self.sess.gated_spans.gate(sym::unnamed_fields, span); - // These can be rejected during AST validation in `deny_anon_struct_or_union`. - let kind = if is_union { TyKind::AnonUnion(fields) } else { TyKind::AnonStruct(fields) }; + let id = ast::DUMMY_NODE_ID; + let kind = + if is_union { TyKind::AnonUnion(id, fields) } else { TyKind::AnonStruct(id, fields) }; Ok(self.mk_ty(span, kind)) } |
