From 192acb4b98bb027cb09eaeb8906dbc94a76b9b66 Mon Sep 17 00:00:00 2001 From: Takayuki Maeda Date: Wed, 9 Mar 2022 16:04:14 +0900 Subject: [PATCH] take over unclosed_delims --- compiler/rustc_parse/src/parser/path.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/compiler/rustc_parse/src/parser/path.rs b/compiler/rustc_parse/src/parser/path.rs index c8ebf707477ac..264174b0ac71d 100644 --- a/compiler/rustc_parse/src/parser/path.rs +++ b/compiler/rustc_parse/src/parser/path.rs @@ -631,6 +631,7 @@ impl<'a> Parser<'a> { Err(err) => { if is_const_fn { if let Ok(expr) = snapshot.parse_expr_res(Restrictions::CONST_EXPR, None) { + snapshot.unclosed_delims.extend(self.unclosed_delims.clone()); *self = snapshot; return Ok(Some(self.dummy_const_arg_needs_braces(err, expr.span))); }