Skip to content

Commit

Permalink
former : experimenting
Browse files Browse the repository at this point in the history
  • Loading branch information
Wandalen committed May 1, 2024
1 parent f50b54b commit b3aa516
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 42 deletions.
14 changes: 6 additions & 8 deletions module/core/former/tests/inc/former_tests/a_basic_manual.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ pub struct Struct1FormerStorage

impl ::core::default::Default for Struct1FormerStorage
{

#[ inline( always ) ]
fn default() -> Self
{
Expand Down Expand Up @@ -173,8 +172,8 @@ pub struct Struct1Former
Definition = Struct1FormerDefinition< (), Struct1, former::ReturnPreformed >,
>
where
Definition : former::FormerDefinition,
Definition::Types : former::FormerDefinitionTypes< Storage = Struct1FormerStorage >,
Definition : former::FormerDefinition< Storage = Struct1FormerStorage >,
// Definition::Types : former::FormerDefinitionTypes< Storage = Struct1FormerStorage >,
{
storage : Definition::Storage,
context : core::option::Option< Definition::Context >,
Expand All @@ -184,8 +183,8 @@ where
#[ automatically_derived ]
impl< Definition > Struct1Former< Definition >
where
Definition : former::FormerDefinition,
Definition::Types : former::FormerDefinitionTypes< Storage = Struct1FormerStorage >,
Definition : former::FormerDefinition< Storage = Struct1FormerStorage >,
// Definition::Types : former::FormerDefinitionTypes< Storage = Struct1FormerStorage >,
{

#[ inline( always ) ]
Expand Down Expand Up @@ -281,9 +280,8 @@ where

impl< Definition > Struct1Former< Definition >
where
Definition : former::FormerDefinition,
Definition::Types : former::FormerDefinitionTypes< Storage = Struct1FormerStorage, Formed = Struct1 >,
Definition::Storage : former::StoragePreform,
Definition : former::FormerDefinition< Storage = Struct1FormerStorage, Formed = Struct1 >,
// Definition::Types : former::FormerDefinitionTypes< Storage = Struct1FormerStorage, Formed = Struct1 >,
Definition::Storage : former::StoragePreform< Preformed = Struct1 >,
{
pub fn preform( self ) -> < Definition::Types as former::FormerDefinitionTypes >::Formed
Expand Down
10 changes: 5 additions & 5 deletions module/core/former/tests/inc/former_tests/a_primitives_manual.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,8 @@ for Struct1FormerStorage

pub struct Struct1Former< Definition = Struct1FormerDefinition >
where
Definition : former::FormerDefinition,
Definition::Types : former::FormerDefinitionTypes< Storage = Struct1FormerStorage >,
Definition : former::FormerDefinition< Storage = Struct1FormerStorage >,
// Definition::Types : former::FormerDefinitionTypes< Storage = Struct1FormerStorage >,
{
storage : Definition::Storage,
context : core::option::Option< Definition::Context >,
Expand All @@ -192,8 +192,8 @@ where

impl< Definition > Struct1Former< Definition >
where
Definition : former::FormerDefinition,
Definition::Types : former::FormerDefinitionTypes< Storage = Struct1FormerStorage >,
Definition : former::FormerDefinition< Storage = Struct1FormerStorage >,
// Definition::Types : former::FormerDefinitionTypes< Storage = Struct1FormerStorage >,
{

#[ inline( always ) ]
Expand Down Expand Up @@ -307,7 +307,7 @@ where

impl< Definition > Struct1Former< Definition >
where
Definition : former::FormerDefinition,
Definition : former::FormerDefinition< Storage = Struct1FormerStorage, Formed = Struct1 >,
Definition::Storage : former::StoragePreform,
Definition::Types : former::FormerDefinitionTypes< Storage = Struct1FormerStorage, Formed = Struct1 >,
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,8 @@ impl< K, Definition > AggregatorFormer
where
K : core::hash::Hash + std::cmp::Eq,
Definition : former::FormerDefinition,
Definition::Types : former::FormerDefinitionTypes< Storage = AggregatorFormerStorage< K > >,
Definition::Storage : former::StoragePreform< Preformed = Aggregator< K > >,
// Definition::Storage : former::StoragePreform< Preformed = Aggregator< K > >,
Definition::Types : former::FormerDefinitionTypes< Storage = AggregatorFormerStorage< K > >, // xxx
{

//
Expand Down
52 changes: 26 additions & 26 deletions module/core/former/tests/inc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,33 +7,33 @@ mod former_tests
#[ allow( unused_imports ) ]
use super::*;

// #[ cfg( any( not( feature = "no_std" ), feature = "use_alloc" ) ) ]
// mod container_former_common;
// #[ cfg( any( not( feature = "no_std" ), feature = "use_alloc" ) ) ]
// mod container_former_vec;
// #[ cfg( any( not( feature = "no_std" ), feature = "use_alloc" ) ) ]
// mod container_former_hashset;
// #[ cfg( any( not( feature = "no_std" ), feature = "use_alloc" ) ) ]
// mod container_former_hashmap;
//
// mod a_basic_manual;
#[ cfg( any( not( feature = "no_std" ), feature = "use_alloc" ) ) ]
mod container_former_common;
#[ cfg( any( not( feature = "no_std" ), feature = "use_alloc" ) ) ]
mod container_former_vec;
#[ cfg( any( not( feature = "no_std" ), feature = "use_alloc" ) ) ]
mod container_former_hashset;
#[ cfg( any( not( feature = "no_std" ), feature = "use_alloc" ) ) ]
mod container_former_hashmap;

mod a_basic_manual;
mod a_basic;
// mod a_primitives_manual;
// mod a_primitives;
//
// mod a_containers_without_subformer;
// #[ cfg( not( feature = "no_std" ) ) ]
// mod a_containers_with_subformer_manual;
// #[ cfg( not( feature = "no_std" ) ) ]
// mod a_containers_with_subformer;
//
// mod attribute_default_container;
// mod attribute_default_primitive;
// mod attribute_perform;
// mod attribute_setter;
// mod attribute_alias;
// mod attribute_feature;
//
mod a_primitives_manual;
mod a_primitives;

mod a_containers_without_subformer;
#[ cfg( not( feature = "no_std" ) ) ]
mod a_containers_with_subformer_manual;
#[ cfg( not( feature = "no_std" ) ) ]
mod a_containers_with_subformer;

mod attribute_default_container;
mod attribute_default_primitive;
mod attribute_perform;
mod attribute_setter;
mod attribute_alias;
mod attribute_feature;

// mod string_slice_manual;
// mod string_slice;
// mod unsigned_primitive_types;
Expand Down
2 changes: 1 addition & 1 deletion module/core/former_meta/src/derive/former.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1843,7 +1843,7 @@ pub fn former( input : proc_macro::TokenStream ) -> Result< TokenStream >
pub fn begin
(
mut storage : core::option::Option< Definition::Storage >,
context : core::option::Option< Definition::Context >, // xxx
context : core::option::Option< Definition::Context >,
on_end : < Definition as former::FormerDefinition >::End,
)
-> Self
Expand Down

0 comments on commit b3aa516

Please sign in to comment.