File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ unique type that implements `Deref<TYPE>` and stores it in a static with name `N
25
25
On first deref, `EXPR` gets evaluated and stored internally, such that all further derefs
26
26
can return a reference to the same object.
27
27
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 `
29
29
trait.
30
30
31
31
# Example
@@ -89,7 +89,7 @@ macro_rules! lazy_static {
89
89
use std:: mem:: transmute;
90
90
91
91
#[ inline( always) ]
92
- fn require_share <T : Share >( _: & T ) { }
92
+ fn require_sync <T : Sync >( _: & T ) { }
93
93
94
94
unsafe {
95
95
static mut s: * const $T = 0 as * const $T;
@@ -98,7 +98,7 @@ macro_rules! lazy_static {
98
98
s = transmute:: <Box <$T>, * const $T>( box( ) ( $e) ) ;
99
99
} ) ;
100
100
let static_ref = & * s;
101
- require_share ( static_ref) ;
101
+ require_sync ( static_ref) ;
102
102
static_ref
103
103
}
104
104
}
You can’t perform that action at this time.
0 commit comments