@@ -158,7 +158,7 @@ impl<'a> Item<'a> {
158158#[ derive( Debug ) ]
159159enum BodyElement < ' a > {
160160 // Stmt(&'a ast::Stmt),
161- // Field(&'a ast::Field ),
161+ // Field(&'a ast::ExprField ),
162162 // Variant(&'a ast::Variant),
163163 // Item(&'a ast::Item),
164164 ForeignItem ( & ' a ast:: ForeignItem ) ,
@@ -1274,7 +1274,7 @@ fn format_unit_struct(
12741274pub ( crate ) fn format_struct_struct (
12751275 context : & RewriteContext < ' _ > ,
12761276 struct_parts : & StructParts < ' _ > ,
1277- fields : & [ ast:: StructField ] ,
1277+ fields : & [ ast:: FieldDef ] ,
12781278 offset : Indent ,
12791279 one_line_width : Option < usize > ,
12801280) -> Option < String > {
@@ -1411,7 +1411,7 @@ fn format_empty_struct_or_tuple(
14111411fn format_tuple_struct (
14121412 context : & RewriteContext < ' _ > ,
14131413 struct_parts : & StructParts < ' _ > ,
1414- fields : & [ ast:: StructField ] ,
1414+ fields : & [ ast:: FieldDef ] ,
14151415 offset : Indent ,
14161416) -> Option < String > {
14171417 let mut result = String :: with_capacity ( 1024 ) ;
@@ -1631,7 +1631,7 @@ fn type_annotation_spacing(config: &Config) -> (&str, &str) {
16311631
16321632pub ( crate ) fn rewrite_struct_field_prefix (
16331633 context : & RewriteContext < ' _ > ,
1634- field : & ast:: StructField ,
1634+ field : & ast:: FieldDef ,
16351635) -> Option < String > {
16361636 let vis = format_visibility ( context, & field. vis ) ;
16371637 let type_annotation_spacing = type_annotation_spacing ( context. config ) ;
@@ -1646,15 +1646,15 @@ pub(crate) fn rewrite_struct_field_prefix(
16461646 } )
16471647}
16481648
1649- impl Rewrite for ast:: StructField {
1649+ impl Rewrite for ast:: FieldDef {
16501650 fn rewrite ( & self , context : & RewriteContext < ' _ > , shape : Shape ) -> Option < String > {
16511651 rewrite_struct_field ( context, self , shape, 0 )
16521652 }
16531653}
16541654
16551655pub ( crate ) fn rewrite_struct_field (
16561656 context : & RewriteContext < ' _ > ,
1657- field : & ast:: StructField ,
1657+ field : & ast:: FieldDef ,
16581658 shape : Shape ,
16591659 lhs_max_width : usize ,
16601660) -> Option < String > {
0 commit comments