Skip to content

Commit

Permalink
Have macros generate attributes that let clippy ignore
Browse files Browse the repository at this point in the history
non-uppercase globals.
  • Loading branch information
fasterthanlime committed Sep 14, 2024
1 parent ad4a0e8 commit bea7478
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions rubicon/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ macro_rules! thread_local_inner {
}

#[no_mangle]
#[allow(clippy::non_upper_case_globals)]
static [<$name __rubicon_export>]: &::std::thread::LocalKey<$ty> = &$name;
}
};
Expand All @@ -175,6 +176,7 @@ macro_rules! thread_local_inner {
extern "Rust" {
#[link_name = stringify!([<$name __rubicon_export>])]
#[allow(improper_ctypes)]
#[allow(clippy::non_upper_case_globals)]
static [<$name __rubicon_import>]: &'static ::std::thread::LocalKey<$ty>;
}

Expand Down Expand Up @@ -285,6 +287,7 @@ macro_rules! process_local_inner {
extern "Rust" {
#[link_name = stringify!([<$name __rubicon_export>])]
#[allow(improper_ctypes)]
#[allow(clippy::non_upper_case_globals)]
static [<$name __rubicon_import>]: $ty;
}

Expand Down

0 comments on commit bea7478

Please sign in to comment.