summary refs log tree commit diff
path: root/src/libsyntax/fold.rs
diff options
context:
space:
mode:
authorJohn Gallagher <jgallagher@bignerdranch.com>2014-10-02 22:45:46 -0400
committerJohn Gallagher <jgallagher@bignerdranch.com>2014-10-10 20:30:31 -0400
commit0c2c8116a307e88f8327e0ea846d2c9c135193b7 (patch)
treeb9f17f6dc86f3e98b77b0eaf18a7d5ecb05bd7a4 /src/libsyntax/fold.rs
parent78a7676898d9f80ab540c6df5d4c9ce35bb50463 (diff)
downloadrust-0c2c8116a307e88f8327e0ea846d2c9c135193b7.tar.gz
rust-0c2c8116a307e88f8327e0ea846d2c9c135193b7.zip
Teach libsyntax about `while let`
Diffstat (limited to 'src/libsyntax/fold.rs')
-rw-r--r--src/libsyntax/fold.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libsyntax/fold.rs b/src/libsyntax/fold.rs
index 32e226361e9..6ecb4d3208d 100644
--- a/src/libsyntax/fold.rs
+++ b/src/libsyntax/fold.rs
@@ -1218,6 +1218,12 @@ pub fn noop_fold_expr<T: Folder>(Expr {id, node, span}: Expr, folder: &mut T) ->
                           folder.fold_block(body),
                           opt_ident.map(|i| folder.fold_ident(i)))
             }
+            ExprWhileLet(pat, expr, body, opt_ident) => {
+                ExprWhileLet(folder.fold_pat(pat),
+                             folder.fold_expr(expr),
+                             folder.fold_block(body),
+                             opt_ident.map(|i| folder.fold_ident(i)))
+            }
             ExprForLoop(pat, iter, body, opt_ident) => {
                 ExprForLoop(folder.fold_pat(pat),
                             folder.fold_expr(iter),