Bubble parse error when expecting )

This commit is contained in:
Esteban Küber 2023-11-06 23:19:14 +00:00
parent 075c599188
commit 1994abed74
7 changed files with 25 additions and 51 deletions

View file

@ -875,6 +875,9 @@ impl<'a> Parser<'a> {
if self.token == token::Colon {
// we will try to recover in `maybe_recover_struct_lit_bad_delims`
return Err(expect_err);
} else if let [token::CloseDelim(Delimiter::Parenthesis)] = kets
{
return Err(expect_err);
} else {
expect_err.emit();
break;