@@ -552,24 +552,6 @@ impl<'a> State<'a> {
552
552
self . word ( ";" )
553
553
}
554
554
555
- fn print_item_type (
556
- & mut self ,
557
- item : & hir:: Item < ' _ > ,
558
- generics : & hir:: Generics < ' _ > ,
559
- inner : impl Fn ( & mut Self ) ,
560
- ) {
561
- self . head ( "type" ) ;
562
- self . print_ident ( item. ident ) ;
563
- self . print_generic_params ( generics. params ) ;
564
- self . end ( ) ; // end the inner ibox
565
-
566
- self . print_where_clause ( generics) ;
567
- self . space ( ) ;
568
- inner ( self ) ;
569
- self . word ( ";" ) ;
570
- self . end ( ) ; // end the outer ibox
571
- }
572
-
573
555
fn print_item ( & mut self , item : & hir:: Item < ' _ > ) {
574
556
self . hardbreak_if_not_bol ( ) ;
575
557
self . maybe_print_comment ( item. span . lo ( ) ) ;
@@ -682,10 +664,17 @@ impl<'a> State<'a> {
682
664
self . end ( )
683
665
}
684
666
hir:: ItemKind :: TyAlias ( ty, generics) => {
685
- self . print_item_type ( item, generics, |state| {
686
- state. word_space ( "=" ) ;
687
- state. print_type ( ty) ;
688
- } ) ;
667
+ self . head ( "type" ) ;
668
+ self . print_ident ( item. ident ) ;
669
+ self . print_generic_params ( generics. params ) ;
670
+ self . end ( ) ; // end the inner ibox
671
+
672
+ self . print_where_clause ( generics) ;
673
+ self . space ( ) ;
674
+ self . word_space ( "=" ) ;
675
+ self . print_type ( ty) ;
676
+ self . word ( ";" ) ;
677
+ self . end ( ) ; // end the outer ibox
689
678
}
690
679
hir:: ItemKind :: Enum ( ref enum_definition, params) => {
691
680
self . print_enum_def ( enum_definition, params, item. ident . name , item. span ) ;
0 commit comments