From 72c8769060bdb51b843395a127133cc88c42b2ae Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Wed, 8 Nov 2023 20:24:46 +0100 Subject: [PATCH] Emit `#[allow(non_snake_case)]` for ctor ident (#295) --- ctor/src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ctor/src/lib.rs b/ctor/src/lib.rs index 7101e0c..dd88731 100644 --- a/ctor/src/lib.rs +++ b/ctor/src/lib.rs @@ -179,13 +179,14 @@ pub fn ctor(_attribute: TokenStream, function: TokenStream) -> TokenStream { #[cfg_attr(not(feature = "used_linker"), used)] #[cfg_attr(feature = "used_linker", used(linker))] - #[allow(non_upper_case_globals)] + #[allow(non_upper_case_globals, non_snake_case)] #[doc(hidden)] #tokens static #ctor_ident : unsafe extern "C" fn() -> usize = { + #[allow(non_snake_case)] #[cfg_attr(any(target_os = "linux", target_os = "android"), link_section = ".text.startup")] unsafe extern "C" fn #ctor_ident() -> usize { #ident(); 0 }; #ctor_ident