diff --git a/src/libsyntax/print/pp.rs b/src/libsyntax/print/pp.rs index 6295711e282..3294db936d3 100644 --- a/src/libsyntax/print/pp.rs +++ b/src/libsyntax/print/pp.rs @@ -682,8 +682,4 @@ impl<'a> Printer<'a> { pub fn hardbreak_tok_offset(off: isize) -> Token { Token::Break(BreakToken {offset: off, blank_space: SIZE_INFINITY}) } - - crate fn hardbreak_tok() -> Token { - Self::hardbreak_tok_offset(0) - } } diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs index 0937d24cb29..8b996f5b5f2 100644 --- a/src/libsyntax/print/pprust.rs +++ b/src/libsyntax/print/pprust.rs @@ -846,13 +846,6 @@ impl<'a> State<'a> { self.bclose_(span, INDENT_UNIT) } - crate fn in_cbox(&self) -> bool { - match self.boxes.last() { - Some(&last_box) => last_box == pp::Breaks::Consistent, - None => false - } - } - crate fn break_offset_if_not_bol(&mut self, n: usize, off: isize) -> io::Result<()> { if !self.is_bol() { @@ -1663,16 +1656,6 @@ impl<'a> State<'a> { self.print_block_with_attrs(blk, &[]) } - crate fn print_block_unclosed(&mut self, blk: &ast::Block) -> io::Result<()> { - self.print_block_unclosed_indent(blk, INDENT_UNIT) - } - - crate fn print_block_unclosed_with_attrs(&mut self, blk: &ast::Block, - attrs: &[ast::Attribute]) - -> io::Result<()> { - self.print_block_maybe_unclosed(blk, INDENT_UNIT, attrs, false) - } - crate fn print_block_unclosed_indent(&mut self, blk: &ast::Block, indented: usize) -> io::Result<()> { self.print_block_maybe_unclosed(blk, indented, &[], false) @@ -2357,14 +2340,6 @@ impl<'a> State<'a> { self.ann.post(self, AnnNode::Name(&name)) } - crate fn print_for_decl(&mut self, loc: &ast::Local, - coll: &ast::Expr) -> io::Result<()> { - self.print_local_decl(loc)?; - self.s.space()?; - self.word_space("in")?; - self.print_expr(coll) - } - fn print_path(&mut self, path: &ast::Path, colons_before_params: bool, @@ -3072,30 +3047,6 @@ impl<'a> State<'a> { Ok(()) } - crate fn print_opt_abi_and_extern_if_nondefault(&mut self, - opt_abi: Option) - -> io::Result<()> { - match opt_abi { - Some(Abi::Rust) => Ok(()), - Some(abi) => { - self.word_nbsp("extern")?; - self.word_nbsp(abi.to_string()) - } - None => Ok(()) - } - } - - crate fn print_extern_opt_abi(&mut self, - opt_abi: Option) -> io::Result<()> { - match opt_abi { - Some(abi) => { - self.word_nbsp("extern")?; - self.word_nbsp(abi.to_string()) - } - None => Ok(()) - } - } - crate fn print_fn_header_info(&mut self, header: ast::FnHeader, vis: &ast::Visibility) -> io::Result<()> {