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