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 208208- Add option to use DST structs for flexible arrays (--flexarray-dst, #2772 ).
209209- Add option to dynamically load variables (#2812 ).
210210- Add option in CLI to use rustified non-exhaustive enums (--rustified-non-exhaustive-enum, #2847 ).
211+ - Add field_type_name to FieldInfo.
211212## Changed
212213- Remove which and lazy-static dependencies (#2809 , #2817 ).
213214- Generate compile-time layout tests (#2787 ).
Original file line number Diff line number Diff line change @@ -205,4 +205,6 @@ pub struct FieldInfo<'a> {
205205 pub type_name : & ' a str ,
206206 /// The name of the field.
207207 pub field_name : & ' a str ,
208+ /// The name of the type of the field.
209+ pub field_type_name : Option < & ' a str > ,
208210}
Original file line number Diff line number Diff line change @@ -1515,6 +1515,7 @@ impl<'a> FieldCodegen<'a> for FieldData {
15151515 cb. field_visibility ( FieldInfo {
15161516 type_name : & parent_item. canonical_name ( ctx) ,
15171517 field_name,
1518+ field_type_name : field_ty. name ( ) ,
15181519 } )
15191520 } ) ,
15201521 self . annotations ( ) ,
@@ -1889,6 +1890,7 @@ impl<'a> FieldCodegen<'a> for Bitfield {
18891890
18901891 let bitfield_ty_item = ctx. resolve_item ( self . ty ( ) ) ;
18911892 let bitfield_ty = bitfield_ty_item. expect_type ( ) ;
1893+ let bitfield_ty_ident = bitfield_ty. name ( ) ;
18921894
18931895 let bitfield_ty_layout = bitfield_ty
18941896 . layout ( ctx)
@@ -1916,6 +1918,7 @@ impl<'a> FieldCodegen<'a> for Bitfield {
19161918 cb. field_visibility ( FieldInfo {
19171919 type_name : & parent_item. canonical_name ( ctx) ,
19181920 field_name,
1921+ field_type_name : bitfield_ty_ident,
19191922 } )
19201923 } )
19211924 } ) ;
You can’t perform that action at this time.
0 commit comments