From c9db14dcb7e03abe5e2c7a86f90205d0e76935cb Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Tue, 23 Jun 2026 01:26:41 +0800 Subject: Disambiguate to_chain call via full qualification --- mingling_macros/src/chain.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'mingling_macros') 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! { + > + ::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() + > + ::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() + >::to_chain(crate::ResultEmpty::new(())) } } } else { -- cgit