File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed
compiler/rustc_ast_pretty/src/pprust Expand file tree Collapse file tree 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> {
955955 self . pclose ( ) ;
956956 }
957957 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 ) ;
960960 }
961961 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 ) ;
964964 }
965965 ast:: TyKind :: Paren ( ref typ) => {
966966 self . popen ( ) ;
@@ -1397,12 +1397,7 @@ impl<'a> State<'a> {
13971397 }
13981398 }
13991399
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 ) {
14061401 self . bopen ( ) ;
14071402 self . hardbreak_if_not_bol ( ) ;
14081403
@@ -1451,6 +1446,7 @@ impl<'a> State<'a> {
14511446 }
14521447 ast:: VariantData :: Struct ( ref fields, ..) => {
14531448 self . print_where_clause ( & generics. where_clause ) ;
1449+ self . nbsp ( ) ;
14541450 self . print_record_struct_body ( fields, span) ;
14551451 }
14561452 }
You can’t perform that action at this time.
0 commit comments