From b2d524c43d113bba72e0a23b4a97cbbeb6eb39bb Mon Sep 17 00:00:00 2001 From: Michael Goulet Date: Fri, 8 Aug 2025 18:46:02 +0000 Subject: Recover for PAT = EXPR {} --- compiler/rustc_parse/src/parser/expr.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'compiler/rustc_parse/src/parser') 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) }; -- cgit 1.4.1-3-g733a5