Skip to content

Commit 7cf4280

Browse files
fix: Make globals uppercase I guess
We already allowed the clippy lint, but now rust-analyzer has a lint of its own, so, I give up.
1 parent 950213d commit 7cf4280

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

rubicon/src/lib.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ macro_rules! thread_local_inner {
248248

249249
#[no_mangle]
250250
#[allow(clippy::non_upper_case_globals)]
251-
static [<$name __rubicon_export>]: &::std::thread::LocalKey<$ty> = &$name;
251+
static [<$name __RUBICON_EXPORT>]: &::std::thread::LocalKey<$ty> = &$name;
252252
}
253253
};
254254
}
@@ -260,16 +260,16 @@ macro_rules! thread_local_inner {
260260
($(#[$attrs:meta])* $vis:vis $name:ident, $ty:ty, $expr:expr) => {
261261
$crate::paste! {
262262
extern "Rust" {
263-
#[link_name = stringify!([<$name __rubicon_export>])]
263+
#[link_name = stringify!([<$name __RUBICON_EXPORT>])]
264264
#[allow(improper_ctypes)]
265265
#[allow(clippy::non_upper_case_globals)]
266-
static [<$name __rubicon_import>]: &'static ::std::thread::LocalKey<$ty>;
266+
static [<$name __RUBICON_IMPORT>]: &'static ::std::thread::LocalKey<$ty>;
267267
}
268268

269269
// even though this ends up being not a LocalKey, but a type that Derefs to LocalKey,
270270
// in practice, most codebases work just fine with this, since they call methods
271271
// that takes `self: &LocalKey`: they don't see the difference.
272-
$vis static $name: $crate::TrustedExternDouble<::std::thread::LocalKey<$ty>> = $crate::TrustedExternDouble(unsafe { &[<$name __rubicon_import>] }, crate::compatibility_check_once);
272+
$vis static $name: $crate::TrustedExternDouble<::std::thread::LocalKey<$ty>> = $crate::TrustedExternDouble(unsafe { &[<$name __RUBICON_IMPORT>] }, crate::compatibility_check_once);
273273
}
274274
};
275275
}
@@ -380,7 +380,7 @@ macro_rules! process_local {
380380
macro_rules! process_local_inner {
381381
($(#[$attrs:meta])* $vis:vis $name:ident, $ty:ty, $expr:expr) => {
382382
$crate::paste! {
383-
#[export_name = stringify!([<$name __rubicon_export>])]
383+
#[export_name = stringify!([<$name __RUBICON_EXPORT>])]
384384
$(#[$attrs])*
385385
$vis static $name: $ty = $expr;
386386
}
@@ -392,7 +392,7 @@ macro_rules! process_local_inner {
392392
macro_rules! process_local_inner_mut {
393393
($(#[$attrs:meta])* $vis:vis $name:ident, $ty:ty, $expr:expr) => {
394394
$crate::paste! {
395-
#[export_name = stringify!([<$name __rubicon_export>])]
395+
#[export_name = stringify!([<$name __RUBICON_EXPORT>])]
396396
$(#[$attrs])*
397397
$vis static mut $name: $ty = $expr;
398398
}
@@ -406,13 +406,13 @@ macro_rules! process_local_inner {
406406
($(#[$attrs:meta])* $vis:vis $name:ident, $ty:ty, $expr:expr) => {
407407
$crate::paste! {
408408
extern "Rust" {
409-
#[link_name = stringify!([<$name __rubicon_export>])]
409+
#[link_name = stringify!([<$name __RUBICON_EXPORT>])]
410410
#[allow(improper_ctypes)]
411411
#[allow(clippy::non_upper_case_globals)]
412-
static [<$name __rubicon_import>]: $ty;
412+
static [<$name __RUBICON_IMPORT>]: $ty;
413413
}
414414

415-
$vis static $name: $crate::TrustedExtern<$ty> = $crate::TrustedExtern(unsafe { &[<$name __rubicon_import>] }, crate::compatibility_check_once);
415+
$vis static $name: $crate::TrustedExtern<$ty> = $crate::TrustedExtern(unsafe { &[<$name __RUBICON_IMPORT>] }, crate::compatibility_check_once);
416416
}
417417
};
418418
}
@@ -425,7 +425,7 @@ macro_rules! process_local_inner_mut {
425425
// externs require "unsafe" to access, but so do "static mut", so,
426426
// no need to wrap in `TrustedExtern`
427427
extern "Rust" {
428-
#[link_name = stringify!([<$name __rubicon_export>])]
428+
#[link_name = stringify!([<$name __RUBICON_EXPORT>])]
429429
#[allow(improper_ctypes)]
430430
$vis static mut $name: $ty;
431431
}

0 commit comments

Comments
 (0)