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
|
@ -481,7 +481,7 @@ fn has_doc(sess: &Session, attr: &ast::Attribute) -> bool {
|
|||
return false;
|
||||
}
|
||||
|
||||
if attr.is_value_str() {
|
||||
if attr.value_str().is_some() {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -177,6 +177,7 @@ impl LintStore {
|
|||
self.early_passes.push(Box::new(pass));
|
||||
}
|
||||
|
||||
/// Used by clippy.
|
||||
pub fn register_pre_expansion_pass(
|
||||
&mut self,
|
||||
pass: impl Fn() -> EarlyLintPassObject + 'static + sync::Send + sync::Sync,
|
||||
|
@ -862,6 +863,8 @@ impl<'tcx> LateContext<'tcx> {
|
|||
/// // The given `def_id` is that of an `Option` type
|
||||
/// }
|
||||
/// ```
|
||||
///
|
||||
/// Used by clippy, but should be replaced by diagnostic items eventually.
|
||||
pub fn match_def_path(&self, def_id: DefId, path: &[Symbol]) -> bool {
|
||||
let names = self.get_def_path(def_id);
|
||||
|
||||
|
|
|
@ -564,10 +564,6 @@ impl<'s> LintLevelsBuilder<'s> {
|
|||
self.id_to_set.insert(id, self.cur);
|
||||
}
|
||||
|
||||
pub fn build(self) -> LintLevelSets {
|
||||
self.sets
|
||||
}
|
||||
|
||||
pub fn build_map(self) -> LintLevelMap {
|
||||
LintLevelMap { sets: self.sets, id_to_set: self.id_to_set }
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue