diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2018-02-24 03:12:35 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2018-02-24 03:12:35 +0300 |
| commit | 8640a51ff8d580bbb87aa3dc0ff8bacbad111010 (patch) | |
| tree | 88f843f5e37f4dcc658bb13104dba12e119a3b71 /src/libsyntax/ast.rs | |
| parent | 063deba92e44809125a433ca6e6c1ad0993313bf (diff) | |
| download | rust-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.rs | 4 |
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 }` |
