Skip to content

Commit ebaeab8

Browse files
committed
Allow while let chains on all editions
1 parent 645d0ad commit ebaeab8

File tree

7 files changed

+346
-401
lines changed

7 files changed

+346
-401
lines changed

compiler/rustc_parse/src/parser/expr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3020,7 +3020,7 @@ impl<'a> Parser<'a> {
30203020

30213021
/// Parses a `while` or `while let` expression (`while` token already eaten).
30223022
fn parse_expr_while(&mut self, opt_label: Option<Label>, lo: Span) -> PResult<'a, P<Expr>> {
3023-
let policy = LetChainsPolicy::EditionDependent { current_edition: lo.edition() };
3023+
let policy = LetChainsPolicy::AlwaysAllowed;
30243024
let cond = self.parse_expr_cond(policy).map_err(|mut err| {
30253025
err.span_label(lo, "while parsing the condition of this `while` expression");
30263026
err

0 commit comments

Comments
 (0)