diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs index 1a194cd12546..fb8ba51853fe 100644 --- a/src/librustdoc/clean/mod.rs +++ b/src/librustdoc/clean/mod.rs @@ -838,7 +838,7 @@ impl Clean> for ty::Region { pub enum WherePredicate { BoundPredicate { ty: Type, bounds: Vec }, RegionPredicate { lifetime: Lifetime, bounds: Vec}, - EqPredicate { lhs: Type, rhs: Type } + EqPredicate { lhs: Type, rhs: Type }, } impl Clean for hir::WherePredicate { @@ -906,12 +906,9 @@ impl<'tcx> Clean for ty::EquatePredicate<'tcx> { } impl<'tcx> Clean for ty::SubtypePredicate<'tcx> { - fn clean(&self, cx: &DocContext) -> WherePredicate { - let ty::SubtypePredicate { a_is_expected: _, a, b } = *self; - WherePredicate::EqPredicate { // TODO This is obviously wrong :P - lhs: a.clean(cx), - rhs: b.clean(cx) - } + fn clean(&self, _cx: &DocContext) -> WherePredicate { + panic!("subtype predicates are an internal rustc artifact \ + and should not be seen by rustdoc") } }