diff options
| author | John Clements <clements@racket-lang.org> | 2014-06-24 17:03:49 -0700 |
|---|---|---|
| committer | John Clements <clements@racket-lang.org> | 2014-06-25 14:16:12 -0700 |
| commit | 26b5347310f8e07dba695f857821d08b7deca208 (patch) | |
| tree | 7b9922d283049986217496ed5ba0087c632505a6 /src/libsyntax/ext | |
| parent | 84027937745835e1c9328013ba9b8faebf4352af (diff) | |
| download | rust-26b5347310f8e07dba695f857821d08b7deca208.tar.gz rust-26b5347310f8e07dba695f857821d08b7deca208.zip | |
remove unneccessary pubs, shorten names
Diffstat (limited to 'src/libsyntax/ext')
| -rw-r--r-- | src/libsyntax/ext/expand.rs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/libsyntax/ext/expand.rs b/src/libsyntax/ext/expand.rs index 3aec353f6e6..2b325d1c787 100644 --- a/src/libsyntax/ext/expand.rs +++ b/src/libsyntax/ext/expand.rs @@ -662,11 +662,11 @@ fn expand_non_macro_stmt(s: &Stmt, fld: &mut MacroExpander) // from a given thingy and puts them in a mutable // array (passed in to the traversal). #[deriving(Clone)] -pub struct NewNameFinderContext { +struct NameFinderContext { ident_accumulator: Vec<ast::Ident> , } -impl Visitor<()> for NewNameFinderContext { +impl Visitor<()> for NameFinderContext { fn visit_pat(&mut self, pattern: &ast::Pat, _: ()) { match *pattern { // we found a pat_ident! @@ -703,8 +703,8 @@ impl Visitor<()> for NewNameFinderContext { // return a visitor that extracts the pat_ident paths // from a given thingy and puts them in a mutable // array (passed in to the traversal) -pub fn new_name_finder(idents: Vec<ast::Ident> ) -> NewNameFinderContext { - NewNameFinderContext { +fn new_name_finder(idents: Vec<ast::Ident> ) -> NameFinderContext { + NameFinderContext { ident_accumulator: idents, } } @@ -1012,7 +1012,7 @@ fn original_span(cx: &ExtCtxt) -> Gc<codemap::ExpnInfo> { #[cfg(test)] mod test { - use super::*; + use super::{new_name_finder, expand_crate, contains_macro_escape}; use ast; use ast::{Attribute_, AttrOuter, MetaWord}; use attr; @@ -1032,11 +1032,11 @@ mod test { // from a given thingy and puts them in a mutable // array (passed in to the traversal) #[deriving(Clone)] - struct NewPathExprFinderContext { + struct PathExprFinderContext { path_accumulator: Vec<ast::Path> , } - impl Visitor<()> for NewPathExprFinderContext { + impl Visitor<()> for PathExprFinderContext { fn visit_expr(&mut self, expr: &ast::Expr, _: ()) { match *expr { @@ -1052,8 +1052,8 @@ mod test { // return a visitor that extracts the paths // from a given thingy and puts them in a mutable // array (passed in to the traversal) - pub fn new_path_finder(paths: Vec<ast::Path> ) -> NewPathExprFinderContext { - NewPathExprFinderContext { + fn new_path_finder(paths: Vec<ast::Path> ) -> PathExprFinderContext { + PathExprFinderContext { path_accumulator: paths } } |
