@@ -3,7 +3,7 @@ use std::ops::Not;
33use darling:: { util:: IdentString , Error , FromAttributes , Result } ;
44use proc_macro2:: TokenStream ;
55use quote:: { quote, ToTokens } ;
6- use syn:: { parse_quote, ItemStruct , Path , Visibility } ;
6+ use syn:: { parse_quote, Generics , ItemStruct , Path , Visibility } ;
77
88use crate :: {
99 attrs:: container:: NestedContainerAttributes ,
@@ -58,6 +58,7 @@ impl Container {
5858 } ;
5959
6060 Ok ( Self :: Struct ( Struct {
61+ generics : item_struct. generics ,
6162 fields : versioned_fields,
6263 common,
6364 } ) )
@@ -113,6 +114,7 @@ impl Container {
113114 } ;
114115
115116 Ok ( Self :: Struct ( Struct {
117+ generics : item_struct. generics ,
116118 fields : versioned_fields,
117119 common,
118120 } ) )
@@ -123,10 +125,12 @@ impl Container {
123125pub ( crate ) struct Struct {
124126 /// List of fields defined in the original struct. How, and if, an item
125127 /// should generate code, is decided by the currently generated version.
126- pub ( crate ) fields : Vec < VersionedField > ,
128+ pub fields : Vec < VersionedField > ,
129+
130+ pub generics : Generics ,
127131
128132 /// Common container data which is shared between structs and enums.
129- pub ( crate ) common : CommonContainerData ,
133+ pub common : CommonContainerData ,
130134}
131135
132136// Common token generation
0 commit comments