File tree 4 files changed +4
-5
lines changed
4 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -9,8 +9,6 @@ pub mod cmath;
9
9
pub mod os_str;
10
10
pub mod path;
11
11
pub mod sync;
12
- #[ allow( dead_code) ]
13
- #[ allow( unused_imports) ]
14
12
pub mod thread_local;
15
13
16
14
// FIXME(117276): remove this, move feature implementations into individual
Original file line number Diff line number Diff line change 1
1
use crate :: cell:: UnsafeCell ;
2
2
use crate :: hint:: unreachable_unchecked;
3
- use crate :: mem:: forget;
4
3
use crate :: ptr;
5
4
use crate :: sys:: thread_local:: abort_on_dtor_unwind;
6
5
use crate :: sys:: thread_local_dtor:: register_dtor;
Original file line number Diff line number Diff line change 1
1
#![ unstable( feature = "thread_local_internals" , reason = "should not be necessary" , issue = "none" ) ]
2
+ #![ cfg_attr( test, allow( unused) ) ]
2
3
3
4
// There are three thread-local implementations: "static", "fast", "OS".
4
5
// 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! {
28
29
/// fn` declared in a user crate). If the callback unwinds anyway, then
29
30
/// `rtabort` with a message about thread local panicking on drop.
30
31
#[ inline]
31
- pub fn abort_on_dtor_unwind ( f : impl FnOnce ( ) ) {
32
+ #[ allow( dead_code) ]
33
+ fn abort_on_dtor_unwind ( f : impl FnOnce ( ) ) {
32
34
// Using a guard like this is lower cost.
33
35
let guard = DtorUnwindGuard ;
34
36
f ( ) ;
Original file line number Diff line number Diff line change 1
1
use super :: abort_on_dtor_unwind;
2
2
use crate :: cell:: Cell ;
3
3
use crate :: marker:: PhantomData ;
4
+ use crate :: ptr;
4
5
use crate :: sys_common:: thread_local_key:: StaticKey as OsKey ;
5
- use crate :: { panic, ptr} ;
6
6
7
7
#[ doc( hidden) ]
8
8
#[ allow_internal_unstable( thread_local_internals) ]
You can’t perform that action at this time.
0 commit comments