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:
@@ -1266,15 +1266,6 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
|
||||
self.resolve_vars_if_possible(t).to_string()
|
||||
}
|
||||
|
||||
pub fn tys_to_string(&self, ts: &[Ty<'tcx>]) -> String {
|
||||
let tstrs: Vec<String> = ts.iter().map(|t| self.ty_to_string(*t)).collect();
|
||||
format!("({})", tstrs.join(", "))
|
||||
}
|
||||
|
||||
pub fn trait_ref_to_string(&self, t: ty::TraitRef<'tcx>) -> String {
|
||||
self.resolve_vars_if_possible(t).print_only_trait_path().to_string()
|
||||
}
|
||||
|
||||
/// If `TyVar(vid)` resolves to a type, return that type. Else, return the
|
||||
/// universe index of `TyVar(vid)`.
|
||||
pub fn probe_ty_var(&self, vid: TyVid) -> Result<Ty<'tcx>, ty::UniverseIndex> {
|
||||
@@ -1704,14 +1695,6 @@ impl<'tcx> TypeTrace<'tcx> {
|
||||
) -> TypeTrace<'tcx> {
|
||||
TypeTrace { cause: cause.clone(), values: Consts(ExpectedFound::new(a_is_expected, a, b)) }
|
||||
}
|
||||
|
||||
pub fn dummy(tcx: TyCtxt<'tcx>) -> TypeTrace<'tcx> {
|
||||
let err = tcx.ty_error();
|
||||
TypeTrace {
|
||||
cause: ObligationCause::dummy(),
|
||||
values: Types(ExpectedFound { expected: err, found: err }),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'tcx> SubregionOrigin<'tcx> {
|
||||
|
||||
Reference in New Issue
Block a user