diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-06-23 01:26:41 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-06-23 01:26:41 +0800 |
| commit | c9db14dcb7e03abe5e2c7a86f90205d0e76935cb (patch) | |
| tree | c768e24e402d989046e1608481825ef7b0877bf1 /mingling_macros | |
| parent | 8498a8c4826a10c8c04ad1b9c45d83fb0759121b (diff) | |
Disambiguate to_chain call via full qualification
Diffstat (limited to 'mingling_macros')
| -rw-r--r-- | mingling_macros/src/chain.rs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/mingling_macros/src/chain.rs b/mingling_macros/src/chain.rs index 92020ea..2abf3c1 100644 --- a/mingling_macros/src/chain.rs +++ b/mingling_macros/src/chain.rs @@ -81,7 +81,10 @@ fn generate_proc_fn( let body_stmts: &[syn::Stmt] = if is_unit_return && has_resources { let mut stmts = fn_body_stmts.to_vec(); stmts.push(syn::Stmt::Expr( - syn::parse_quote! { crate::ResultEmpty::new(()).to_chain() }, + syn::parse_quote! { + <crate::ResultEmpty as ::mingling::Groupped::<crate::ThisProgram>> + ::to_chain(crate::ResultEmpty::new(())) + }, None, )); // Box::leak to get a &'static [syn::Stmt] @@ -107,7 +110,8 @@ fn generate_proc_fn( }; quote! { #call - crate::ResultEmpty::new(()).to_chain() + <crate::ResultEmpty as ::mingling::Groupped::<crate::ThisProgram>> + ::to_chain(crate::ResultEmpty::new(())) } } } else if has_resources { @@ -165,7 +169,7 @@ fn generate_original_fn( quote! { { #fn_body - crate::ResultEmpty::new(()).to_chain() + <crate::ResultEmpty as ::mingling::Groupped::<crate::ThisProgram>>::to_chain(crate::ResultEmpty::new(())) } } } else { |
