From ca05828cb7b6e985c43b6ed716155478f529b308 Mon Sep 17 00:00:00 2001 From: John Clements Date: Mon, 14 Jul 2014 16:31:52 -0700 Subject: change to new trait style for method field refs Per @pnkfelix 's suggestion, using a trait to make these field accesses more readable (and vastly more similar to the original code. oops fix new ast_map fix --- src/libsyntax/ast_map/blocks.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/libsyntax/ast_map') diff --git a/src/libsyntax/ast_map/blocks.rs b/src/libsyntax/ast_map/blocks.rs index 1280b884f11..a522f805543 100644 --- a/src/libsyntax/ast_map/blocks.rs +++ b/src/libsyntax/ast_map/blocks.rs @@ -26,7 +26,7 @@ use ast::{P, Block, FnDecl, NodeId}; use ast; use ast_map::{Node}; use ast_map; -use ast_util; +use ast_util::PostExpansionMethod; use codemap::Span; use visit; @@ -152,13 +152,13 @@ impl FnLikeNode { pub fn body<'a>(&'a self) -> P { self.handle(|i: ItemFnParts| i.body, - |m: &'a ast::Method| ast_util::method_body(m), + |m: &'a ast::Method| m.pe_body(), |c: ClosureParts| c.body) } pub fn decl<'a>(&'a self) -> P { self.handle(|i: ItemFnParts| i.decl, - |m: &'a ast::Method| ast_util::method_fn_decl(m), + |m: &'a ast::Method| m.pe_fn_decl(), |c: ClosureParts| c.decl) } @@ -182,7 +182,7 @@ impl FnLikeNode { visit::FkFnBlock }; let method = |m: &'a ast::Method| { - visit::FkMethod(ast_util::method_ident(m), ast_util::method_generics(m), m) + visit::FkMethod(m.pe_ident(), m.pe_generics(), m) }; self.handle(item, method, closure) } -- cgit 1.4.1-3-g733a5