Remove (lots of) dead code
Found with https://github.com/est31/warnalyzer. Dubious changes: - Is anyone else using rustc_apfloat? I feel weird completely deleting x87 support. - Maybe some of the dead code in rustc_data_structures, in case someone wants to use it in the future? - Don't change rustc_serialize I plan to scrap most of the json module in the near future (see https://github.com/rust-lang/compiler-team/issues/418) and fixing the tests needed more work than I expected. TODO: check if any of the comments on the deleted code should be kept.
This commit is contained in:
parent
785aeac521
commit
441dc3640a
74 changed files with 60 additions and 1298 deletions
|
@ -221,10 +221,6 @@ pub fn bounds_to_string<'b>(bounds: impl IntoIterator<Item = &'b hir::GenericBou
|
|||
to_string(NO_ANN, |s| s.print_bounds("", bounds))
|
||||
}
|
||||
|
||||
pub fn param_to_string(arg: &hir::Param<'_>) -> String {
|
||||
to_string(NO_ANN, |s| s.print_param(arg))
|
||||
}
|
||||
|
||||
pub fn ty_to_string(ty: &hir::Ty<'_>) -> String {
|
||||
to_string(NO_ANN, |s| s.print_type(ty))
|
||||
}
|
||||
|
@ -1701,21 +1697,10 @@ impl<'a> State<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn print_usize(&mut self, i: usize) {
|
||||
self.s.word(i.to_string())
|
||||
}
|
||||
|
||||
pub fn print_name(&mut self, name: Symbol) {
|
||||
self.print_ident(Ident::with_dummy_span(name))
|
||||
}
|
||||
|
||||
pub fn print_for_decl(&mut self, loc: &hir::Local<'_>, coll: &hir::Expr<'_>) {
|
||||
self.print_local_decl(loc);
|
||||
self.s.space();
|
||||
self.word_space("in");
|
||||
self.print_expr(coll)
|
||||
}
|
||||
|
||||
pub fn print_path(&mut self, path: &hir::Path<'_>, colons_before_params: bool) {
|
||||
self.maybe_print_comment(path.span.lo());
|
||||
|
||||
|
@ -2430,24 +2415,6 @@ impl<'a> State<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn print_opt_abi_and_extern_if_nondefault(&mut self, opt_abi: Option<Abi>) {
|
||||
match opt_abi {
|
||||
Some(Abi::Rust) => {}
|
||||
Some(abi) => {
|
||||
self.word_nbsp("extern");
|
||||
self.word_nbsp(abi.to_string())
|
||||
}
|
||||
None => {}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn print_extern_opt_abi(&mut self, opt_abi: Option<Abi>) {
|
||||
if let Some(abi) = opt_abi {
|
||||
self.word_nbsp("extern");
|
||||
self.word_nbsp(abi.to_string())
|
||||
}
|
||||
}
|
||||
|
||||
pub fn print_fn_header_info(&mut self, header: hir::FnHeader, vis: &hir::Visibility<'_>) {
|
||||
self.s.word(visibility_qualified(vis, ""));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue