about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/parser/diagnostics.rs
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2022-01-25 10:47:10 -0800
committerMichael Goulet <michael@errs.io>2022-01-25 10:47:10 -0800
commita090bb1dea18af72dce2195fa4de396bcb51061b (patch)
tree6dc713dc36ed7fbee4b5483792db4e3a68fa0cd7 /compiler/rustc_parse/src/parser/diagnostics.rs
parente7825f2b690c9a0d21b6f6d84c404bb53b151b38 (diff)
downloadrust-a090bb1dea18af72dce2195fa4de396bcb51061b.tar.gz
rust-a090bb1dea18af72dce2195fa4de396bcb51061b.zip
Remove delayed bug when encountering label in bad turbofish
Diffstat (limited to 'compiler/rustc_parse/src/parser/diagnostics.rs')
-rw-r--r--compiler/rustc_parse/src/parser/diagnostics.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_parse/src/parser/diagnostics.rs b/compiler/rustc_parse/src/parser/diagnostics.rs
index c41f2d3299b..15f29d083db 100644
--- a/compiler/rustc_parse/src/parser/diagnostics.rs
+++ b/compiler/rustc_parse/src/parser/diagnostics.rs
@@ -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(());