From 6a9d8d9ff63490920d924bbae0a0f44b9b7c5dc9 Mon Sep 17 00:00:00 2001 From: Gino Valente Date: Sun, 22 Dec 2024 13:40:41 -0700 Subject: [PATCH] Make `Routable` derive macro hygienic --- packages/router-macro/src/lib.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/router-macro/src/lib.rs b/packages/router-macro/src/lib.rs index b852ba730a..adf040e0ce 100644 --- a/packages/router-macro/src/lib.rs +++ b/packages/router-macro/src/lib.rs @@ -257,13 +257,15 @@ pub fn routable(input: TokenStream) -> TokenStream { let routable_impl = route_enum.routable_impl(); (quote! { - #error_type + const _: () = { + #error_type - #display_impl + #display_impl - #routable_impl + #routable_impl - #parse_impl + #parse_impl + }; }) .into() }