File tree 1 file changed +6
-10
lines changed
compiler/rustc_ast_pretty/src/pprust
1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -955,12 +955,12 @@ impl<'a> State<'a> {
955
955
self . pclose ( ) ;
956
956
}
957
957
ast:: TyKind :: AnonymousStruct ( ref fields, ..) => {
958
- self . s . word ( "struct" ) ;
959
- self . print_record_struct_body ( fields, ty. span ) ;
958
+ self . head ( "struct" ) ;
959
+ self . print_record_struct_body ( & fields, ty. span ) ;
960
960
}
961
961
ast:: TyKind :: AnonymousUnion ( ref fields, ..) => {
962
- self . s . word ( "union" ) ;
963
- self . print_record_struct_body ( fields, ty. span ) ;
962
+ self . head ( "union" ) ;
963
+ self . print_record_struct_body ( & fields, ty. span ) ;
964
964
}
965
965
ast:: TyKind :: Paren ( ref typ) => {
966
966
self . popen ( ) ;
@@ -1397,12 +1397,7 @@ impl<'a> State<'a> {
1397
1397
}
1398
1398
}
1399
1399
1400
- crate fn print_record_struct_body (
1401
- & mut self ,
1402
- fields : & Vec < ast:: FieldDef > ,
1403
- span : rustc_span:: Span ,
1404
- ) {
1405
- self . nbsp ( ) ;
1400
+ crate fn print_record_struct_body ( & mut self , fields : & [ ast:: FieldDef ] , span : rustc_span:: Span ) {
1406
1401
self . bopen ( ) ;
1407
1402
self . hardbreak_if_not_bol ( ) ;
1408
1403
@@ -1451,6 +1446,7 @@ impl<'a> State<'a> {
1451
1446
}
1452
1447
ast:: VariantData :: Struct ( ref fields, ..) => {
1453
1448
self . print_where_clause ( & generics. where_clause ) ;
1449
+ self . nbsp ( ) ;
1454
1450
self . print_record_struct_body ( fields, span) ;
1455
1451
}
1456
1452
}
You can’t perform that action at this time.
0 commit comments