1
Fork 0

Auto merge of #138083 - nnethercote:rm-NtItem-NtStmt, r=petrochenkov

Remove `NtItem` and `NtStmt`

Another piece of #124141.

r? `@petrochenkov`
This commit is contained in:
bors 2025-03-12 14:18:36 +00:00
commit aaa2d47dae
49 changed files with 273 additions and 145 deletions

View file

@ -1364,7 +1364,6 @@ impl<'a> Parser<'a> {
self.bump();
return Ok(self.mk_expr(self.prev_token.span, ExprKind::Block(block, None)));
}
_ => {}
};
} else if let Some(path) = self.eat_metavar_seq(MetaVarKind::Path, |this| {
this.collect_tokens_no_attrs(|this| this.parse_path(PathStyle::Type))
@ -3064,7 +3063,7 @@ impl<'a> Parser<'a> {
}
self.restore_snapshot(pre_pat_snapshot);
match self.parse_stmt_without_recovery(true, ForceCollect::No) {
match self.parse_stmt_without_recovery(true, ForceCollect::No, false) {
// Consume statements for as long as possible.
Ok(Some(stmt)) => {
stmts.push(stmt);