]> git.lizzy.rs Git - rust.git/commitdiff
Delete now-unused methods
authorMark Rousskov <mark.simulacrum@gmail.com>
Mon, 24 Jun 2019 16:13:22 +0000 (12:13 -0400)
committerMark Rousskov <mark.simulacrum@gmail.com>
Sat, 29 Jun 2019 13:09:32 +0000 (09:09 -0400)
src/libsyntax/print/pp.rs
src/libsyntax/print/pprust.rs

index 6295711e28230a03cdc08cc9d4c456daa3986ba6..3294db936d3e640c221feeb6c5a6e7fbec4b2780 100644 (file)
@@ -682,8 +682,4 @@ pub fn hardbreak(&mut self) -> io::Result<()> {
     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)
-    }
 }
index 0937d24cb29dfe64a0a59d38f047406728bc318d..8b996f5b5f20e116f71659a2e50098c454621e39 100644 (file)
@@ -846,13 +846,6 @@ pub fn cbox(&mut self, u: usize) -> io::Result<()> {
         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 @@ fn print_poly_trait_ref(&mut self, t: &ast::PolyTraitRef) -> io::Result<()> {
         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 @@ fn print_expr_outer_attr_style(&mut self,
         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 @@ fn print_explicit_self(&mut self, explicit_self: &ast::ExplicitSelf) -> io::Resu
         Ok(())
     }
 
-    crate fn print_opt_abi_and_extern_if_nondefault(&mut self,
-                                                  opt_abi: Option<Abi>)
-        -> 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<Abi>) -> 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<()> {