take over unclosed_delims

This commit is contained in:
Takayuki Maeda 2022-03-09 16:04:14 +09:00
parent 3514741358
commit 192acb4b98

View File

@ -631,6 +631,7 @@ pub(super) fn parse_generic_arg(
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)));
}