Skip to content

Commit c429fa1

Browse files
committed
Privacy workaround for helper macro
1 parent f368801 commit c429fa1

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/lazy.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ impl<T: Sync> Lazy<T> {
2121
unsafe impl<T: Sync> Sync for Lazy<T> {}
2222

2323
#[macro_export]
24-
macro_rules! lazy_static_create {
24+
macro_rules! __lazy_static_create {
2525
($NAME:ident, $T:ty) => {
2626
use std::sync::ONCE_INIT;
2727
static mut $NAME: $crate::lazy::Lazy<$T> = $crate::lazy::Lazy(0 as *const $T, ONCE_INIT);

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ macro_rules! lazy_static {
9696

9797
#[inline(always)]
9898
unsafe fn __stability() -> &'static $T {
99-
lazy_static_create!(LAZY, $T);
99+
__lazy_static_create!(LAZY, $T);
100100
LAZY.get(__static_ref_initialize)
101101
}
102102
__stability()

src/nightly_lazy.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ impl<T: Sync> Lazy<T> {
3131
unsafe impl<T: Sync> Sync for Lazy<T> {}
3232

3333
#[macro_export]
34-
macro_rules! lazy_static_create {
34+
macro_rules! __lazy_static_create {
3535
($NAME:ident, $T:ty) => {
3636
static $NAME: $crate::lazy::Lazy<$T> = $crate::lazy::Lazy::new();
3737
}

0 commit comments

Comments
 (0)