@@ -155,7 +155,7 @@ fn compile_error(msgs: impl Iterator<Item = String>, span: Span) -> TokenStream
155
155
fn build_skeleton ( buf : & mut Buffer , ast : & syn:: DeriveInput ) -> Result < usize , CompileError > {
156
156
let template_args = TemplateArgs :: fallback ( ) ;
157
157
let config = Config :: new ( "" , None , None , None ) ?;
158
- let input = TemplateInput :: new ( ast, config, & template_args) ?;
158
+ let input = TemplateInput :: new ( ast, None , config, & template_args) ?;
159
159
let mut contexts = HashMap :: default ( ) ;
160
160
let parsed = parser:: Parsed :: default ( ) ;
161
161
contexts. insert ( & input. path , Context :: empty ( & parsed) ) ;
@@ -177,7 +177,7 @@ pub(crate) fn build_template(
177
177
let mut result = match AnyTemplateArgs :: new ( ast) ? {
178
178
AnyTemplateArgs :: Struct ( item) => {
179
179
err_span = item. source . 1 . or ( item. template_span ) ;
180
- build_template_item ( buf, ast, & item, TmplKind :: Struct )
180
+ build_template_item ( buf, ast, None , & item, TmplKind :: Struct )
181
181
}
182
182
AnyTemplateArgs :: Enum {
183
183
enum_args,
@@ -203,6 +203,7 @@ pub(crate) fn build_template(
203
203
fn build_template_item (
204
204
buf : & mut Buffer ,
205
205
ast : & syn:: DeriveInput ,
206
+ enum_ast : Option < & syn:: DeriveInput > ,
206
207
template_args : & TemplateArgs ,
207
208
tmpl_kind : TmplKind ,
208
209
) -> Result < usize , CompileError > {
@@ -214,7 +215,7 @@ fn build_template_item(
214
215
template_args. whitespace ,
215
216
template_args. config_span ,
216
217
) ?;
217
- let input = TemplateInput :: new ( ast, config, template_args) ?;
218
+ let input = TemplateInput :: new ( ast, enum_ast , config, template_args) ?;
218
219
219
220
let mut templates = HashMap :: default ( ) ;
220
221
input. find_used_templates ( & mut templates) ?;
0 commit comments