File tree 1 file changed +6
-10
lines changed
1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -2639,27 +2639,23 @@ impl<'a> State<'a> {
2639
2639
self . s . word ( "<" ) ;
2640
2640
2641
2641
self . commasep ( Inconsistent , & generic_params, |s, param| {
2642
+ s. print_outer_attributes_inline ( & param. attrs ) ;
2643
+
2642
2644
match param. kind {
2643
2645
ast:: GenericParamKind :: Lifetime => {
2644
- s. print_outer_attributes_inline ( & param. attrs ) ;
2645
2646
let lt = ast:: Lifetime { id : param. id , ident : param. ident } ;
2646
2647
s. print_lifetime_bounds ( lt, & param. bounds )
2647
2648
}
2648
2649
ast:: GenericParamKind :: Type { ref default } => {
2649
- s. print_outer_attributes_inline ( & param. attrs ) ;
2650
2650
s. print_ident ( param. ident ) ;
2651
2651
s. print_type_bounds ( ":" , & param. bounds ) ;
2652
- match default {
2653
- Some ( ref default) => {
2654
- s. s . space ( ) ;
2655
- s. word_space ( "=" ) ;
2656
- s. print_type ( default)
2657
- }
2658
- _ => { }
2652
+ if let Some ( ref default) = default {
2653
+ s. s . space ( ) ;
2654
+ s. word_space ( "=" ) ;
2655
+ s. print_type ( default)
2659
2656
}
2660
2657
}
2661
2658
ast:: GenericParamKind :: Const { ref ty } => {
2662
- s. print_outer_attributes_inline ( & param. attrs ) ;
2663
2659
s. word_space ( "const" ) ;
2664
2660
s. print_ident ( param. ident ) ;
2665
2661
s. s . space ( ) ;
You can’t perform that action at this time.
0 commit comments