From 517f861fc5b66c583f3f5acac43481a4000cbb33 Mon Sep 17 00:00:00 2001 From: Tatsuyuki Ishi Date: Sat, 3 Mar 2018 22:54:50 +0900 Subject: [PATCH] Remove ty::Predicate::Equate and ty::EquatePredicate (dead code) --- src/librustc/ich/impls_ty.rs | 4 ---- src/librustc/infer/error_reporting/mod.rs | 2 -- src/librustc/infer/mod.rs | 17 ---------------- src/librustc/infer/outlives/bounds.rs | 2 -- src/librustc/traits/error_reporting.rs | 11 ----------- src/librustc/traits/fulfill.rs | 13 +----------- src/librustc/traits/mod.rs | 3 --- src/librustc/traits/object_safety.rs | 2 -- src/librustc/traits/select.rs | 11 ----------- src/librustc/traits/structural_impls.rs | 3 --- src/librustc/traits/util.rs | 8 -------- src/librustc/ty/mod.rs | 20 ------------------- src/librustc/ty/structural_impls.rs | 24 ----------------------- src/librustc/ty/util.rs | 1 - src/librustc/ty/wf.rs | 4 ---- src/librustc/util/ppaux.rs | 11 ----------- src/librustc_typeck/check/closure.rs | 1 - src/librustc_typeck/check/method/probe.rs | 1 - src/librustdoc/clean/mod.rs | 11 ----------- 19 files changed, 1 insertion(+), 148 deletions(-) diff --git a/src/librustc/ich/impls_ty.rs b/src/librustc/ich/impls_ty.rs index 7b2cfa0a3ffec..a8ed885e78d55 100644 --- a/src/librustc/ich/impls_ty.rs +++ b/src/librustc/ich/impls_ty.rs @@ -244,7 +244,6 @@ impl_stable_hash_for!(enum ty::Visibility { impl_stable_hash_for!(struct ty::TraitRef<'tcx> { def_id, substs }); impl_stable_hash_for!(struct ty::TraitPredicate<'tcx> { trait_ref }); -impl_stable_hash_for!(tuple_struct ty::EquatePredicate<'tcx> { t1, t2 }); impl_stable_hash_for!(struct ty::SubtypePredicate<'tcx> { a_is_expected, a, b }); impl<'gcx, A, B> HashStable> @@ -274,9 +273,6 @@ impl<'gcx> HashStable> for ty::Predicate<'gcx> { ty::Predicate::Trait(ref pred) => { pred.hash_stable(hcx, hasher); } - ty::Predicate::Equate(ref pred) => { - pred.hash_stable(hcx, hasher); - } ty::Predicate::Subtype(ref pred) => { pred.hash_stable(hcx, hasher); } diff --git a/src/librustc/infer/error_reporting/mod.rs b/src/librustc/infer/error_reporting/mod.rs index 700d06acf11a4..3debcf90b2d96 100644 --- a/src/librustc/infer/error_reporting/mod.rs +++ b/src/librustc/infer/error_reporting/mod.rs @@ -1183,7 +1183,6 @@ impl<'tcx> ObligationCause<'tcx> { }), IfExpression => Error0308("if and else have incompatible types"), IfExpressionWithNoElse => Error0317("if may be missing an else clause"), - EquatePredicate => Error0308("equality predicate not satisfied"), MainFunctionType => Error0580("main function has wrong type"), StartFunctionType => Error0308("start function has wrong type"), IntrinsicType => Error0308("intrinsic has wrong type"), @@ -1212,7 +1211,6 @@ impl<'tcx> ObligationCause<'tcx> { }, IfExpression => "if and else have compatible types", IfExpressionWithNoElse => "if missing an else returns ()", - EquatePredicate => "equality where clause is satisfied", MainFunctionType => "`main` function has the correct type", StartFunctionType => "`start` function has the correct type", IntrinsicType => "intrinsic has the correct type", diff --git a/src/librustc/infer/mod.rs b/src/librustc/infer/mod.rs index 402cb6a8fef43..5d44b2043e26c 100644 --- a/src/librustc/infer/mod.rs +++ b/src/librustc/infer/mod.rs @@ -943,23 +943,6 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> { self.borrow_region_constraints().make_subregion(origin, a, b); } - pub fn equality_predicate(&self, - cause: &ObligationCause<'tcx>, - param_env: ty::ParamEnv<'tcx>, - predicate: &ty::PolyEquatePredicate<'tcx>) - -> InferResult<'tcx, ()> - { - self.commit_if_ok(|snapshot| { - let (ty::EquatePredicate(a, b), skol_map) = - self.skolemize_late_bound_regions(predicate, snapshot); - let cause_span = cause.span; - let eqty_ok = self.at(cause, param_env).eq(b, a)?; - self.leak_check(false, cause_span, &skol_map, snapshot)?; - self.pop_skolemized(skol_map, snapshot); - Ok(eqty_ok.unit()) - }) - } - pub fn subtype_predicate(&self, cause: &ObligationCause<'tcx>, param_env: ty::ParamEnv<'tcx>, diff --git a/src/librustc/infer/outlives/bounds.rs b/src/librustc/infer/outlives/bounds.rs index 8a562471ac5d0..abb35d24d7954 100644 --- a/src/librustc/infer/outlives/bounds.rs +++ b/src/librustc/infer/outlives/bounds.rs @@ -117,7 +117,6 @@ impl<'cx, 'gcx, 'tcx> InferCtxt<'cx, 'gcx, 'tcx> { assert!(!obligation.has_escaping_regions()); match obligation.predicate { ty::Predicate::Trait(..) | - ty::Predicate::Equate(..) | ty::Predicate::Subtype(..) | ty::Predicate::Projection(..) | ty::Predicate::ClosureKind(..) | @@ -204,7 +203,6 @@ pub fn explicit_outlives_bounds<'tcx>( .filter_map(move |predicate| match predicate { ty::Predicate::Projection(..) | ty::Predicate::Trait(..) | - ty::Predicate::Equate(..) | ty::Predicate::Subtype(..) | ty::Predicate::WellFormed(..) | ty::Predicate::ObjectSafe(..) | diff --git a/src/librustc/traits/error_reporting.rs b/src/librustc/traits/error_reporting.rs index b1d2142060699..ce23cb2349609 100644 --- a/src/librustc/traits/error_reporting.rs +++ b/src/librustc/traits/error_reporting.rs @@ -631,16 +631,6 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> { span_bug!(span, "subtype requirement gave wrong error: `{:?}`", predicate) } - ty::Predicate::Equate(ref predicate) => { - let predicate = self.resolve_type_vars_if_possible(predicate); - let err = self.equality_predicate(&obligation.cause, - obligation.param_env, - &predicate).err().unwrap(); - struct_span_err!(self.tcx.sess, span, E0278, - "the requirement `{}` is not satisfied (`{}`)", - predicate, err) - } - ty::Predicate::RegionOutlives(ref predicate) => { let predicate = self.resolve_type_vars_if_possible(predicate); let err = self.region_outlives_predicate(&obligation.cause, @@ -1270,7 +1260,6 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> { ObligationCauseCode::MatchExpressionArm { .. } | ObligationCauseCode::IfExpression | ObligationCauseCode::IfExpressionWithNoElse | - ObligationCauseCode::EquatePredicate | ObligationCauseCode::MainFunctionType | ObligationCauseCode::StartFunctionType | ObligationCauseCode::IntrinsicType | diff --git a/src/librustc/traits/fulfill.rs b/src/librustc/traits/fulfill.rs index 93e33836818ce..2f3e19d92bcda 100644 --- a/src/librustc/traits/fulfill.rs +++ b/src/librustc/traits/fulfill.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use infer::{RegionObligation, InferCtxt, InferOk}; +use infer::{RegionObligation, InferCtxt}; use ty::{self, Ty, TypeFoldable, ToPolyTraitRef, ToPredicate}; use ty::error::ExpectedFound; use rustc_data_structures::obligation_forest::{ObligationForest, Error}; @@ -380,17 +380,6 @@ fn process_predicate<'a, 'gcx, 'tcx>( } } - ty::Predicate::Equate(ref binder) => { - match selcx.infcx().equality_predicate(&obligation.cause, - obligation.param_env, - binder) { - Ok(InferOk { obligations, value: () }) => { - Ok(Some(obligations)) - }, - Err(_) => Err(CodeSelectionError(Unimplemented)), - } - } - ty::Predicate::RegionOutlives(ref binder) => { match selcx.infcx().region_outlives_predicate(&obligation.cause, binder) { Ok(()) => Ok(Some(Vec::new())), diff --git a/src/librustc/traits/mod.rs b/src/librustc/traits/mod.rs index b9ae4599d808e..063def074b6c1 100644 --- a/src/librustc/traits/mod.rs +++ b/src/librustc/traits/mod.rs @@ -204,9 +204,6 @@ pub enum ObligationCauseCode<'tcx> { /// Computing common supertype of an if expression with no else counter-part IfExpressionWithNoElse, - /// `where a == b` - EquatePredicate, - /// `main` has wrong type MainFunctionType, diff --git a/src/librustc/traits/object_safety.rs b/src/librustc/traits/object_safety.rs index 4151661b5933c..52a0a897595b2 100644 --- a/src/librustc/traits/object_safety.rs +++ b/src/librustc/traits/object_safety.rs @@ -175,7 +175,6 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> { ty::Predicate::RegionOutlives(..) | ty::Predicate::ClosureKind(..) | ty::Predicate::Subtype(..) | - ty::Predicate::Equate(..) | ty::Predicate::ConstEvaluatable(..) => { false } @@ -204,7 +203,6 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> { } ty::Predicate::Projection(..) | ty::Predicate::Trait(..) | - ty::Predicate::Equate(..) | ty::Predicate::Subtype(..) | ty::Predicate::RegionOutlives(..) | ty::Predicate::WellFormed(..) | diff --git a/src/librustc/traits/select.rs b/src/librustc/traits/select.rs index 9e24a4e6afacf..65b2879823954 100644 --- a/src/librustc/traits/select.rs +++ b/src/librustc/traits/select.rs @@ -691,17 +691,6 @@ impl<'cx, 'gcx, 'tcx> SelectionContext<'cx, 'gcx, 'tcx> { self.evaluate_trait_predicate_recursively(previous_stack, obligation) } - ty::Predicate::Equate(ref p) => { - // does this code ever run? - match self.infcx.equality_predicate(&obligation.cause, obligation.param_env, p) { - Ok(InferOk { obligations, .. }) => { - self.inferred_obligations.extend(obligations); - EvaluatedToOk - }, - Err(_) => EvaluatedToErr - } - } - ty::Predicate::Subtype(ref p) => { // does this code ever run? match self.infcx.subtype_predicate(&obligation.cause, obligation.param_env, p) { diff --git a/src/librustc/traits/structural_impls.rs b/src/librustc/traits/structural_impls.rs index 1eb14a222787d..9dd5aaee7b72f 100644 --- a/src/librustc/traits/structural_impls.rs +++ b/src/librustc/traits/structural_impls.rs @@ -236,7 +236,6 @@ impl<'a, 'tcx> Lift<'tcx> for traits::ObligationCauseCode<'a> { } super::IfExpression => Some(super::IfExpression), super::IfExpressionWithNoElse => Some(super::IfExpressionWithNoElse), - super::EquatePredicate => Some(super::EquatePredicate), super::MainFunctionType => Some(super::MainFunctionType), super::StartFunctionType => Some(super::StartFunctionType), super::IntrinsicType => Some(super::IntrinsicType), @@ -512,7 +511,6 @@ impl<'tcx> TypeFoldable<'tcx> for traits::ObligationCauseCode<'tcx> { super::MatchExpressionArm { arm_span: _, source: _ } | super::IfExpression | super::IfExpressionWithNoElse | - super::EquatePredicate | super::MainFunctionType | super::StartFunctionType | super::IntrinsicType | @@ -561,7 +559,6 @@ impl<'tcx> TypeFoldable<'tcx> for traits::ObligationCauseCode<'tcx> { super::MatchExpressionArm { arm_span: _, source: _ } | super::IfExpression | super::IfExpressionWithNoElse | - super::EquatePredicate | super::MainFunctionType | super::StartFunctionType | super::IntrinsicType | diff --git a/src/librustc/traits/util.rs b/src/librustc/traits/util.rs index 898accb902159..c562f2cd48dde 100644 --- a/src/librustc/traits/util.rs +++ b/src/librustc/traits/util.rs @@ -25,9 +25,6 @@ fn anonymize_predicate<'a, 'gcx, 'tcx>(tcx: TyCtxt<'a, 'gcx, 'tcx>, ty::Predicate::Trait(ref data) => ty::Predicate::Trait(tcx.anonymize_late_bound_regions(data)), - ty::Predicate::Equate(ref data) => - ty::Predicate::Equate(tcx.anonymize_late_bound_regions(data)), - ty::Predicate::RegionOutlives(ref data) => ty::Predicate::RegionOutlives(tcx.anonymize_late_bound_regions(data)), @@ -163,11 +160,6 @@ impl<'cx, 'gcx, 'tcx> Elaborator<'cx, 'gcx, 'tcx> { // Currently, we do not elaborate object-safe // predicates. } - ty::Predicate::Equate(..) => { - // Currently, we do not "elaborate" predicates like - // `X == Y`, though conceivably we might. For example, - // `&X == &Y` implies that `X == Y`. - } ty::Predicate::Subtype(..) => { // Currently, we do not "elaborate" predicates like `X // <: Y`, though conceivably we might. diff --git a/src/librustc/ty/mod.rs b/src/librustc/ty/mod.rs index 9ba33a57c2050..2ffac481bb64d 100644 --- a/src/librustc/ty/mod.rs +++ b/src/librustc/ty/mod.rs @@ -912,9 +912,6 @@ pub enum Predicate<'tcx> { /// would be the type parameters. Trait(PolyTraitPredicate<'tcx>), - /// where `T1 == T2`. - Equate(PolyEquatePredicate<'tcx>), - /// where 'a : 'b RegionOutlives(PolyRegionOutlivesPredicate<'tcx>), @@ -1023,8 +1020,6 @@ impl<'a, 'gcx, 'tcx> Predicate<'tcx> { match *self { Predicate::Trait(ty::Binder(ref data)) => Predicate::Trait(ty::Binder(data.subst(tcx, substs))), - Predicate::Equate(ty::Binder(ref data)) => - Predicate::Equate(ty::Binder(data.subst(tcx, substs))), Predicate::Subtype(ty::Binder(ref data)) => Predicate::Subtype(ty::Binder(data.subst(tcx, substs))), Predicate::RegionOutlives(ty::Binder(ref data)) => @@ -1072,10 +1067,6 @@ impl<'tcx> PolyTraitPredicate<'tcx> { } } -#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug, RustcEncodable, RustcDecodable)] -pub struct EquatePredicate<'tcx>(pub Ty<'tcx>, pub Ty<'tcx>); // `0 == 1` -pub type PolyEquatePredicate<'tcx> = ty::Binder>; - #[derive(Clone, Copy, PartialEq, Eq, Hash, Debug, RustcEncodable, RustcDecodable)] pub struct OutlivesPredicate(pub A, pub B); // `A : B` pub type PolyOutlivesPredicate = ty::Binder>; @@ -1166,12 +1157,6 @@ impl<'tcx> ToPredicate<'tcx> for PolyTraitRef<'tcx> { } } -impl<'tcx> ToPredicate<'tcx> for PolyEquatePredicate<'tcx> { - fn to_predicate(&self) -> Predicate<'tcx> { - Predicate::Equate(self.clone()) - } -} - impl<'tcx> ToPredicate<'tcx> for PolyRegionOutlivesPredicate<'tcx> { fn to_predicate(&self) -> Predicate<'tcx> { Predicate::RegionOutlives(self.clone()) @@ -1199,9 +1184,6 @@ impl<'tcx> Predicate<'tcx> { ty::Predicate::Trait(ref data) => { data.skip_binder().input_types().collect() } - ty::Predicate::Equate(ty::Binder(ref data)) => { - vec![data.0, data.1] - } ty::Predicate::Subtype(ty::Binder(SubtypePredicate { a, b, a_is_expected: _ })) => { vec![a, b] } @@ -1242,7 +1224,6 @@ impl<'tcx> Predicate<'tcx> { Some(t.to_poly_trait_ref()) } Predicate::Projection(..) | - Predicate::Equate(..) | Predicate::Subtype(..) | Predicate::RegionOutlives(..) | Predicate::WellFormed(..) | @@ -1262,7 +1243,6 @@ impl<'tcx> Predicate<'tcx> { } Predicate::Trait(..) | Predicate::Projection(..) | - Predicate::Equate(..) | Predicate::Subtype(..) | Predicate::RegionOutlives(..) | Predicate::WellFormed(..) | diff --git a/src/librustc/ty/structural_impls.rs b/src/librustc/ty/structural_impls.rs index 6147b52844fe4..055835ed69c1d 100644 --- a/src/librustc/ty/structural_impls.rs +++ b/src/librustc/ty/structural_impls.rs @@ -282,14 +282,6 @@ impl<'a, 'tcx> Lift<'tcx> for ty::TraitPredicate<'a> { } } -impl<'a, 'tcx> Lift<'tcx> for ty::EquatePredicate<'a> { - type Lifted = ty::EquatePredicate<'tcx>; - fn lift_to_tcx<'b, 'gcx>(&self, tcx: TyCtxt<'b, 'gcx, 'tcx>) - -> Option> { - tcx.lift(&(self.0, self.1)).map(|(a, b)| ty::EquatePredicate(a, b)) - } -} - impl<'a, 'tcx> Lift<'tcx> for ty::SubtypePredicate<'a> { type Lifted = ty::SubtypePredicate<'tcx>; fn lift_to_tcx<'b, 'gcx>(&self, tcx: TyCtxt<'b, 'gcx, 'tcx>) @@ -355,9 +347,6 @@ impl<'a, 'tcx> Lift<'tcx> for ty::Predicate<'a> { ty::Predicate::Trait(ref binder) => { tcx.lift(binder).map(ty::Predicate::Trait) } - ty::Predicate::Equate(ref binder) => { - tcx.lift(binder).map(ty::Predicate::Equate) - } ty::Predicate::Subtype(ref binder) => { tcx.lift(binder).map(ty::Predicate::Subtype) } @@ -1049,8 +1038,6 @@ impl<'tcx> TypeFoldable<'tcx> for ty::Predicate<'tcx> { match *self { ty::Predicate::Trait(ref a) => ty::Predicate::Trait(a.fold_with(folder)), - ty::Predicate::Equate(ref binder) => - ty::Predicate::Equate(binder.fold_with(folder)), ty::Predicate::Subtype(ref binder) => ty::Predicate::Subtype(binder.fold_with(folder)), ty::Predicate::RegionOutlives(ref binder) => @@ -1073,7 +1060,6 @@ impl<'tcx> TypeFoldable<'tcx> for ty::Predicate<'tcx> { fn super_visit_with>(&self, visitor: &mut V) -> bool { match *self { ty::Predicate::Trait(ref a) => a.visit_with(visitor), - ty::Predicate::Equate(ref binder) => binder.visit_with(visitor), ty::Predicate::Subtype(ref binder) => binder.visit_with(visitor), ty::Predicate::RegionOutlives(ref binder) => binder.visit_with(visitor), ty::Predicate::TypeOutlives(ref binder) => binder.visit_with(visitor), @@ -1111,16 +1097,6 @@ BraceStructTypeFoldableImpl! { } } -impl<'tcx> TypeFoldable<'tcx> for ty::EquatePredicate<'tcx> { - fn super_fold_with<'gcx: 'tcx, F: TypeFolder<'gcx, 'tcx>>(&self, folder: &mut F) -> Self { - ty::EquatePredicate(self.0.fold_with(folder), self.1.fold_with(folder)) - } - - fn super_visit_with>(&self, visitor: &mut V) -> bool { - self.0.visit_with(visitor) || self.1.visit_with(visitor) - } -} - impl<'tcx> TypeFoldable<'tcx> for ty::SubtypePredicate<'tcx> { fn super_fold_with<'gcx: 'tcx, F: TypeFolder<'gcx, 'tcx>>(&self, folder: &mut F) -> Self { ty::SubtypePredicate { diff --git a/src/librustc/ty/util.rs b/src/librustc/ty/util.rs index 47ad7cbcb56f7..9b51e3aac0dae 100644 --- a/src/librustc/ty/util.rs +++ b/src/librustc/ty/util.rs @@ -385,7 +385,6 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> { match predicate { ty::Predicate::Projection(..) | ty::Predicate::Trait(..) | - ty::Predicate::Equate(..) | ty::Predicate::Subtype(..) | ty::Predicate::WellFormed(..) | ty::Predicate::ObjectSafe(..) | diff --git a/src/librustc/ty/wf.rs b/src/librustc/ty/wf.rs index ce44448ef794e..ea99bd39e8792 100644 --- a/src/librustc/ty/wf.rs +++ b/src/librustc/ty/wf.rs @@ -77,10 +77,6 @@ pub fn predicate_obligations<'a, 'gcx, 'tcx>(infcx: &InferCtxt<'a, 'gcx, 'tcx>, ty::Predicate::Trait(ref t) => { wf.compute_trait_ref(&t.skip_binder().trait_ref, Elaborate::None); // (*) } - ty::Predicate::Equate(ref t) => { - wf.compute(t.skip_binder().0); - wf.compute(t.skip_binder().1); - } ty::Predicate::RegionOutlives(..) => { } ty::Predicate::TypeOutlives(ref t) => { diff --git a/src/librustc/util/ppaux.rs b/src/librustc/util/ppaux.rs index 40c8e8aa4a29a..a2620da4c10ca 100644 --- a/src/librustc/util/ppaux.rs +++ b/src/librustc/util/ppaux.rs @@ -939,7 +939,6 @@ define_print_multi! { ('tcx) ty::Binder>, ('tcx) ty::Binder>, ('tcx) ty::Binder>, - ('tcx) ty::Binder>, ('tcx) ty::Binder>, ('tcx) ty::Binder>, ('tcx) ty::Binder, ty::Region<'tcx>>>, @@ -1217,14 +1216,6 @@ define_print! { } } -define_print! { - ('tcx) ty::EquatePredicate<'tcx>, (self, f, cx) { - display { - print!(f, cx, print(self.0), write(" == "), print(self.1)) - } - } -} - define_print! { ('tcx) ty::SubtypePredicate<'tcx>, (self, f, cx) { display { @@ -1292,7 +1283,6 @@ define_print! { display { match *self { ty::Predicate::Trait(ref data) => data.print(f, cx), - ty::Predicate::Equate(ref predicate) => predicate.print(f, cx), ty::Predicate::Subtype(ref predicate) => predicate.print(f, cx), ty::Predicate::RegionOutlives(ref predicate) => predicate.print(f, cx), ty::Predicate::TypeOutlives(ref predicate) => predicate.print(f, cx), @@ -1317,7 +1307,6 @@ define_print! { debug { match *self { ty::Predicate::Trait(ref a) => a.print(f, cx), - ty::Predicate::Equate(ref pair) => pair.print(f, cx), ty::Predicate::Subtype(ref pair) => pair.print(f, cx), ty::Predicate::RegionOutlives(ref pair) => pair.print(f, cx), ty::Predicate::TypeOutlives(ref pair) => pair.print(f, cx), diff --git a/src/librustc_typeck/check/closure.rs b/src/librustc_typeck/check/closure.rs index 5e0c47f18bf5a..72e4b726a22b4 100644 --- a/src/librustc_typeck/check/closure.rs +++ b/src/librustc_typeck/check/closure.rs @@ -255,7 +255,6 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> { let opt_trait_ref = match obligation.predicate { ty::Predicate::Projection(ref data) => Some(data.to_poly_trait_ref(self.tcx)), ty::Predicate::Trait(ref data) => Some(data.to_poly_trait_ref()), - ty::Predicate::Equate(..) => None, ty::Predicate::Subtype(..) => None, ty::Predicate::RegionOutlives(..) => None, ty::Predicate::TypeOutlives(..) => None, diff --git a/src/librustc_typeck/check/method/probe.rs b/src/librustc_typeck/check/method/probe.rs index c95ead285594b..86cec97b1212e 100644 --- a/src/librustc_typeck/check/method/probe.rs +++ b/src/librustc_typeck/check/method/probe.rs @@ -635,7 +635,6 @@ impl<'a, 'gcx, 'tcx> ProbeContext<'a, 'gcx, 'tcx> { _ => None, } } - ty::Predicate::Equate(..) | ty::Predicate::Subtype(..) | ty::Predicate::Projection(..) | ty::Predicate::RegionOutlives(..) | diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs index f9f1c3304949d..d0230a69374d4 100644 --- a/src/librustdoc/clean/mod.rs +++ b/src/librustdoc/clean/mod.rs @@ -1535,7 +1535,6 @@ impl<'a> Clean for ty::Predicate<'a> { match *self { Predicate::Trait(ref pred) => pred.clean(cx), - Predicate::Equate(ref pred) => pred.clean(cx), Predicate::Subtype(ref pred) => pred.clean(cx), Predicate::RegionOutlives(ref pred) => pred.clean(cx), Predicate::TypeOutlives(ref pred) => pred.clean(cx), @@ -1557,16 +1556,6 @@ impl<'a> Clean for ty::TraitPredicate<'a> { } } -impl<'tcx> Clean for ty::EquatePredicate<'tcx> { - fn clean(&self, cx: &DocContext) -> WherePredicate { - let ty::EquatePredicate(ref lhs, ref rhs) = *self; - WherePredicate::EqPredicate { - lhs: lhs.clean(cx), - rhs: rhs.clean(cx) - } - } -} - impl<'tcx> Clean for ty::SubtypePredicate<'tcx> { fn clean(&self, _cx: &DocContext) -> WherePredicate { panic!("subtype predicates are an internal rustc artifact \