diff options
| author | Michael Goulet <michael@errs.io> | 2024-09-29 22:10:16 -0400 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-10-01 13:55:46 -0400 |
| commit | e3a0da18633a8cfb5263bb975747352690b01fcf (patch) | |
| tree | e5f9850e4d0a47a6d7178469cea7f53bac319d20 /compiler/rustc_parse/src/parser | |
| parent | 8dd5cd0bc1d683c30805e1dc831cac546b621a75 (diff) | |
| download | rust-e3a0da18633a8cfb5263bb975747352690b01fcf.tar.gz rust-e3a0da18633a8cfb5263bb975747352690b01fcf.zip | |
Remove unnamed field feature
Diffstat (limited to 'compiler/rustc_parse/src/parser')
| -rw-r--r-- | compiler/rustc_parse/src/parser/item.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/rustc_parse/src/parser/item.rs b/compiler/rustc_parse/src/parser/item.rs index 9fc82d84225..13681c00f8e 100644 --- a/compiler/rustc_parse/src/parser/item.rs +++ b/compiler/rustc_parse/src/parser/item.rs @@ -2009,9 +2009,7 @@ impl<'a> Parser<'a> { /// for better diagnostics and suggestions. fn parse_field_ident(&mut self, adt_ty: &str, lo: Span) -> PResult<'a, Ident> { let (ident, is_raw) = self.ident_or_err(true)?; - if ident.name == kw::Underscore { - self.psess.gated_spans.gate(sym::unnamed_fields, lo); - } else if matches!(is_raw, IdentIsRaw::No) && ident.is_reserved() { + if matches!(is_raw, IdentIsRaw::No) && ident.is_reserved() { let snapshot = self.create_snapshot_for_diagnostic(); let err = if self.check_fn_front_matter(false, Case::Sensitive) { let inherited_vis = |
