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
2525On first deref, `EXPR` gets evaluated and stored internally, such that all further derefs
2626can 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 `
2929trait.
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 }
You can’t perform that action at this time.
0 commit comments