From e3c060b3281b6255c2cdebdcf2dda2a22a758662 Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Tue, 28 Jul 2026 19:59:21 +0800 Subject: feat(macros): wrap gen_program output in a hidden module Move pathf type resolution from `program_final_gen` to `gen_program` and isolate generated code inside `__this_program_impl` to prevent namespace pollution --- mingling_macros/src/func/program_comp_gen.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mingling_macros/src/func/program_comp_gen.rs') diff --git a/mingling_macros/src/func/program_comp_gen.rs b/mingling_macros/src/func/program_comp_gen.rs index b6b2546..2fbb0e0 100644 --- a/mingling_macros/src/func/program_comp_gen.rs +++ b/mingling_macros/src/func/program_comp_gen.rs @@ -14,7 +14,7 @@ pub(crate) fn program_comp_gen_impl(_input: TokenStream) -> TokenStream { match read_ctx { Ok(ctx) => { let suggest = ::mingling::CompletionHelper::exec_completion::(&ctx); - ::mingling::Routable::::to_render(crate::CompletionSuggest::new((ctx, suggest))) + ::mingling::Routable::::to_render(CompletionSuggest::new((ctx, suggest))) } Err(_) => std::process::exit(1), } @@ -32,7 +32,7 @@ pub(crate) fn program_comp_gen_impl(_input: TokenStream) -> TokenStream { match read_ctx { Ok(ctx) => { let suggest = ::mingling::CompletionHelper::exec_completion::(&ctx); - ::mingling::Routable::::to_render(crate::CompletionSuggest::new((ctx, suggest))) + ::mingling::Routable::::to_render(CompletionSuggest::new((ctx, suggest))) } Err(_) => std::process::exit(1), } -- cgit