diff options
| author | John Clements <clements@racket-lang.org> | 2014-07-14 16:31:52 -0700 |
|---|---|---|
| committer | John Clements <clements@racket-lang.org> | 2014-07-15 14:46:32 -0700 |
| commit | ca05828cb7b6e985c43b6ed716155478f529b308 (patch) | |
| tree | a945e1d9b3264cc74f4d9b7d7dd451b495d772d8 /src/libsyntax/ast_map | |
| parent | 154ca0838868ca08a8aae20f6af245e2b970a3de (diff) | |
| download | rust-ca05828cb7b6e985c43b6ed716155478f529b308.tar.gz rust-ca05828cb7b6e985c43b6ed716155478f529b308.zip | |
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
Diffstat (limited to 'src/libsyntax/ast_map')
| -rw-r--r-- | src/libsyntax/ast_map/blocks.rs | 8 |
1 files changed, 4 insertions, 4 deletions
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<Block> { 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<FnDecl> { 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) } |
