diff options
| author | Michael Goulet <michael@errs.io> | 2025-08-08 18:46:02 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2025-08-08 18:46:09 +0000 |
| commit | b2d524c43d113bba72e0a23b4a97cbbeb6eb39bb (patch) | |
| tree | 8529b835ca69e08a576c2ffd97c266b158626905 /compiler/rustc_parse/src/parser/expr.rs | |
| parent | 2886b36df4a646dd8d82fb65bf0c9d8d96c1f71a (diff) | |
| download | rust-b2d524c43d113bba72e0a23b4a97cbbeb6eb39bb.tar.gz rust-b2d524c43d113bba72e0a23b4a97cbbeb6eb39bb.zip | |
Recover for PAT = EXPR {}
Diffstat (limited to 'compiler/rustc_parse/src/parser/expr.rs')
| -rw-r--r-- | compiler/rustc_parse/src/parser/expr.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_parse/src/parser/expr.rs b/compiler/rustc_parse/src/parser/expr.rs index 35b987cf50f..cbf6b78431c 100644 --- a/compiler/rustc_parse/src/parser/expr.rs +++ b/compiler/rustc_parse/src/parser/expr.rs @@ -3028,6 +3028,8 @@ impl<'a> Parser<'a> { let span = self.token.span; self.bump(); (span, errors::MissingInInForLoopSub::InNotOf) + } else if self.eat(exp!(Eq)) { + (self.prev_token.span, errors::MissingInInForLoopSub::InNotEq) } else { (self.prev_token.span.between(self.token.span), errors::MissingInInForLoopSub::AddIn) }; |
