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