@@ -107,14 +107,14 @@ pub struct LocalKey<T> {
107
107
#[ cfg( not( no_elf_tls) ) ]
108
108
macro_rules! thread_local {
109
109
( static $name: ident: $t: ty = $init: expr) => (
110
- static $name: :: std :: thread:: LocalKey <$t> =
110
+ static $name: $crate :: thread:: LocalKey <$t> =
111
111
__thread_local_inner!( $t, $init,
112
112
#[ cfg_attr( all( any( target_os = "macos" , target_os = "linux" ) ,
113
113
not( target_arch = "aarch64" ) ) ,
114
114
thread_local) ] ) ;
115
115
) ;
116
116
( pub static $name: ident: $t: ty = $init: expr) => (
117
- pub static $name: :: std :: thread:: LocalKey <$t> =
117
+ pub static $name: $crate :: thread:: LocalKey <$t> =
118
118
__thread_local_inner!( $t, $init,
119
119
#[ cfg_attr( all( any( target_os = "macos" , target_os = "linux" ) ,
120
120
not( target_arch = "aarch64" ) ) ,
@@ -128,11 +128,11 @@ macro_rules! thread_local {
128
128
#[ cfg( no_elf_tls) ]
129
129
macro_rules! thread_local {
130
130
( static $name: ident: $t: ty = $init: expr) => (
131
- static $name: :: std :: thread:: LocalKey <$t> =
131
+ static $name: $crate :: thread:: LocalKey <$t> =
132
132
__thread_local_inner!( $t, $init, #[ ] ) ;
133
133
) ;
134
134
( pub static $name: ident: $t: ty = $init: expr) => (
135
- pub static $name: :: std :: thread:: LocalKey <$t> =
135
+ pub static $name: $crate :: thread:: LocalKey <$t> =
136
136
__thread_local_inner!( $t, $init, #[ ] ) ;
137
137
) ;
138
138
}
@@ -145,11 +145,11 @@ macro_rules! thread_local {
145
145
macro_rules! __thread_local_inner {
146
146
( $t: ty, $init: expr, #[ $( $attr: meta) ,* ] ) => { {
147
147
$( #[ $attr] ) *
148
- static __KEY: :: std :: thread:: __LocalKeyInner<$t> =
149
- :: std :: thread:: __LocalKeyInner:: new( ) ;
148
+ static __KEY: $crate :: thread:: __LocalKeyInner<$t> =
149
+ $crate :: thread:: __LocalKeyInner:: new( ) ;
150
150
fn __init( ) -> $t { $init }
151
- fn __getit( ) -> & ' static :: std :: thread:: __LocalKeyInner<$t> { & __KEY }
152
- :: std :: thread:: LocalKey :: new( __getit, __init)
151
+ fn __getit( ) -> & ' static $crate :: thread:: __LocalKeyInner<$t> { & __KEY }
152
+ $crate :: thread:: LocalKey :: new( __getit, __init)
153
153
} }
154
154
}
155
155
0 commit comments