diff --git a/leptos_macro/src/component.rs b/leptos_macro/src/component.rs index 37d6d42a74..00e3784f3d 100644 --- a/leptos_macro/src/component.rs +++ b/leptos_macro/src/component.rs @@ -1211,7 +1211,10 @@ fn prop_to_doc( } pub fn unmodified_fn_name_from_fn_name(ident: &Ident) -> Ident { - Ident::new(&format!("__{ident}"), ident.span()) + Ident::new( + &format!("__{}", ident.to_string().to_case(Snake)), + ident.span(), + ) } /// Converts all `impl Trait`s in a function signature to use generic params instead. diff --git a/leptos_macro/src/lib.rs b/leptos_macro/src/lib.rs index 5e592c40b7..3fce009ddd 100644 --- a/leptos_macro/src/lib.rs +++ b/leptos_macro/src/lib.rs @@ -670,14 +670,14 @@ fn component_macro( #expanded #[doc(hidden)] - #[allow(non_snake_case, dead_code, clippy::too_many_arguments, clippy::needless_lifetimes)] + #[allow(clippy::too_many_arguments, clippy::needless_lifetimes)] #unexpanded } } else if let Ok(mut dummy) = dummy { dummy.sig.ident = unmodified_fn_name_from_fn_name(&dummy.sig.ident); quote! { #[doc(hidden)] - #[allow(non_snake_case, dead_code, clippy::too_many_arguments, clippy::needless_lifetimes)] + #[allow(clippy::too_many_arguments, clippy::needless_lifetimes)] #dummy } } else {