From 60b91db3df168532f9143f0cafb7b5166e1dc78b Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Sat, 16 May 2026 22:31:52 +0800 Subject: Accept paths for program name parameters in macros MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit All proc macros (`pack!`, `dispatcher!`, `#[chain]`, `#[program_setup]`, `#[dispatcher_clap]`, `#[derive(Groupped)]`) now parse program names as `syn::Path` instead of bare `Ident`, allowing use of paths like `crate::MyProgram` or `my_crate::MyProgram`. The default program name `ThisProgram` is no longer re-exported or required as an import — generated code references `crate::ThisProgram` directly. --- mingling_macros/src/help.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mingling_macros/src/help.rs') diff --git a/mingling_macros/src/help.rs b/mingling_macros/src/help.rs index c89aad2..6667ae0 100644 --- a/mingling_macros/src/help.rs +++ b/mingling_macros/src/help.rs @@ -158,7 +158,7 @@ pub fn register_help(input: TokenStream) -> TokenStream { // Parse the input as a comma-separated list of arguments let input_parsed = syn::parse_macro_input!(input with syn::punctuated::Punctuated::parse_terminated); - // Check that we have exactly two elements + // Check if there are exactly two elements if input_parsed.len() != 2 { return syn::Error::new( input_parsed.span(), -- cgit