diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-06-23 00:40:05 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-06-23 00:40:05 +0800 |
| commit | 1df1fc664c4a4b12807a49ef2f1a0effda6ce064 (patch) | |
| tree | a5bcdab31e18094b226d6cef36d99c879c64e25f /docs/pages | |
| parent | d94103fd7e76dd86cd64c23f00c818165fb7dc22 (diff) | |
Add compile-time duplicate variant detection
Add duplicate variant checks for chain, renderer, help, and completion
registrations to produce a clear compile error instead of silently
generating unreachable code
Diffstat (limited to 'docs/pages')
| -rw-r--r-- | docs/pages/other/features.md | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/docs/pages/other/features.md b/docs/pages/other/features.md index 6e2a364..5ee0497 100644 --- a/docs/pages/other/features.md +++ b/docs/pages/other/features.md @@ -92,14 +92,14 @@ Enables an additional set of macros, providing more convenient syntactic sugar a For example, allows the shorthand form `dispatcher!("greet")`, which auto-generates `CMDGreet` / `EntryGreet`. -| Macro | Description | -|---|---| -| `empty_result!()` | Shorthand for returning an empty result early in a chain | -| `entry!(Type, ["a", "b"])` | Construct test data for an entry type | -| `group!(Type)` | Register external types as group members without modifying them | -| `pack_err!(ErrorType)` / `pack_err!(ErrorType = Inner)` | Create error types with an automatic `name` field | -| `#[program_setup]` | Declare a program initialization function | -| `dispatcher!("cmd.path")` **shorthand** | Omit `CMDStruct => EntryStruct`, names are auto-derived | +| Macro | Description | +| ------------------------------------------------------- | --------------------------------------------------------------- | +| `empty_result!()` | Shorthand for returning an empty result early in a chain | +| `entry!(Type, ["a", "b"])` | Construct test data for an entry type | +| `group!(Type)` | Register external types as group members without modifying them | +| `pack_err!(ErrorType)` / `pack_err!(ErrorType = Inner)` | Create error types with an automatic `name` field | +| `#[program_setup]` | Declare a program initialization function | +| `dispatcher!("cmd.path")` **shorthand** | Omit `CMDStruct => EntryStruct`, names are auto-derived | <details> <summary> Details </summary> @@ -115,7 +115,7 @@ pack!(StatePrev2 = ()); pack!(StateNext = ()); #[chain] -fn handle_state_prev2(_p: StatePrev1) { +fn handle_state_prev2(_p: StatePrev2) { // A #[chain] with no return type can simply omit the return value } |
