You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: module/core/former/plan.md
+42-8Lines changed: 42 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -151,15 +151,49 @@
151
151
* Test Matrix: Not applicable for this refactoring increment directly, but existing tests cover behavior.
152
152
* Commit Message: `refactor(former_meta): Improve unit variant handling using macro_tools`
153
153
154
-
*[⚫]**Increment 6: Implement Generalizations (New Utilities in `macro_tools`)**
154
+
*[⏳]**Increment 6: Implement Generalizations (New Utilities in `macro_tools`)**
155
155
* Target Crate(s): `macro_tools`
156
-
* Pre-Analysis: Review the approved new utilities for `macro_tools` from Increment 4.
157
-
* Detailed Plan Step 1: Implement the new general-purpose utilities in the appropriate modules within `macro_tools/src/`.
158
-
* Detailed Plan Step 2: Add comprehensive unit tests for these new utilities within `macro_tools/tests/inc/`. Each new public function/method should have corresponding tests.
159
-
* Detailed Plan Step 3: Update `macro_tools/src/lib.rs` and relevant module files (`mod.rs`) to correctly export the new utilities under the appropriate namespaces (`own`, `orphan`, `exposed`, `prelude`).
160
-
* Detailed Plan Step 4: Add clear ///doc comments for all new public items in `macro_tools`.
* Verification Strategy: User applies changes. `cargo test --package macro_tools` must pass. `cargo doc --package macro_tools --no-deps` should build successfully.
156
+
* Pre-Analysis: Review the approved new utilities for `macro_tools` from Increment 4. These are:
* (And the conceptual private helper `split_for_impl_syn_components` or equivalent logic to access decomposed generic parts).
164
+
* Detailed Plan Step 1: Implement these utilities in `module/core/macro_tools/src/ident.rs` and `module/core/macro_tools/src/generic_params.rs`.
165
+
* Detailed Plan Step 2: Add comprehensive unit tests for these new utilities. This will involve creating new test files or extending existing ones in `module/core/macro_tools/tests/inc/` (e.g., a new `ident_general_tests.rs`, `generic_params_ref_tests.rs` or similar, and updating `module/core/macro_tools/tests/inc/mod.rs`).
166
+
* Detailed Plan Step 3: Update `module/core/macro_tools/src/lib.rs` and relevant module files (`ident.rs`, `generic_params.rs` themselves if they define `pub` items, or their parent `mod.rs` if they are submodules) to correctly export the new public utilities.
167
+
* Detailed Plan Step 4: Add clear `///doc` comments for all new public items in `macro_tools`.
168
+
* Crucial Design Rules: [Traits: Encourage Modular Design], [Visibility: Keep Implementation Details Private], [Comments and Documentation], [Testing: Plan with a Test Matrix When Writing Tests].
169
+
* Relevant Behavior Rules: N/A directly, but API design should be robust and adhere to Rust conventions.
170
+
* Verification Strategy:
171
+
* User applies changes to `macro_tools`.
172
+
*`cargo check --package macro_tools` must pass.
173
+
*`cargo test --package macro_tools` must pass.
174
+
*`cargo doc --package macro_tools --no-deps` should build successfully.
175
+
*`cargo clippy --package macro_tools --all-targets -- -D warnings` should pass.
176
+
* Test Matrix:
177
+
***For `new_ident_from_cased_str` (in `macro_tools::ident`):**
* ID: T6.7, Input: (`"ValidIdent"`, `span`, `false`), Expected: `Ok(syn::Ident::new("ValidIdent", span))` (function assumes input is already cased as desired for the ident name itself, only keyword/raw status is handled).
185
+
***For `GenericsRef` methods (in `macro_tools::generic_params`):**
0 commit comments