@@ -177,19 +177,19 @@ use crate::sys_common::thread_parking::Parker;
177177use  crate :: sys_common:: { AsInner ,  IntoInner } ; 
178178use  crate :: time:: Duration ; 
179179
180+ #[ stable( feature = "scoped_threads" ,  since = "1.63.0" ) ]  
181+ mod  scoped; 
182+ 
183+ #[ stable( feature = "scoped_threads" ,  since = "1.63.0" ) ]  
184+ pub  use  scoped:: { scope,  Scope ,  ScopedJoinHandle } ; 
185+ 
180186//////////////////////////////////////////////////////////////////////////////// 
181187// Thread-local storage 
182188//////////////////////////////////////////////////////////////////////////////// 
183189
184190#[ macro_use]  
185191mod  local; 
186192
187- #[ stable( feature = "scoped_threads" ,  since = "1.63.0" ) ]  
188- mod  scoped; 
189- 
190- #[ stable( feature = "scoped_threads" ,  since = "1.63.0" ) ]  
191- pub  use  scoped:: { scope,  Scope ,  ScopedJoinHandle } ; 
192- 
193193#[ stable( feature = "rust1" ,  since = "1.0.0" ) ]  
194194pub  use  self :: local:: { AccessError ,  LocalKey } ; 
195195
@@ -209,7 +209,6 @@ pub use self::local::{AccessError, LocalKey};
209209) ) ] 
210210#[ doc( hidden) ]  
211211pub  use  self :: local:: fast:: Key  as  __FastLocalKeyInner; 
212- 
213212// when building for tests, use real std's type 
214213#[ unstable( feature = "libstd_thread_internals" ,  issue = "none" ) ]  
215214#[ cfg( test) ]  
@@ -220,12 +219,21 @@ pub use self::local::fast::Key as __FastLocalKeyInner;
220219pub  use  realstd:: thread:: __FastLocalKeyInner; 
221220
222221#[ unstable( feature = "libstd_thread_internals" ,  issue = "none" ) ]  
222+ #[ cfg( not( test) ) ]  
223223#[ cfg( all(  
224224    not( target_thread_local) ,  
225225    not( all( target_family = "wasm" ,  not( target_feature = "atomics" ) ) ) ,  
226226) ) ] 
227227#[ doc( hidden) ]  
228228pub  use  self :: local:: os:: Key  as  __OsLocalKeyInner; 
229+ // when building for tests, use real std's type 
230+ #[ unstable( feature = "libstd_thread_internals" ,  issue = "none" ) ]  
231+ #[ cfg( test) ]  
232+ #[ cfg( all(  
233+     not( target_thread_local) ,  
234+     not( all( target_family = "wasm" ,  not( target_feature = "atomics" ) ) ) ,  
235+ ) ) ] 
236+ pub  use  realstd:: thread:: __OsLocalKeyInner; 
229237
230238#[ unstable( feature = "libstd_thread_internals" ,  issue = "none" ) ]  
231239#[ cfg( all( target_family = "wasm" ,  not( target_feature = "atomics" ) ) ) ]  
0 commit comments