Remove PredicateKind

This commit is contained in:
Jack Huey
2020-12-23 16:36:23 -05:00
parent 4cb3d6f983
commit 4cd6f85a07
12 changed files with 38 additions and 68 deletions

View File

@@ -228,14 +228,6 @@ impl fmt::Debug for ty::Predicate<'tcx> {
}
}
impl fmt::Debug for ty::PredicateKind<'tcx> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match *self {
ty::PredicateKind::ForAll(binder) => write!(f, "ForAll({:?})", binder),
}
}
}
impl fmt::Debug for ty::PredicateAtom<'tcx> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match *self {
@@ -480,15 +472,6 @@ impl<'a, 'tcx> Lift<'tcx> for ty::ExistentialProjection<'a> {
}
}
impl<'a, 'tcx> Lift<'tcx> for ty::PredicateKind<'a> {
type Lifted = ty::PredicateKind<'tcx>;
fn lift_to_tcx(self, tcx: TyCtxt<'tcx>) -> Option<Self::Lifted> {
match self {
ty::PredicateKind::ForAll(binder) => tcx.lift(binder).map(ty::PredicateKind::ForAll),
}
}
}
impl<'a, 'tcx> Lift<'tcx> for ty::PredicateAtom<'a> {
type Lifted = ty::PredicateAtom<'tcx>;
fn lift_to_tcx(self, tcx: TyCtxt<'tcx>) -> Option<Self::Lifted> {