diff options
| author | Mark Simulacrum <mark.simulacrum@gmail.com> | 2017-06-25 07:51:55 -0600 |
|---|---|---|
| committer | Mark Simulacrum <mark.simulacrum@gmail.com> | 2017-07-11 12:09:25 -0600 |
| commit | 03431368052effca858cc5aa7dad140948562470 (patch) | |
| tree | cc1f54183f84461ec707f47cd5c1bef407f68386 /src/libsyntax | |
| parent | 16b486ce6ec1c15e4019925c22a7abff83db9950 (diff) | |
| download | rust-03431368052effca858cc5aa7dad140948562470.tar.gz rust-03431368052effca858cc5aa7dad140948562470.zip | |
Make a few functions non-public
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/print/pprust.rs | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs index 272a5e199e6..b052b2cdbbb 100644 --- a/src/libsyntax/print/pprust.rs +++ b/src/libsyntax/print/pprust.rs @@ -64,13 +64,7 @@ pub struct State<'a> { ann: &'a (PpAnn+'a), } -pub fn rust_printer<'a>(writer: Box<Write+'a>) -> State<'a> { - static NO_ANN: NoAnn = NoAnn; - rust_printer_annotated(writer, &NO_ANN) -} - -pub fn rust_printer_annotated<'a>(writer: Box<Write+'a>, - ann: &'a PpAnn) -> State<'a> { +fn rust_printer<'a>(writer: Box<Write+'a>, ann: &'a PpAnn) -> State<'a> { State { s: pp::mk_printer(writer, DEFAULT_COLUMNS), cm: None, @@ -165,14 +159,15 @@ pub fn to_string<F>(f: F) -> String where { let mut wr = Vec::new(); { - let mut printer = rust_printer(Box::new(&mut wr)); + let ann = NoAnn; + let mut printer = rust_printer(Box::new(&mut wr), &ann); f(&mut printer).unwrap(); printer.s.eof().unwrap(); } String::from_utf8(wr).unwrap() } -pub fn binop_to_string(op: BinOpToken) -> &'static str { +fn binop_to_string(op: BinOpToken) -> &'static str { match op { token::Plus => "+", token::Minus => "-", |
