File tree Expand file tree Collapse file tree 4 files changed +4
-5
lines changed Expand file tree Collapse file tree 4 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -9,8 +9,6 @@ pub mod cmath;
99pub mod os_str;
1010pub mod path;
1111pub mod sync;
12- #[ allow( dead_code) ]
13- #[ allow( unused_imports) ]
1412pub mod thread_local;
1513
1614// FIXME(117276): remove this, move feature implementations into individual
Original file line number Diff line number Diff line change 11use crate :: cell:: UnsafeCell ;
22use crate :: hint:: unreachable_unchecked;
3- use crate :: mem:: forget;
43use crate :: ptr;
54use crate :: sys:: thread_local:: abort_on_dtor_unwind;
65use crate :: sys:: thread_local_dtor:: register_dtor;
Original file line number Diff line number Diff line change 11#![ unstable( feature = "thread_local_internals" , reason = "should not be necessary" , issue = "none" ) ]
2+ #![ cfg_attr( test, allow( unused) ) ]
23
34// There are three thread-local implementations: "static", "fast", "OS".
45// The "OS" thread local key type is accessed via platform-specific API calls and is slow, while the
@@ -28,7 +29,8 @@ cfg_if::cfg_if! {
2829/// fn` declared in a user crate). If the callback unwinds anyway, then
2930/// `rtabort` with a message about thread local panicking on drop.
3031#[ inline]
31- pub fn abort_on_dtor_unwind ( f : impl FnOnce ( ) ) {
32+ #[ allow( dead_code) ]
33+ fn abort_on_dtor_unwind ( f : impl FnOnce ( ) ) {
3234 // Using a guard like this is lower cost.
3335 let guard = DtorUnwindGuard ;
3436 f ( ) ;
Original file line number Diff line number Diff line change 11use super :: abort_on_dtor_unwind;
22use crate :: cell:: Cell ;
33use crate :: marker:: PhantomData ;
4+ use crate :: ptr;
45use crate :: sys_common:: thread_local_key:: StaticKey as OsKey ;
5- use crate :: { panic, ptr} ;
66
77#[ doc( hidden) ]
88#[ allow_internal_unstable( thread_local_internals) ]
You can’t perform that action at this time.
0 commit comments