File tree 3 files changed +3
-9
lines changed
rustc_ast_pretty/src/pprust
3 files changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -2908,10 +2908,7 @@ impl<'a> State<'a> {
2908
2908
generic_params : & [ ast:: GenericParam ] ,
2909
2909
) {
2910
2910
self . ibox ( INDENT_UNIT ) ;
2911
- if !generic_params. is_empty ( ) {
2912
- self . word ( "for" ) ;
2913
- self . print_generic_params ( generic_params) ;
2914
- }
2911
+ self . print_formal_generic_params ( generic_params) ;
2915
2912
let generics = ast:: Generics {
2916
2913
params : Vec :: new ( ) ,
2917
2914
where_clause : ast:: WhereClause {
Original file line number Diff line number Diff line change @@ -2327,10 +2327,7 @@ impl<'a> State<'a> {
2327
2327
arg_names : & [ Ident ] ,
2328
2328
) {
2329
2329
self . ibox ( INDENT_UNIT ) ;
2330
- if !generic_params. is_empty ( ) {
2331
- self . word ( "for" ) ;
2332
- self . print_generic_params ( generic_params) ;
2333
- }
2330
+ self . print_formal_generic_params ( generic_params) ;
2334
2331
let generics = hir:: Generics {
2335
2332
params : & [ ] ,
2336
2333
where_clause : hir:: WhereClause { predicates : & [ ] , span : rustc_span:: DUMMY_SP } ,
Original file line number Diff line number Diff line change @@ -803,7 +803,7 @@ fn test_ty() {
803
803
assert_eq ! ( stringify_ty!( fn ( x: u8 ) ) , "fn(x: u8)" ) ;
804
804
#[ rustfmt:: skip]
805
805
assert_eq ! ( stringify_ty!( for <> fn ( ) ) , "fn()" ) ;
806
- assert_eq ! ( stringify_ty!( for <' a> fn ( ) ) , "for<'a>fn()" ) ; // FIXME
806
+ assert_eq ! ( stringify_ty!( for <' a> fn ( ) ) , "for<'a> fn()" ) ;
807
807
808
808
// TyKind::Never
809
809
assert_eq ! ( stringify_ty!( !) , "!" ) ;
You can’t perform that action at this time.
0 commit comments