diff options
| author | Dylan DPC <dylan.dpc@gmail.com> | 2020-02-26 02:07:14 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-26 02:07:14 +0100 |
| commit | 7603c2cfba4c146aa71beb495085eaa01ff4b3d4 (patch) | |
| tree | 719815aae6382c886bfd755e70d603ca6cf3d00a /src/librustc_parse/parser | |
| parent | d050b00759b206458ba23a863d6a985198ee5588 (diff) | |
| parent | d134385823525255546deaa930af2d5b1eada0df (diff) | |
| download | rust-7603c2cfba4c146aa71beb495085eaa01ff4b3d4.tar.gz rust-7603c2cfba4c146aa71beb495085eaa01ff4b3d4.zip | |
Rollup merge of #69423 - petrochenkov:nont, r=Centril
syntax: Remove `Nt(Impl,Trait,Foreign)Item` Follow-up to https://github.com/rust-lang/rust/pull/69366. r? @Centril
Diffstat (limited to 'src/librustc_parse/parser')
| -rw-r--r-- | src/librustc_parse/parser/item.rs | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/src/librustc_parse/parser/item.rs b/src/librustc_parse/parser/item.rs index 5b2e5a9e454..d7d6fcd05b7 100644 --- a/src/librustc_parse/parser/item.rs +++ b/src/librustc_parse/parser/item.rs @@ -632,16 +632,10 @@ impl<'a> Parser<'a> { } pub fn parse_impl_item(&mut self) -> PResult<'a, Option<Option<P<AssocItem>>>> { - maybe_whole!(self, NtImplItem, |x| Some(Some(x))); self.parse_assoc_item(|_| true) } pub fn parse_trait_item(&mut self) -> PResult<'a, Option<Option<P<AssocItem>>>> { - maybe_whole!(self, NtTraitItem, |x| Some(Some(x))); - // This is somewhat dubious; We don't want to allow - // param names to be left off if there is a definition... - // - // We don't allow param names to be left off in edition 2018. self.parse_assoc_item(|t| t.span.rust_2018()) } @@ -834,8 +828,6 @@ impl<'a> Parser<'a> { /// Parses a foreign item (one in an `extern { ... }` block). pub fn parse_foreign_item(&mut self) -> PResult<'a, Option<Option<P<ForeignItem>>>> { - maybe_whole!(self, NtForeignItem, |item| Some(Some(item))); - Ok(self.parse_item_(|_| true)?.map(|Item { attrs, id, span, vis, ident, kind, tokens }| { let kind = match kind { ItemKind::Mac(a) => ForeignItemKind::Macro(a), |
