about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/parser/mod.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-03-12 14:18:36 +0000
committerbors <bors@rust-lang.org>2025-03-12 14:18:36 +0000
commitaaa2d47daebb02454fc7c08c04c3c603d5efeedb (patch)
tree5e9b8a105ac6c0ef89419df3333303f81489ae1c /compiler/rustc_parse/src/parser/mod.rs
parent0998d4095b0f11061f78a3f9c77a87838a4c1cb7 (diff)
parent3378ee1a4f2ddfc4b740b70d286fc32d81aca005 (diff)
downloadrust-aaa2d47daebb02454fc7c08c04c3c603d5efeedb.tar.gz
rust-aaa2d47daebb02454fc7c08c04c3c603d5efeedb.zip
Auto merge of #138083 - nnethercote:rm-NtItem-NtStmt, r=petrochenkov
Remove `NtItem` and `NtStmt`

Another piece of #124141.

r? `@petrochenkov`
Diffstat (limited to 'compiler/rustc_parse/src/parser/mod.rs')
-rw-r--r--compiler/rustc_parse/src/parser/mod.rs12
1 files changed, 8 insertions, 4 deletions
diff --git a/compiler/rustc_parse/src/parser/mod.rs b/compiler/rustc_parse/src/parser/mod.rs
index 4ec8d9e5e49..323c0c1d6d0 100644
--- a/compiler/rustc_parse/src/parser/mod.rs
+++ b/compiler/rustc_parse/src/parser/mod.rs
@@ -1076,10 +1076,12 @@ impl<'a> Parser<'a> {
         let initial_semicolon = self.token.span;
 
         while self.eat(exp!(Semi)) {
-            let _ = self.parse_stmt_without_recovery(false, ForceCollect::No).unwrap_or_else(|e| {
-                e.cancel();
-                None
-            });
+            let _ = self
+                .parse_stmt_without_recovery(false, ForceCollect::No, false)
+                .unwrap_or_else(|e| {
+                    e.cancel();
+                    None
+                });
         }
 
         expect_err
@@ -1746,6 +1748,8 @@ pub enum ParseNtResult {
     Tt(TokenTree),
     Ident(Ident, IdentIsRaw),
     Lifetime(Ident, IdentIsRaw),
+    Item(P<ast::Item>),
+    Stmt(P<ast::Stmt>),
     Pat(P<ast::Pat>, NtPatKind),
     Ty(P<ast::Ty>),
     Meta(P<ast::AttrItem>),