From 527b1f3c2fb478cf30c9b33e945da2adaf29b6e0 Mon Sep 17 00:00:00 2001 From: Takayuki Maeda Date: Wed, 9 Mar 2022 12:59:46 +0900 Subject: [PATCH] initialize unclosed_delims field --- 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 0bccf4dc2cef6..750d7cce0c0e7 100644 --- a/compiler/rustc_parse/src/parser/path.rs +++ b/compiler/rustc_parse/src/parser/path.rs @@ -626,6 +626,7 @@ impl<'a> Parser<'a> { // Parse type argument. let is_const_fn = self.look_ahead(1, |t| t.kind == token::OpenDelim(token::Paren)); let mut snapshot = self.clone(); + snapshot.unclosed_delims = vec![]; match self.parse_ty() { Ok(ty) => GenericArg::Type(ty), Err(err) => {