diff options
Diffstat (limited to 'compiler/rustc_parse/src/parser/path.rs')
| -rw-r--r-- | compiler/rustc_parse/src/parser/path.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_parse/src/parser/path.rs b/compiler/rustc_parse/src/parser/path.rs index 264174b0ac7..12d50fdba10 100644 --- a/compiler/rustc_parse/src/parser/path.rs +++ b/compiler/rustc_parse/src/parser/path.rs @@ -630,9 +630,9 @@ impl<'a> Parser<'a> { Ok(ty) => GenericArg::Type(ty), 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; + if let Ok(expr) = (*snapshot).parse_expr_res(Restrictions::CONST_EXPR, None) + { + self.restore(snapshot); return Ok(Some(self.dummy_const_arg_needs_braces(err, expr.span))); } } |
