diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-07-28 19:59:21 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-07-28 19:59:21 +0800 |
| commit | e3c060b3281b6255c2cdebdcf2dda2a22a758662 (patch) | |
| tree | 2e98570320de3a591acfa7af7a6c45e0842b93e5 /mingling_macros/src/func/program_comp_gen.rs | |
| parent | a11628efe9288739f5066af20121a6cda114e5f5 (diff) | |
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
Diffstat (limited to 'mingling_macros/src/func/program_comp_gen.rs')
| -rw-r--r-- | mingling_macros/src/func/program_comp_gen.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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::<crate::ThisProgram>(&ctx); - ::mingling::Routable::<crate::ThisProgram>::to_render(crate::CompletionSuggest::new((ctx, suggest))) + ::mingling::Routable::<crate::ThisProgram>::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::<crate::ThisProgram>(&ctx); - ::mingling::Routable::<crate::ThisProgram>::to_render(crate::CompletionSuggest::new((ctx, suggest))) + ::mingling::Routable::<crate::ThisProgram>::to_render(CompletionSuggest::new((ctx, suggest))) } Err(_) => std::process::exit(1), } |
