From d56ce8e199abec57746286995c7949356e2dfcf2 Mon Sep 17 00:00:00 2001 From: Camille GILLOT Date: Mon, 1 May 2023 08:51:47 +0000 Subject: Do not recover when parsing stmt in cfg-eval. --- compiler/rustc_parse/src/parser/stmt.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'compiler/rustc_parse/src/parser') diff --git a/compiler/rustc_parse/src/parser/stmt.rs b/compiler/rustc_parse/src/parser/stmt.rs index fbe5b88c49e..e883d6dbf61 100644 --- a/compiler/rustc_parse/src/parser/stmt.rs +++ b/compiler/rustc_parse/src/parser/stmt.rs @@ -37,7 +37,8 @@ impl<'a> Parser<'a> { /// If `force_collect` is [`ForceCollect::Yes`], forces collection of tokens regardless of whether /// or not we have attributes - pub(crate) fn parse_stmt_without_recovery( + // Public for `cfg_eval` macro expansion. + pub fn parse_stmt_without_recovery( &mut self, capture_semi: bool, force_collect: ForceCollect, -- cgit 1.4.1-3-g733a5