@@ -1049,10 +1049,9 @@ impl Expr {
1049
1049
ExprKind :: Unary ( ..) => ExprPrecedence :: Unary ,
1050
1050
ExprKind :: Lit ( _) => ExprPrecedence :: Lit ,
1051
1051
ExprKind :: Type ( ..) | ExprKind :: Cast ( ..) => ExprPrecedence :: Cast ,
1052
+ ExprKind :: Let ( ..) => ExprPrecedence :: Let ,
1052
1053
ExprKind :: If ( ..) => ExprPrecedence :: If ,
1053
- ExprKind :: IfLet ( ..) => ExprPrecedence :: IfLet ,
1054
1054
ExprKind :: While ( ..) => ExprPrecedence :: While ,
1055
- ExprKind :: WhileLet ( ..) => ExprPrecedence :: WhileLet ,
1056
1055
ExprKind :: ForLoop ( ..) => ExprPrecedence :: ForLoop ,
1057
1056
ExprKind :: Loop ( ..) => ExprPrecedence :: Loop ,
1058
1057
ExprKind :: Match ( ..) => ExprPrecedence :: Match ,
@@ -1135,26 +1134,17 @@ pub enum ExprKind {
1135
1134
Cast ( P < Expr > , P < Ty > ) ,
1136
1135
/// A type ascription (e.g., `42: usize`).
1137
1136
Type ( P < Expr > , P < Ty > ) ,
1137
+ /// A `let pat = expr` pseudo-expression that only occurs in the scrutinee
1138
+ /// of `if` / `while` expressions. (e.g., `if let 0 = x { .. }`).
1139
+ Let ( Vec < P < Pat > > , P < Expr > ) ,
1138
1140
/// An `if` block, with an optional `else` block.
1139
1141
///
1140
1142
/// `if expr { block } else { expr }`
1141
1143
If ( P < Expr > , P < Block > , Option < P < Expr > > ) ,
1142
- /// An `if let` expression with an optional else block
1143
- ///
1144
- /// `if let pat = expr { block } else { expr }`
1145
- ///
1146
- /// This is desugared to a `match` expression.
1147
- IfLet ( Vec < P < Pat > > , P < Expr > , P < Block > , Option < P < Expr > > ) ,
1148
- /// A while loop, with an optional label
1144
+ /// A while loop, with an optional label.
1149
1145
///
1150
1146
/// `'label: while expr { block }`
1151
1147
While ( P < Expr > , P < Block > , Option < Label > ) ,
1152
- /// A `while let` loop, with an optional label.
1153
- ///
1154
- /// `'label: while let pat = expr { block }`
1155
- ///
1156
- /// This is desugared to a combination of `loop` and `match` expressions.
1157
- WhileLet ( Vec < P < Pat > > , P < Expr > , P < Block > , Option < Label > ) ,
1158
1148
/// A `for` loop, with an optional label.
1159
1149
///
1160
1150
/// `'label: for pat in expr { block }`
0 commit comments