Skip to content

Commit 405652a

Browse files
committed
wip
1 parent 43adf8b commit 405652a

File tree

3 files changed

+47
-50
lines changed

3 files changed

+47
-50
lines changed

module/core/former/tests/inc/struct_tests/debug_e0223_minimal.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,9 @@
44
use super::*;
55

66
#[derive(Default, Debug, PartialEq, former::Former)]
7-
#[debug]
87
pub struct MinimalStruct {
98
#[subform_collection( definition = former::VectorDefinition )]
109
vec_1: Vec<String>,
11-
#[subform_collection( definition = former::HashMapDefinition )]
12-
hashmap_1: collection_tools::HashMap<String, String>,
13-
#[subform_collection( definition = former::HashSetDefinition )]
14-
hashset_1: collection_tools::HashSet<String>,
1510
}
1611

1712
#[test]

module/core/former/tests/inc/struct_tests/mod.rs

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,13 @@ mod a_basic_manual;
6161
mod a_primitives;
6262
mod a_primitives_manual;
6363
mod tuple_struct;
64-
// mod debug_e0223_minimal;
64+
mod debug_e0223_minimal;
6565
mod debug_e0223_manual;
6666

6767
// #[cfg(any(not(feature = "no_std"), feature = "use_alloc"))]
68-
// mod subform_collection_basic; // BLOCKED: E0106 missing lifetime specifier in derive macro
68+
// mod subform_collection_basic; // BLOCKED: Complex collection type mismatch issues
6969
// #[cfg(any(feature = "use_alloc", not(feature = "no_std")))]
70-
// mod subform_collection_basic_manual; // BLOCKED: E0106 missing lifetime specifier for FormerBegin in manual code
70+
// mod subform_collection_basic_manual; // BLOCKED: FormerBegin lifetime parameter in manual code
7171
#[cfg(any(feature = "use_alloc", not(feature = "no_std")))]
7272
mod subform_collection_basic_scalar;
7373

@@ -89,7 +89,7 @@ mod attribute_storage_with_mutator;
8989
// = name collision
9090

9191
mod keyword_field_derive;
92-
// mod keyword_subform_derive; // BLOCKED: E0106 missing lifetime specifier in derive macro
92+
mod keyword_subform_derive;
9393
mod name_collision_former_hashmap_without_parameter;
9494
mod name_collision_former_vector_without_parameter;
9595
mod name_collisions;
@@ -121,78 +121,78 @@ mod visibility;
121121
// = collection former
122122

123123
// #[cfg(any(not(feature = "no_std"), feature = "use_alloc"))]
124-
// mod collection_former_binary_heap; // BLOCKED: E0106 missing lifetime specifier in derive macro
124+
// mod collection_former_binary_heap; // BLOCKED: Complex collection type mismatch issues
125125
// #[cfg(any(not(feature = "no_std"), feature = "use_alloc"))]
126-
// mod collection_former_btree_map; // BLOCKED: E0106 missing lifetime specifier in derive macro
126+
// mod collection_former_btree_map; // BLOCKED: Complex collection type mismatch issues
127127
// #[cfg(any(not(feature = "no_std"), feature = "use_alloc"))]
128-
// mod collection_former_btree_set; // BLOCKED: E0106 missing lifetime specifier in derive macro
128+
// mod collection_former_btree_set; // BLOCKED: Complex collection type mismatch issues
129129
#[cfg(any(not(feature = "no_std"), feature = "use_alloc"))]
130130
mod collection_former_common;
131131
// #[cfg(any(not(feature = "no_std"), feature = "use_alloc"))]
132-
// mod collection_former_hashmap; // BLOCKED: E0106 missing lifetime specifier in derive macro
132+
// mod collection_former_hashmap; // BLOCKED: Complex collection type mismatch issues
133133
// #[cfg(any(not(feature = "no_std"), feature = "use_alloc"))]
134-
// mod collection_former_hashset; // BLOCKED: E0106 missing lifetime specifier in derive macro
134+
// mod collection_former_hashset; // BLOCKED: Complex collection type mismatch issues
135135
// #[cfg(any(not(feature = "no_std"), feature = "use_alloc"))]
136-
// mod collection_former_linked_list; // BLOCKED: E0106 missing lifetime specifier in derive macro
136+
// mod collection_former_linked_list; // BLOCKED: Complex collection type mismatch issues
137137
// #[cfg(any(not(feature = "no_std"), feature = "use_alloc"))]
138-
// mod collection_former_vec; // BLOCKED: E0106 missing lifetime specifier in derive macro
138+
// mod collection_former_vec; // BLOCKED: Complex collection type mismatch issues
139139
// #[cfg(any(not(feature = "no_std"), feature = "use_alloc"))]
140-
// mod collection_former_vec_deque; // BLOCKED: E0106 missing lifetime specifier in derive macro
140+
// mod collection_former_vec_deque; // BLOCKED: Complex collection type mismatch issues
141141

