@@ -199,9 +199,10 @@ impl Clean<GenericBound> for (ty::PolyTraitRef<'_>, &[TypeBinding]) {
199199 . collect_referenced_late_bound_regions ( & poly_trait_ref)
200200 . into_iter ( )
201201 . filter_map ( |br| match br {
202- ty:: BrNamed ( _, name) => {
203- Some ( GenericParamDef { name, kind : GenericParamDefKind :: Lifetime } )
204- }
202+ ty:: BrNamed ( _, name) => Some ( GenericParamDef {
203+ name,
204+ kind : GenericParamDefKind :: Lifetime { outlives : vec ! [ ] } ,
205+ } ) ,
205206 _ => None ,
206207 } )
207208 . collect ( ) ;
@@ -412,7 +413,9 @@ impl<'tcx> Clean<Type> for ty::ProjectionTy<'tcx> {
412413impl Clean < GenericParamDef > for ty:: GenericParamDef {
413414 fn clean ( & self , cx : & mut DocContext < ' _ > ) -> GenericParamDef {
414415 let ( name, kind) = match self . kind {
415- ty:: GenericParamDefKind :: Lifetime => ( self . name , GenericParamDefKind :: Lifetime ) ,
416+ ty:: GenericParamDefKind :: Lifetime => {
417+ ( self . name , GenericParamDefKind :: Lifetime { outlives : vec ! [ ] } )
418+ }
416419 ty:: GenericParamDefKind :: Type { has_default, synthetic, .. } => {
417420 let default = if has_default {
418421 let mut default = cx. tcx . type_of ( self . def_id ) . clean ( cx) ;
@@ -462,21 +465,15 @@ impl Clean<GenericParamDef> for hir::GenericParam<'_> {
462465 fn clean ( & self , cx : & mut DocContext < ' _ > ) -> GenericParamDef {
463466 let ( name, kind) = match self . kind {
464467 hir:: GenericParamKind :: Lifetime { .. } => {
465- let name = if !self . bounds . is_empty ( ) {
466- let mut bounds = self . bounds . iter ( ) . map ( |bound| match bound {
467- hir:: GenericBound :: Outlives ( lt) => lt,
468+ let outlives = self
469+ . bounds
470+ . iter ( )
471+ . map ( |bound| match bound {
472+ hir:: GenericBound :: Outlives ( lt) => lt. clean ( cx) ,
468473 _ => panic ! ( ) ,
469- } ) ;
470- let name = bounds. next ( ) . expect ( "no more bounds" ) . name . ident ( ) ;
471- let mut s = format ! ( "{}: {}" , self . name. ident( ) , name) ;
472- for bound in bounds {
473- s. push_str ( & format ! ( " + {}" , bound. name. ident( ) ) ) ;
474- }
475- Symbol :: intern ( & s)
476- } else {
477- self . name . ident ( ) . name
478- } ;
479- ( name, GenericParamDefKind :: Lifetime )
474+ } )
475+ . collect ( ) ;
476+ ( self . name . ident ( ) . name , GenericParamDefKind :: Lifetime { outlives } )
480477 }
481478 hir:: GenericParamKind :: Type { ref default, synthetic } => (
482479 self . name . ident ( ) . name ,
@@ -536,7 +533,7 @@ impl Clean<Generics> for hir::Generics<'_> {
536533 . map ( |param| {
537534 let param: GenericParamDef = param. clean ( cx) ;
538535 match param. kind {
539- GenericParamDefKind :: Lifetime => unreachable ! ( ) ,
536+ GenericParamDefKind :: Lifetime { .. } => unreachable ! ( ) ,
540537 GenericParamDefKind :: Type { did, ref bounds, .. } => {
541538 cx. impl_trait_bounds . insert ( did. into ( ) , bounds. clone ( ) ) ;
542539 }
@@ -569,7 +566,7 @@ impl Clean<Generics> for hir::Generics<'_> {
569566 {
570567 for param in & mut generics. params {
571568 match param. kind {
572- GenericParamDefKind :: Lifetime => { }
569+ GenericParamDefKind :: Lifetime { .. } => { }
573570 GenericParamDefKind :: Type { bounds : ref mut ty_bounds, .. } => {
574571 if & param. name == name {
575572 mem:: swap ( bounds, ty_bounds) ;
0 commit comments