Skip to content

Commit 192acb4

Browse files
committed
take over unclosed_delims
1 parent 3514741 commit 192acb4

File tree

1 file changed

+1
-0
lines changed
  • compiler/rustc_parse/src/parser

1 file changed

+1
-0
lines changed

compiler/rustc_parse/src/parser/path.rs

+1
Original file line numberDiff line numberDiff line change
@@ -631,6 +631,7 @@ impl<'a> Parser<'a> {
631631
Err(err) => {
632632
if is_const_fn {
633633
if let Ok(expr) = snapshot.parse_expr_res(Restrictions::CONST_EXPR, None) {
634+
snapshot.unclosed_delims.extend(self.unclosed_delims.clone());
634635
*self = snapshot;
635636
return Ok(Some(self.dummy_const_arg_needs_braces(err, expr.span)));
636637
}

0 commit comments

Comments
 (0)