@@ -11,9 +11,9 @@ use crate::translator::{ExprContext, Translation, PADDING_SUFFIX};
11
11
use crate :: with_stmts:: WithStmts ;
12
12
use c2rust_ast_builder:: mk;
13
13
use c2rust_ast_printer:: pprust;
14
- NestedMetaItem , StmtKind , StrStyle , StructField , Ty , TyKind ,
15
14
use syn:: {
16
15
self , AttrStyle , BinOp as RBinOp , Expr , Meta ,
16
+ NestedMeta , Stmt , Field , Type ,
17
17
ExprBlock , ExprAssign , ExprAssignOp , ExprBinary , ExprUnary , ExprMethodCall , ExprCast ,
18
18
} ;
19
19
use syntax:: ptr:: P ;
@@ -40,7 +40,7 @@ enum FieldType {
40
40
Regular {
41
41
name : String ,
42
42
ctype : CTypeId ,
43
- field : StructField ,
43
+ field : Field ,
44
44
use_inner_type : bool ,
45
45
} ,
46
46
}
@@ -278,7 +278,7 @@ impl<'a> Translation<'a> {
278
278
struct_id : CRecordId ,
279
279
field_ids : & [ CDeclId ] ,
280
280
platform_byte_size : u64 ,
281
- ) -> Result < Vec < StructField > , TranslationError > {
281
+ ) -> Result < Vec < Field > , TranslationError > {
282
282
let mut field_entries = Vec :: with_capacity ( field_ids. len ( ) ) ;
283
283
// We need to clobber bitfields in consecutive bytes together (leaving
284
284
// regular fields alone) and add in padding as necessary
@@ -534,7 +534,7 @@ impl<'a> Translation<'a> {
534
534
535
535
fields
536
536
. into_iter ( )
537
- . collect :: < WithStmts < Vec < ast :: Field > > > ( )
537
+ . collect :: < WithStmts < Vec < syn :: FieldValue > > > ( )
538
538
. and_then ( |fields| {
539
539
let struct_expr = mk ( ) . struct_expr ( name. as_str ( ) , fields) ;
540
540
let local_variable =
@@ -649,7 +649,7 @@ impl<'a> Translation<'a> {
649
649
650
650
Ok ( fields
651
651
. into_iter ( )
652
- . collect :: < WithStmts < Vec < ast :: Field > > > ( )
652
+ . collect :: < WithStmts < Vec < syn :: FieldValue > > > ( )
653
653
. map ( |fields| mk ( ) . struct_expr ( name. as_str ( ) , fields) ) )
654
654
}
655
655
0 commit comments