142142
// = subform collection
143143

144+
#[cfg(any(not(feature = "no_std"), feature = "use_alloc"))]
145+
mod subform_collection;
146+
#[cfg(any(not(feature = "no_std"), feature = "use_alloc"))]
147+
mod subform_collection_custom;
148+
#[cfg(any(not(feature = "no_std"), feature = "use_alloc"))]
149+
mod subform_collection_implicit;
144150
// #[cfg(any(not(feature = "no_std"), feature = "use_alloc"))]
145-
// mod subform_collection; // BLOCKED: E0106 missing lifetime specifier in derive macro
146-
// #[cfg(any(not(feature = "no_std"), feature = "use_alloc"))]
147-
// mod subform_collection_custom; // BLOCKED: E0106 missing lifetime specifier in derive macro
148-
// #[cfg(any(not(feature = "no_std"), feature = "use_alloc"))]
149-
// mod subform_collection_implicit; // BLOCKED: E0106 missing lifetime specifier in derive macro
150-
// #[cfg(any(not(feature = "no_std"), feature = "use_alloc"))]
151-
// mod subform_collection_manual; // BLOCKED: E0106 missing lifetime specifier for FormerBegin in manual code
152-
// #[cfg(any(not(feature = "no_std"), feature = "use_alloc"))]
153-
// mod subform_collection_named; // BLOCKED: E0106 missing lifetime specifier in derive macro
151+
// mod subform_collection_manual; // BLOCKED: FormerBegin lifetime parameter in manual code
152+
#[cfg(any(not(feature = "no_std"), feature = "use_alloc"))]
153+
mod subform_collection_named;
154154
// #[cfg(any(not(feature = "no_std"), feature = "use_alloc"))]
155155
// mod subform_collection_playground; // BLOCKED: E0277 Hash/Eq trait bound issues with Definition
156-
// #[cfg(any(not(feature = "no_std"), feature = "use_alloc"))]
157-
// mod subform_collection_setter_off; // BLOCKED: E0106 missing lifetime specifier in derive macro
156+
#[cfg(any(not(feature = "no_std"), feature = "use_alloc"))]
157+
mod subform_collection_setter_off;
158158

159159
// = subform scalar
160160

161+
#[cfg(any(not(feature = "no_std"), feature = "use_alloc"))]
162+
mod subform_scalar;
161163
// #[cfg(any(not(feature = "no_std"), feature = "use_alloc"))]
162-
// mod subform_scalar; // BLOCKED: E0106 missing lifetime specifier in derive macro
163-
// #[cfg(any(not(feature = "no_std"), feature = "use_alloc"))]
164-
// mod subform_scalar_manual; // BLOCKED: E0106 missing lifetime specifier for FormerBegin in manual code
165-
// #[cfg(any(not(feature = "no_std"), feature = "use_alloc"))]
166-
// mod subform_scalar_name; // BLOCKED: E0106 missing lifetime specifier in derive macro
164+
// mod subform_scalar_manual; // BLOCKED: FormerBegin lifetime parameter in manual code
165+
#[cfg(any(not(feature = "no_std"), feature = "use_alloc"))]
166+
mod subform_scalar_name;
167167

168168
// = subform entry
169169

