Skip to content

Commit 791beb7

Browse files
committed
rustdoc: remove Clean trait impl for ProjectionPredicate
1 parent 4443fd5 commit 791beb7

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

src/librustdoc/clean/mod.rs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ impl<'tcx> Clean<'tcx, Option<WherePredicate>> for ty::Predicate<'tcx> {
330330
ty::PredicateKind::Trait(pred) => bound_predicate.rebind(pred).clean(cx),
331331
ty::PredicateKind::RegionOutlives(pred) => pred.clean(cx),
332332
ty::PredicateKind::TypeOutlives(pred) => pred.clean(cx),
333-
ty::PredicateKind::Projection(pred) => Some(pred.clean(cx)),
333+
ty::PredicateKind::Projection(pred) => Some(clean_projection_predicate(pred, cx)),
334334
ty::PredicateKind::ConstEvaluatable(..) => None,
335335
ty::PredicateKind::WellFormed(..) => None,
336336

@@ -418,13 +418,14 @@ impl<'tcx> Clean<'tcx, Term> for hir::Term<'tcx> {
418418
}
419419
}
420420

421-
impl<'tcx> Clean<'tcx, WherePredicate> for ty::ProjectionPredicate<'tcx> {
422-
fn clean(&self, cx: &mut DocContext<'tcx>) -> WherePredicate {
423-
let ty::ProjectionPredicate { projection_ty, term } = self;
424-
WherePredicate::EqPredicate {
425-
lhs: clean_projection(*projection_ty, cx, None),
426-
rhs: term.clean(cx),
427-
}
421+
fn clean_projection_predicate<'tcx>(
422+
pred: ty::ProjectionPredicate<'tcx>,
423+
cx: &mut DocContext<'tcx>,
424+
) -> WherePredicate {
425+
let ty::ProjectionPredicate { projection_ty, term } = pred;
426+
WherePredicate::EqPredicate {
427+
lhs: clean_projection(projection_ty, cx, None),
428+
rhs: term.clean(cx),
428429
}
429430
}
430431

0 commit comments

Comments
 (0)