File tree 2 files changed +3
-25
lines changed
rustc_ast_pretty/src/pprust/state
2 files changed +3
-25
lines changed Original file line number Diff line number Diff line change @@ -348,21 +348,10 @@ impl<'a> State<'a> {
348
348
self . head ( visibility_qualified ( & item. vis , "trait" ) ) ;
349
349
self . print_ident ( item. ident ) ;
350
350
self . print_generic_params ( & generics. params ) ;
351
- let mut real_bounds = Vec :: with_capacity ( bounds. len ( ) ) ;
352
- // FIXME(durka) this seems to be some quite outdated syntax
353
- for b in bounds. iter ( ) {
354
- if let GenericBound :: Trait ( ptr, ast:: TraitBoundModifier :: Maybe ) = b {
355
- self . space ( ) ;
356
- self . word_space ( "for ?" ) ;
357
- self . print_trait_ref ( & ptr. trait_ref ) ;
358
- } else {
359
- real_bounds. push ( b. clone ( ) ) ;
360
- }
361
- }
362
351
self . nbsp ( ) ;
363
- if !real_bounds . is_empty ( ) {
352
+ if !bounds . is_empty ( ) {
364
353
self . word_nbsp ( "=" ) ;
365
- self . print_type_bounds ( & real_bounds ) ;
354
+ self . print_type_bounds ( & bounds ) ;
366
355
}
367
356
self . print_where_clause ( & generics. where_clause ) ;
368
357
self . word ( ";" ) ;
Original file line number Diff line number Diff line change @@ -695,19 +695,8 @@ impl<'a> State<'a> {
695
695
self . head ( "trait" ) ;
696
696
self . print_ident ( item. ident ) ;
697
697
self . print_generic_params ( generics. params ) ;
698
- let mut real_bounds = Vec :: with_capacity ( bounds. len ( ) ) ;
699
- // FIXME(durka) this seems to be some quite outdated syntax
700
- for b in bounds {
701
- if let GenericBound :: Trait ( ptr, hir:: TraitBoundModifier :: Maybe ) = b {
702
- self . space ( ) ;
703
- self . word_space ( "for ?" ) ;
704
- self . print_trait_ref ( & ptr. trait_ref ) ;
705
- } else {
706
- real_bounds. push ( b) ;
707
- }
708
- }
709
698
self . nbsp ( ) ;
710
- self . print_bounds ( "=" , real_bounds ) ;
699
+ self . print_bounds ( "=" , bounds ) ;
711
700
self . print_where_clause ( generics) ;
712
701
self . word ( ";" ) ;
713
702
self . end ( ) ; // end inner head-block
You can’t perform that action at this time.
0 commit comments