diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2013-10-28 15:22:49 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2013-10-29 10:34:17 -0700 |
| commit | 7e77bf17694e31c741fe3a31c7eca5437d9cb6d5 (patch) | |
| tree | 07fbf75c901955bc5b527929785e544829da92b0 /src/libsyntax/visit.rs | |
| parent | e6650c87a3800264a043b7f129e6a4841c4cc3f7 (diff) | |
| download | rust-7e77bf17694e31c741fe3a31c7eca5437d9cb6d5.tar.gz rust-7e77bf17694e31c741fe3a31c7eca5437d9cb6d5.zip | |
librustc: Implement the `proc` type as sugar for `~once fn` and `proc`
notation for closures, and disable the feature gate for `once fn` if used with the `~` sigil.
Diffstat (limited to 'src/libsyntax/visit.rs')
| -rw-r--r-- | src/libsyntax/visit.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libsyntax/visit.rs b/src/libsyntax/visit.rs index e879d67fbf2..09ee87d1701 100644 --- a/src/libsyntax/visit.rs +++ b/src/libsyntax/visit.rs @@ -560,6 +560,14 @@ pub fn walk_expr<E:Clone, V:Visitor<E>>(visitor: &mut V, expression: @Expr, env: expression.id, env.clone()) } + ExprProc(ref function_declaration, ref body) => { + visitor.visit_fn(&fk_fn_block, + function_declaration, + body, + expression.span, + expression.id, + env.clone()) + } ExprBlock(ref block) => visitor.visit_block(block, env.clone()), ExprAssign(left_hand_expression, right_hand_expression) => { visitor.visit_expr(right_hand_expression, env.clone()); |
