@@ -421,7 +421,10 @@ impl<'tcx> Clean<'tcx, Term> for hir::Term<'tcx> {
421
421
impl < ' tcx > Clean < ' tcx , WherePredicate > for ty:: ProjectionPredicate < ' tcx > {
422
422
fn clean ( & self , cx : & mut DocContext < ' tcx > ) -> WherePredicate {
423
423
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
+ }
425
428
}
426
429
}
427
430
@@ -447,12 +450,6 @@ fn clean_projection<'tcx>(
447
450
}
448
451
}
449
452
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
-
456
453
fn compute_should_show_cast ( self_def_id : Option < DefId > , trait_ : & Path , self_type : & Type ) -> bool {
457
454
!trait_. segments . is_empty ( )
458
455
&& self_def_id
@@ -734,8 +731,12 @@ fn clean_ty_generics<'tcx>(
734
731
. filter ( |b| !b. is_sized_bound ( cx) ) ,
735
732
) ;
736
733
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
+ } ) ;
739
740
if let Some ( ( ( _, trait_did, name) , rhs) ) = proj
740
741
. as_ref ( )
741
742
. and_then ( |( lhs, rhs) : & ( Type , _ ) | Some ( ( lhs. projection ( ) ?, rhs) ) )
0 commit comments