From 998363550411ee01411472fe95102b917970b960 Mon Sep 17 00:00:00 2001 From: wandalen Date: Wed, 10 Apr 2024 17:32:41 +0300 Subject: [PATCH] former : experimenting --- module/core/former_meta/src/derive/former.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/module/core/former_meta/src/derive/former.rs b/module/core/former_meta/src/derive/former.rs index 705f75ea7a..5f4bf42490 100644 --- a/module/core/former_meta/src/derive/former.rs +++ b/module/core/former_meta/src/derive/former.rs @@ -833,8 +833,9 @@ Result< TokenStream > let field_forming_end_name = format!( "former{}End", ident.to_string().to_case( Case::Camel ) ); let field_forming_end = syn::Ident::new( &field_forming_end_name, ident.span() ); - let field_ty = field.non_optional_ty; - let field_set = typ::all_type_parameters( field_ty ); + // let field_ty = field.non_optional_ty; + let params = typ::type_parameters( &field.non_optional_ty, .. ); + // let params = typ::all_type_parameters( field.non_optional_ty ); // let xxx = field_ty; // let generics = field_ty.generics // let ( generics_impl, generics_ty, generics_where ) = generics.split_for_impl(); @@ -850,7 +851,7 @@ Result< TokenStream > #[ automatically_derived ] impl< Definition > former::FormingEnd < - former::VectorDefinition< #field_set, #former< Definition >, #former< Definition >, former::NoEnd >, + former::VectorDefinition< #( #params, )* #former< Definition >, #former< Definition >, former::NoEnd >, // xxx : what is there is no generic parameters? > for #field_forming_end