File tree 1 file changed +10
-6
lines changed
compiler/rustc_ast_pretty/src/pprust
1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -986,12 +986,12 @@ impl<'a> State<'a> {
986
986
self . pclose ( ) ;
987
987
}
988
988
ast:: TyKind :: AnonymousStruct ( ref fields, ..) => {
989
- self . head ( "struct" ) ;
990
- self . print_record_struct_body ( & fields, ty. span ) ;
989
+ self . s . word ( "struct" ) ;
990
+ self . print_record_struct_body ( fields, ty. span ) ;
991
991
}
992
992
ast:: TyKind :: AnonymousUnion ( ref fields, ..) => {
993
- self . head ( "union" ) ;
994
- self . print_record_struct_body ( & fields, ty. span ) ;
993
+ self . s . word ( "union" ) ;
994
+ self . print_record_struct_body ( fields, ty. span ) ;
995
995
}
996
996
ast:: TyKind :: Paren ( ref typ) => {
997
997
self . popen ( ) ;
@@ -1413,7 +1413,12 @@ impl<'a> State<'a> {
1413
1413
}
1414
1414
}
1415
1415
1416
- crate fn print_record_struct_body ( & mut self , fields : & [ ast:: FieldDef ] , span : rustc_span:: Span ) {
1416
+ crate fn print_record_struct_body (
1417
+ & mut self ,
1418
+ fields : & Vec < ast:: FieldDef > ,
1419
+ span : rustc_span:: Span ,
1420
+ ) {
1421
+ self . nbsp ( ) ;
1417
1422
self . bopen ( ) ;
1418
1423
self . hardbreak_if_not_bol ( ) ;
1419
1424
@@ -1462,7 +1467,6 @@ impl<'a> State<'a> {
1462
1467
}
1463
1468
ast:: VariantData :: Struct ( ref fields, ..) => {
1464
1469
self . print_where_clause ( & generics. where_clause ) ;
1465
- self . nbsp ( ) ;
1466
1470
self . print_record_struct_body ( fields, span) ;
1467
1471
}
1468
1472
}
You can’t perform that action at this time.
0 commit comments