about summary refs log tree commit diff
path: root/src/libsyntax/ast.rs
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2018-02-24 03:12:35 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2018-02-24 03:12:35 +0300
commit8640a51ff8d580bbb87aa3dc0ff8bacbad111010 (patch)
tree88f843f5e37f4dcc658bb13104dba12e119a3b71 /src/libsyntax/ast.rs
parent063deba92e44809125a433ca6e6c1ad0993313bf (diff)
downloadrust-8640a51ff8d580bbb87aa3dc0ff8bacbad111010.tar.gz
rust-8640a51ff8d580bbb87aa3dc0ff8bacbad111010.zip
Implement multiple patterns with `|` in `if let` and `while let`
Diffstat (limited to 'src/libsyntax/ast.rs')
-rw-r--r--src/libsyntax/ast.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs
index c7ce7fffaa2..6609b77b132 100644
--- a/src/libsyntax/ast.rs
+++ b/src/libsyntax/ast.rs
@@ -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 }`