Implement multiple patterns with | in if let and while let
This commit is contained in:
@@ -1085,7 +1085,7 @@ pub enum ExprKind {
|
||||
/// `if let pat = expr { block } else { expr }`
|
||||
///
|
||||
/// This is desugared to a `match` expression.
|
||||
IfLet(P<Pat>, P<Expr>, P<Block>, Option<P<Expr>>),
|
||||
IfLet(Vec<P<Pat>>, P<Expr>, P<Block>, Option<P<Expr>>),
|
||||
/// A while loop, with an optional label
|
||||
///
|
||||
/// `'label: while expr { block }`
|
||||
@@ -1095,7 +1095,7 @@ pub enum ExprKind {
|
||||
/// `'label: while let pat = expr { block }`
|
||||
///
|
||||
/// This is desugared to a combination of `loop` and `match` expressions.
|
||||
WhileLet(P<Pat>, P<Expr>, P<Block>, Option<Label>),
|
||||
WhileLet(Vec<P<Pat>>, P<Expr>, P<Block>, Option<Label>),
|
||||
/// A for loop, with an optional label
|
||||
///
|
||||
/// `'label: for pat in expr { block }`
|
||||
|
||||
Reference in New Issue
Block a user