diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-07-18 01:53:59 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-07-18 01:53:59 +0800 |
| commit | f5a4cebde2f12eb980de73ea41eb8d9e133ae49a (patch) | |
| tree | f0b5c550acf5a47cab03df8d3ff7292e7145e6b5 /mingling_macros/src/lib.rs | |
| parent | 7b4c511cbd2429ca482a24b7256de785d9430445 (diff) | |
ix(macros)!: require explicit `.into()` on chain function return values
Diffstat (limited to 'mingling_macros/src/lib.rs')
| -rw-r--r-- | mingling_macros/src/lib.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mingling_macros/src/lib.rs b/mingling_macros/src/lib.rs index d0f603a..e9fc327 100644 --- a/mingling_macros/src/lib.rs +++ b/mingling_macros/src/lib.rs @@ -867,7 +867,8 @@ pub fn dispatcher(input: TokenStream) -> TokenStream { /// /// - The function must have at least **one** parameter (the previous type in the chain). /// - The first parameter must be taken **by move**. -/// - The function must return `Next` (the type alias generated by `gen_program!`, which equals `ChainProcess<ProgramName>`). +/// - The function may return `Next`, `ChainProcess<ProgramName>`, `()`, or omit the return type. +/// - The original function signature is preserved unchanged. /// - With the `async` feature, async functions are supported; without it, async functions are rejected. #[proc_macro_attribute] pub fn chain(attr: TokenStream, item: TokenStream) -> TokenStream { |
