Skip to content

Commit bd9aadd

Browse files
committed
Merge pull request #1 from HeroesGrave/master
Share -> Sync
2 parents 6d724cc + 34e41c7 commit bd9aadd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/lazy_static.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ unique type that implements `Deref<TYPE>` and stores it in a static with name `N
2525
On first deref, `EXPR` gets evaluated and stored internally, such that all further derefs
2626
can return a reference to the same object.
2727
28-
Like regular `static mut`s, this macro only works for types that fulfill the `Share`
28+
Like regular `static mut`s, this macro only works for types that fulfill the `Sync`
2929
trait.
3030
3131
# Example
@@ -89,7 +89,7 @@ macro_rules! lazy_static {
8989
use std::mem::transmute;
9090

9191
#[inline(always)]
92-
fn require_share<T: Share>(_: &T) { }
92+
fn require_sync<T: Sync>(_: &T) { }
9393

9494
unsafe {
9595
static mut s: *const $T = 0 as *const $T;
@@ -98,7 +98,7 @@ macro_rules! lazy_static {
9898
s = transmute::<Box<$T>, *const $T>(box() ($e));
9999
});
100100
let static_ref = &*s;
101-
require_share(static_ref);
101+
require_sync(static_ref);
102102
static_ref
103103
}
104104
}

0 commit comments

Comments
 (0)