aboutsummaryrefslogtreecommitdiff
path: root/mingling_macros/src/help.rs
diff options
context:
space:
mode:
Diffstat (limited to 'mingling_macros/src/help.rs')
-rw-r--r--mingling_macros/src/help.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/mingling_macros/src/help.rs b/mingling_macros/src/help.rs
index 315483d..c89aad2 100644
--- a/mingling_macros/src/help.rs
+++ b/mingling_macros/src/help.rs
@@ -69,6 +69,11 @@ pub fn help_attr(item: TokenStream) -> TokenStream {
Err(e) => return e.to_compile_error().into(),
};
+ // Check that the entry type is a single-segment type (no `::`)
+ if let Some(err_tokens) = crate::check_single_segment_type(&entry_type, "#[help]") {
+ return err_tokens.into();
+ }
+
// Validate return type
if let Err(e) = validate_return_type(&input_fn.sig) {
return e.to_compile_error().into();