File tree 3 files changed +6
-0
lines changed 3 files changed +6
-0
lines changed Original file line number Diff line number Diff line change 208
208
- Add option to use DST structs for flexible arrays (--flexarray-dst, #2772 ).
209
209
- Add option to dynamically load variables (#2812 ).
210
210
- Add option in CLI to use rustified non-exhaustive enums (--rustified-non-exhaustive-enum, #2847 ).
211
+ - Add field_type_name to FieldInfo.
211
212
## Changed
212
213
- Remove which and lazy-static dependencies (#2809 , #2817 ).
213
214
- Generate compile-time layout tests (#2787 ).
Original file line number Diff line number Diff line change @@ -205,4 +205,6 @@ pub struct FieldInfo<'a> {
205
205
pub type_name : & ' a str ,
206
206
/// The name of the field.
207
207
pub field_name : & ' a str ,
208
+ /// The name of the type of the field.
209
+ pub field_type_name : Option < & ' a str > ,
208
210
}
Original file line number Diff line number Diff line change @@ -1515,6 +1515,7 @@ impl<'a> FieldCodegen<'a> for FieldData {
1515
1515
cb. field_visibility ( FieldInfo {
1516
1516
type_name : & parent_item. canonical_name ( ctx) ,
1517
1517
field_name,
1518
+ field_type_name : field_ty. name ( ) ,
1518
1519
} )
1519
1520
} ) ,
1520
1521
self . annotations ( ) ,
@@ -1889,6 +1890,7 @@ impl<'a> FieldCodegen<'a> for Bitfield {
1889
1890
1890
1891
let bitfield_ty_item = ctx. resolve_item ( self . ty ( ) ) ;
1891
1892
let bitfield_ty = bitfield_ty_item. expect_type ( ) ;
1893
+ let bitfield_ty_ident = bitfield_ty. name ( ) ;
1892
1894
1893
1895
let bitfield_ty_layout = bitfield_ty
1894
1896
. layout ( ctx)
@@ -1916,6 +1918,7 @@ impl<'a> FieldCodegen<'a> for Bitfield {
1916
1918
cb. field_visibility ( FieldInfo {
1917
1919
type_name : & parent_item. canonical_name ( ctx) ,
1918
1920
field_name,
1921
+ field_type_name : bitfield_ty_ident,
1919
1922
} )
1920
1923
} )
1921
1924
} ) ;
You can’t perform that action at this time.
0 commit comments