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
|
@ -505,6 +505,7 @@ impl<'a> From<&'a ExternDepSpec> for rustc_lint_defs::ExternDepSpec {
|
|||
}
|
||||
|
||||
impl Externs {
|
||||
/// Used for testing.
|
||||
pub fn new(data: BTreeMap<String, ExternEntry>) -> Externs {
|
||||
Externs(data)
|
||||
}
|
||||
|
@ -604,13 +605,6 @@ impl Input {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn get_input(&mut self) -> Option<&mut String> {
|
||||
match *self {
|
||||
Input::File(_) => None,
|
||||
Input::Str { ref mut input, .. } => Some(input),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn source_name(&self) -> FileName {
|
||||
match *self {
|
||||
Input::File(ref ifile) => ifile.clone().into(),
|
||||
|
@ -778,12 +772,6 @@ impl Options {
|
|||
|| self.debugging_opts.query_dep_graph
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
pub fn enable_dep_node_debug_strs(&self) -> bool {
|
||||
cfg!(debug_assertions)
|
||||
&& (self.debugging_opts.query_dep_graph || self.debugging_opts.incremental_info)
|
||||
}
|
||||
|
||||
pub fn file_path_mapping(&self) -> FilePathMapping {
|
||||
FilePathMapping::new(self.remap_path_prefix.clone())
|
||||
}
|
||||
|
@ -1060,9 +1048,6 @@ mod opt {
|
|||
pub fn flag_s(a: S, b: S, c: S) -> R {
|
||||
stable(longer(a, b), move |opts| opts.optflag(a, b, c))
|
||||
}
|
||||
pub fn flagopt_s(a: S, b: S, c: S, d: S) -> R {
|
||||
stable(longer(a, b), move |opts| opts.optflagopt(a, b, c, d))
|
||||
}
|
||||
pub fn flagmulti_s(a: S, b: S, c: S) -> R {
|
||||
stable(longer(a, b), move |opts| opts.optflagmulti(a, b, c))
|
||||
}
|
||||
|
@ -1073,15 +1058,6 @@ mod opt {
|
|||
pub fn multi(a: S, b: S, c: S, d: S) -> R {
|
||||
unstable(longer(a, b), move |opts| opts.optmulti(a, b, c, d))
|
||||
}
|
||||
pub fn flag(a: S, b: S, c: S) -> R {
|
||||
unstable(longer(a, b), move |opts| opts.optflag(a, b, c))
|
||||
}
|
||||
pub fn flagopt(a: S, b: S, c: S, d: S) -> R {
|
||||
unstable(longer(a, b), move |opts| opts.optflagopt(a, b, c, d))
|
||||
}
|
||||
pub fn flagmulti(a: S, b: S, c: S) -> R {
|
||||
unstable(longer(a, b), move |opts| opts.optflagmulti(a, b, c))
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns the "short" subset of the rustc command line options,
|
||||
|
@ -2459,7 +2435,7 @@ crate mod dep_tracking {
|
|||
}
|
||||
|
||||
// This is a stable hash because BTreeMap is a sorted container
|
||||
pub fn stable_hash(
|
||||
crate fn stable_hash(
|
||||
sub_hashes: BTreeMap<&'static str, &dyn DepTrackingHash>,
|
||||
hasher: &mut DefaultHasher,
|
||||
error_format: ErrorOutputType,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue