Skip to content

Commit 26b5347

Browse files
committed
remove unneccessary pubs, shorten names
1 parent 8402793 commit 26b5347

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/libsyntax/ext/expand.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -662,11 +662,11 @@ fn expand_non_macro_stmt(s: &Stmt, fld: &mut MacroExpander)
662662
// from a given thingy and puts them in a mutable
663663
// array (passed in to the traversal).
664664
#[deriving(Clone)]
665-
pub struct NewNameFinderContext {
665+
struct NameFinderContext {
666666
ident_accumulator: Vec<ast::Ident> ,
667667
}
668668

669-
impl Visitor<()> for NewNameFinderContext {
669+
impl Visitor<()> for NameFinderContext {
670670
fn visit_pat(&mut self, pattern: &ast::Pat, _: ()) {
671671
match *pattern {
672672
// we found a pat_ident!
@@ -703,8 +703,8 @@ impl Visitor<()> for NewNameFinderContext {
703703
// return a visitor that extracts the pat_ident paths
704704
// from a given thingy and puts them in a mutable
705705
// array (passed in to the traversal)
706-
pub fn new_name_finder(idents: Vec<ast::Ident> ) -> NewNameFinderContext {
707-
NewNameFinderContext {
706+
fn new_name_finder(idents: Vec<ast::Ident> ) -> NameFinderContext {
707+
NameFinderContext {
708708
ident_accumulator: idents,
709709
}
710710
}
@@ -1012,7 +1012,7 @@ fn original_span(cx: &ExtCtxt) -> Gc<codemap::ExpnInfo> {
10121012

10131013
#[cfg(test)]
10141014
mod test {
1015-
use super::*;
1015+
use super::{new_name_finder, expand_crate, contains_macro_escape};
10161016
use ast;
10171017
use ast::{Attribute_, AttrOuter, MetaWord};
10181018
use attr;
@@ -1032,11 +1032,11 @@ mod test {
10321032
// from a given thingy and puts them in a mutable
10331033
// array (passed in to the traversal)
10341034
#[deriving(Clone)]
1035-
struct NewPathExprFinderContext {
1035+
struct PathExprFinderContext {
10361036
path_accumulator: Vec<ast::Path> ,
10371037
}
10381038

1039-
impl Visitor<()> for NewPathExprFinderContext {
1039+
impl Visitor<()> for PathExprFinderContext {
10401040

10411041
fn visit_expr(&mut self, expr: &ast::Expr, _: ()) {
10421042
match *expr {
@@ -1052,8 +1052,8 @@ mod test {
10521052
// return a visitor that extracts the paths
10531053
// from a given thingy and puts them in a mutable
10541054
// array (passed in to the traversal)
1055-
pub fn new_path_finder(paths: Vec<ast::Path> ) -> NewPathExprFinderContext {
1056-
NewPathExprFinderContext {
1055+
fn new_path_finder(paths: Vec<ast::Path> ) -> PathExprFinderContext {
1056+
PathExprFinderContext {
10571057
path_accumulator: paths
10581058
}
10591059
}

0 commit comments

Comments
 (0)