@@ -172,12 +172,9 @@ impl Clean<Path> for (ty::TraitRef<'_>, &[TypeBinding]) {
172172 }
173173}
174174
175- impl < ' tcx > Clean < GenericBound > for ty:: TraitRef < ' tcx > {
176- fn clean ( & self , cx : & mut DocContext < ' _ > ) -> GenericBound {
177- GenericBound :: TraitBound (
178- PolyTrait { trait_ : ( * self , & [ ] [ ..] ) . clean ( cx) , generic_params : vec ! [ ] } ,
179- hir:: TraitBoundModifier :: None ,
180- )
175+ impl Clean < Path > for ty:: TraitRef < ' tcx > {
176+ fn clean ( & self , cx : & mut DocContext < ' _ > ) -> Path {
177+ ( * self , & [ ] [ ..] ) . clean ( cx)
181178 }
182179}
183180
@@ -384,10 +381,7 @@ impl<'tcx> Clean<WherePredicate> for ty::ProjectionPredicate<'tcx> {
384381impl < ' tcx > Clean < Type > for ty:: ProjectionTy < ' tcx > {
385382 fn clean ( & self , cx : & mut DocContext < ' _ > ) -> Type {
386383 let lifted = self . lift_to_tcx ( cx. tcx ) . unwrap ( ) ;
387- let trait_ = match lifted. trait_ref ( cx. tcx ) . clean ( cx) {
388- GenericBound :: TraitBound ( t, _) => t. trait_ ,
389- GenericBound :: Outlives ( _) => panic ! ( "cleaning a trait got a lifetime" ) ,
390- } ;
384+ let trait_ = lifted. trait_ref ( cx. tcx ) . clean ( cx) ;
391385 let self_type = self . self_ty ( ) . clean ( cx) ;
392386 Type :: QPath {
393387 name : cx. tcx . associated_item ( self . item_def_id ) . ident . name ,
0 commit comments