From 02adaca4dc7eb4594d8bda9a7e04bc0247fc2a74 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Wed, 28 May 2014 22:26:56 -0700 Subject: librustc: Implement unboxed closures with mutable receivers --- src/libsyntax/visit.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/libsyntax/visit.rs') diff --git a/src/libsyntax/visit.rs b/src/libsyntax/visit.rs index cd953607ea2..d5fb75a4d69 100644 --- a/src/libsyntax/visit.rs +++ b/src/libsyntax/visit.rs @@ -562,7 +562,7 @@ pub fn walk_method_helper>(visitor: &mut V, method: &Method, env: E) { match method.node { - MethDecl(ident, ref generics, _, _, decl, body, _) => { + MethDecl(ident, ref generics, _, _, _, decl, body, _) => { visitor.visit_ident(method.span, ident, env.clone()); visitor.visit_fn(&FkMethod(ident, generics, method), &*decl, @@ -594,7 +594,7 @@ pub fn walk_fn>(visitor: &mut V, FkMethod(_, generics, method) => { visitor.visit_generics(generics, env.clone()); match method.node { - MethDecl(_, _, ref explicit_self, _, _, _, _) => + MethDecl(_, _, _, ref explicit_self, _, _, _, _) => visitor.visit_explicit_self(explicit_self, env.clone()), MethMac(ref mac) => visitor.visit_mac(mac, env.clone()) @@ -790,6 +790,14 @@ pub fn walk_expr>(visitor: &mut V, expression: &Expr, en expression.id, env.clone()) } + ExprUnboxedFn(ref function_declaration, ref body) => { + visitor.visit_fn(&FkFnBlock, + &**function_declaration, + &**body, + expression.span, + expression.id, + env.clone()) + } ExprProc(ref function_declaration, ref body) => { visitor.visit_fn(&FkFnBlock, &**function_declaration, -- cgit 1.4.1-3-g733a5