@@ -454,14 +454,17 @@ impl<'a> State<'a> {
454454 fn print_associated_type (
455455 & mut self ,
456456 ident : ast:: Ident ,
457+ generics : & hir:: Generics < ' _ > ,
457458 bounds : Option < hir:: GenericBounds < ' _ > > ,
458459 ty : Option < & hir:: Ty < ' _ > > ,
459460 ) {
460461 self . word_space ( "type" ) ;
461462 self . print_ident ( ident) ;
463+ self . print_generic_params ( & generics. params ) ;
462464 if let Some ( bounds) = bounds {
463465 self . print_bounds ( ":" , bounds) ;
464466 }
467+ self . print_where_clause ( & generics. where_clause ) ;
465468 if let Some ( ty) = ty {
466469 self . s . space ( ) ;
467470 self . word_space ( "=" ) ;
@@ -902,6 +905,7 @@ impl<'a> State<'a> {
902905 hir:: TraitItemKind :: Type ( ref bounds, ref default) => {
903906 self . print_associated_type (
904907 ti. ident ,
908+ & ti. generics ,
905909 Some ( bounds) ,
906910 default. as_ref ( ) . map ( |ty| & * * ty) ,
907911 ) ;
@@ -930,7 +934,7 @@ impl<'a> State<'a> {
930934 self . ann . nested ( self , Nested :: Body ( body) ) ;
931935 }
932936 hir:: ImplItemKind :: TyAlias ( ref ty) => {
933- self . print_associated_type ( ii. ident , None , Some ( ty) ) ;
937+ self . print_associated_type ( ii. ident , & ii . generics , None , Some ( ty) ) ;
934938 }
935939 hir:: ImplItemKind :: OpaqueTy ( bounds) => {
936940 self . word_space ( "type" ) ;
0 commit comments