170+
#[cfg(any(not(feature = "no_std"), feature = "use_alloc"))]
171+
mod subform_entry;
170172
// #[cfg(any(not(feature = "no_std"), feature = "use_alloc"))]
171-
// mod subform_entry; // BLOCKED: E0106 missing lifetime specifier in derive macro
172-
// #[cfg(any(not(feature = "no_std"), feature = "use_alloc"))]
173-
// mod subform_entry_manual; // BLOCKED: E0106 missing lifetime specifier for FormerBegin in manual code
174-
// #[cfg(any(not(feature = "no_std"), feature = "use_alloc"))]
175-
// mod subform_entry_named; // BLOCKED: E0106 missing lifetime specifier in derive macro
176-
// #[cfg(any(not(feature = "no_std"), feature = "use_alloc"))]
177-
// mod subform_entry_named_manual; // BLOCKED: E0106 missing lifetime specifier for FormerBegin in manual code
178-
// #[cfg(any(not(feature = "no_std"), feature = "use_alloc"))]
179-
// mod subform_entry_setter_off; // BLOCKED: E0106 missing lifetime specifier in derive macro
173+
// mod subform_entry_manual; // BLOCKED: FormerBegin lifetime parameter in manual code
174+
#[cfg(any(not(feature = "no_std"), feature = "use_alloc"))]
175+
mod subform_entry_named;
180176
// #[cfg(any(not(feature = "no_std"), feature = "use_alloc"))]
181-
// mod subform_entry_setter_on; // BLOCKED: E0106 missing lifetime specifier in derive macro
177+
// mod subform_entry_named_manual; // BLOCKED: FormerBegin lifetime parameter in manual code
178+
#[cfg(any(not(feature = "no_std"), feature = "use_alloc"))]
179+
mod subform_entry_setter_off;
180+
#[cfg(any(not(feature = "no_std"), feature = "use_alloc"))]
181+
mod subform_entry_setter_on;
182182

183+
#[cfg(any(not(feature = "no_std"), feature = "use_alloc"))]
184+
mod subform_entry_hashmap;
183185
// #[cfg(any(not(feature = "no_std"), feature = "use_alloc"))]
184-
// mod subform_entry_hashmap; // BLOCKED: E0106 missing lifetime specifier in derive macro
185-
// #[cfg(any(not(feature = "no_std"), feature = "use_alloc"))]
186-
// mod subform_entry_hashmap_custom; // BLOCKED: E0106 missing lifetime specifier for FormerBegin in manual code
186+
// mod subform_entry_hashmap_custom; // BLOCKED: FormerBegin lifetime parameter in manual code
187187

188188
// = subform all : scalar, subform_scalar, subform_entry, subform_collection
189189

190-
// #[cfg(any(not(feature = "no_std"), feature = "use_alloc"))]
191-
// mod subform_all; // BLOCKED: E0106 missing lifetime specifier in derive macro
190+
#[cfg(any(not(feature = "no_std"), feature = "use_alloc"))]
191+
mod subform_all;
192192
// #[cfg(any(not(feature = "no_std"), feature = "use_alloc"))]
193193
// mod subform_all_parametrized; // BLOCKED: E0726 implicit elided lifetime not allowed here + E0277 FormerDefinition trait issues
194-
// #[cfg(any(not(feature = "no_std"), feature = "use_alloc"))]
195-
// mod subform_all_private; // BLOCKED: E0106 missing lifetime specifier in derive macro
194+
#[cfg(any(not(feature = "no_std"), feature = "use_alloc"))]
195+
mod subform_all_private;
196196

197197
// = standalone constructor
198198

module/core/former_meta/src/derive_former/field.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -827,6 +827,7 @@ allowing for dynamic and flexible construction of the `{item}` entity's {field_i
827827
Definition2::Storage : 'a,
828828
Definition2::Context : 'a,
829829
Definition2::End : 'a,
830+
Definition : 'a,
830831
{
831832
Former2::former_begin
832833
(
@@ -1123,6 +1124,7 @@ generics, providing a cleaner interface for initiating subform operations on sca
11231124
Definition2::Storage : 'a,
11241125
Definition2::Context : 'a,
11251126
Definition2::End : 'a,
1127+
Definition : 'a,
11261128
{
11271129
Former2::former_begin
11281130
(

0 commit comments

Comments
 (0)