File tree Expand file tree Collapse file tree 3 files changed +6
-0
lines changed Expand file tree Collapse file tree 3 files changed +6
-0
lines changed Original file line number Diff line number Diff line change 238238- Add option to use DST structs for flexible arrays (--flexarray-dst, #2772 ).
239239- Add option to dynamically load variables (#2812 ).
240240- Add option in CLI to use rustified non-exhaustive enums (--rustified-non-exhaustive-enum, #2847 ).
241+ - Add field_type_name to FieldInfo.
241242## Changed
242243- Remove which and lazy-static dependencies (#2809 , #2817 ).
243244- Generate compile-time layout tests (#2787 ).
Original file line number Diff line number Diff line change @@ -280,4 +280,6 @@ pub struct FieldInfo<'a> {
280280 pub type_name : & ' a str ,
281281 /// The name of the field.
282282 pub field_name : & ' a str ,
283+ /// The name of the type of the field.
284+ pub field_type_name : Option < & ' a str > ,
283285}
Original file line number Diff line number Diff line change @@ -1544,6 +1544,7 @@ impl FieldCodegen<'_> for FieldData {
15441544 cb. field_visibility ( FieldInfo {
15451545 type_name : & parent_item. canonical_name ( ctx) ,
15461546 field_name,
1547+ field_type_name : field_ty. name ( ) ,
15471548 } )
15481549 } ) ,
15491550 self . annotations ( ) ,
@@ -1949,6 +1950,7 @@ impl<'a> FieldCodegen<'a> for Bitfield {
19491950
19501951 let bitfield_ty_item = ctx. resolve_item ( self . ty ( ) ) ;
19511952 let bitfield_ty = bitfield_ty_item. expect_type ( ) ;
1953+ let bitfield_ty_ident = bitfield_ty. name ( ) ;
19521954
19531955 let bitfield_ty_layout = bitfield_ty
19541956 . layout ( ctx)
@@ -1973,6 +1975,7 @@ impl<'a> FieldCodegen<'a> for Bitfield {
19731975 cb. field_visibility ( FieldInfo {
19741976 type_name : & parent_item. canonical_name ( ctx) ,
19751977 field_name,
1978+ field_type_name : bitfield_ty_ident,
19761979 } )
19771980 } )
19781981 } ) ;
You can’t perform that action at this time.
0 commit comments