@@ -421,7 +421,10 @@ impl<'tcx> Clean<'tcx, Term> for hir::Term<'tcx> {
421421impl < ' tcx > Clean < ' tcx , WherePredicate > for ty:: ProjectionPredicate < ' tcx > {
422422 fn clean ( & self , cx : & mut DocContext < ' tcx > ) -> WherePredicate {
423423 let ty:: ProjectionPredicate { projection_ty, term } = self ;
424- WherePredicate :: EqPredicate { lhs : projection_ty. clean ( cx) , rhs : term. clean ( cx) }
424+ WherePredicate :: EqPredicate {
425+ lhs : clean_projection ( * projection_ty, cx, None ) ,
426+ rhs : term. clean ( cx) ,
427+ }
425428 }
426429}
427430
@@ -447,12 +450,6 @@ fn clean_projection<'tcx>(
447450 }
448451}
449452
450- impl < ' tcx > Clean < ' tcx , Type > for ty:: ProjectionTy < ' tcx > {
451- fn clean ( & self , cx : & mut DocContext < ' tcx > ) -> Type {
452- clean_projection ( * self , cx, None )
453- }
454- }
455-
456453fn compute_should_show_cast ( self_def_id : Option < DefId > , trait_ : & Path , self_type : & Type ) -> bool {
457454 !trait_. segments . is_empty ( )
458455 && self_def_id
@@ -734,8 +731,12 @@ fn clean_ty_generics<'tcx>(
734731 . filter ( |b| !b. is_sized_bound ( cx) ) ,
735732 ) ;
736733
737- let proj = projection
738- . map ( |p| ( p. skip_binder ( ) . projection_ty . clean ( cx) , p. skip_binder ( ) . term ) ) ;
734+ let proj = projection. map ( |p| {
735+ (
736+ clean_projection ( p. skip_binder ( ) . projection_ty , cx, None ) ,
737+ p. skip_binder ( ) . term ,
738+ )
739+ } ) ;
739740 if let Some ( ( ( _, trait_did, name) , rhs) ) = proj
740741 . as_ref ( )
741742 . and_then ( |( lhs, rhs) : & ( Type , _ ) | Some ( ( lhs. projection ( ) ?, rhs) ) )
0 commit comments