@@ -87,32 +87,9 @@ macro_rules! scoped_thread_local {
8787 issue = "0" ) ]
8888#[ macro_export]
8989#[ allow_internal_unstable]
90- #[ cfg( no_elf_tls) ]
9190macro_rules! __scoped_thread_local_inner {
9291 ( $t: ty) => { {
93- static _KEY: $crate:: thread:: __ScopedKeyInner<$t> =
94- $crate:: thread:: __ScopedKeyInner:: new( ) ;
95- fn _getit( ) -> & ' static $crate:: thread:: __ScopedKeyInner<$t> { & _KEY }
96- $crate:: thread:: ScopedKey :: new( _getit)
97- } }
98- }
99-
100- #[ doc( hidden) ]
101- #[ unstable( feature = "thread_local_internals" ,
102- reason = "should not be necessary" ,
103- issue = "0" ) ]
104- #[ macro_export]
105- #[ allow_internal_unstable]
106- #[ cfg( not( no_elf_tls) ) ]
107- macro_rules! __scoped_thread_local_inner {
108- ( $t: ty) => { {
109- #[ cfg_attr( not( any( windows,
110- target_os = "android" ,
111- target_os = "ios" ,
112- target_os = "netbsd" ,
113- target_os = "openbsd" ,
114- target_arch = "aarch64" ) ) ,
115- thread_local) ]
92+ #[ cfg_attr( target_thread_local, thread_local) ]
11693 static _KEY: $crate:: thread:: __ScopedKeyInner<$t> =
11794 $crate:: thread:: __ScopedKeyInner:: new( ) ;
11895 fn _getit( ) -> & ' static $crate:: thread:: __ScopedKeyInner<$t> { & _KEY }
@@ -221,13 +198,7 @@ impl<T> ScopedKey<T> {
221198 }
222199}
223200
224- #[ cfg( not( any( windows,
225- target_os = "android" ,
226- target_os = "ios" ,
227- target_os = "netbsd" ,
228- target_os = "openbsd" ,
229- target_arch = "aarch64" ,
230- no_elf_tls) ) ) ]
201+ #[ cfg( target_thread_local) ]
231202#[ doc( hidden) ]
232203mod imp {
233204 use cell:: Cell ;
@@ -246,13 +217,7 @@ mod imp {
246217 }
247218}
248219
249- #[ cfg( any( windows,
250- target_os = "android" ,
251- target_os = "ios" ,
252- target_os = "netbsd" ,
253- target_os = "openbsd" ,
254- target_arch = "aarch64" ,
255- no_elf_tls) ) ]
220+ #[ cfg( not( target_thread_local) ) ]
256221#[ doc( hidden) ]
257222mod imp {
258223 use cell:: Cell ;
0 commit comments