1
Fork 0

Remove delayed bug when encountering label in bad turbofish

This commit is contained in:
Michael Goulet 2022-01-25 10:47:10 -08:00
parent e7825f2b69
commit a090bb1dea
6 changed files with 45 additions and 6 deletions

View file

@ -737,7 +737,7 @@ impl<'a> Parser<'a> {
"::".to_string(),
Applicability::MaybeIncorrect,
);
if self.check(&TokenKind::Semi) {
if matches!(self.token.kind, token::Semi | token::CloseDelim(_)) {
turbo_err.emit();
*expr = self.mk_expr_err(expr.span);
return Ok(());