diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-03-23 15:10:13 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-03-23 15:10:13 -0700 |
| commit | 9e347b39f105a2ab416fc518ee51225882a6d996 (patch) | |
| tree | 4efd826022d11a7ad72cecbdc5bf0fa1b31e8840 /src/libstd/thread | |
| parent | 88ae218578e41f5e8fbecb03dea32dfcafc7ec76 (diff) | |
| parent | 29aca83eb46cdc39dc695852ab30bb0ad06bea8f (diff) | |
| download | rust-9e347b39f105a2ab416fc518ee51225882a6d996.tar.gz rust-9e347b39f105a2ab416fc518ee51225882a6d996.zip | |
rollup merge of #23579: Ms2ger/thread_local-unsafe
Conflicts: src/libstd/thread/local.rs
Diffstat (limited to 'src/libstd/thread')
| -rw-r--r-- | src/libstd/thread/local.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/libstd/thread/local.rs b/src/libstd/thread/local.rs index 43142d2e5bc..023c6b26cbc 100644 --- a/src/libstd/thread/local.rs +++ b/src/libstd/thread/local.rs @@ -178,15 +178,13 @@ macro_rules! __thread_local_inner { #[cfg(any(not(any(target_os = "macos", target_os = "linux")), target_arch = "aarch64"))] const _INIT: ::std::thread::__local::__impl::KeyInner<$t> = { - unsafe extern fn __destroy(ptr: *mut u8) { - ::std::thread::__local::__impl::destroy_value::<$t>(ptr); - } - ::std::thread::__local::__impl::KeyInner { inner: ::std::cell::UnsafeCell { value: $init }, os: ::std::thread::__local::__impl::OsStaticKey { inner: ::std::thread::__local::__impl::OS_INIT_INNER, - dtor: ::std::option::Option::Some(__destroy as unsafe extern fn(*mut u8)), + dtor: ::std::option::Option::Some( + ::std::thread::__local::__impl::destroy_value::<$t> + ), }, } }; |
