Skip to content

Commit

Permalink
Emit #[allow(non_snake_case)] for ctor ident (#295)
Browse files Browse the repository at this point in the history
  • Loading branch information
maxdeviant authored Nov 8, 2023
1 parent 2d5aa36 commit 72c8769
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ctor/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 72c8769

Please sign in to comment.