Skip to content

Commit

Permalink
take over unclosed_delims
Browse files Browse the repository at this point in the history
  • Loading branch information
TaKO8Ki committed Mar 9, 2022
1 parent 3514741 commit 192acb4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions compiler/rustc_parse/src/parser/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)));
}
Expand Down

0 comments on commit 192acb4

Please sign in to comment.