Skip to content

Commit 9e347b3

Browse files
committed
rollup merge of #23579: Ms2ger/thread_local-unsafe
Conflicts: src/libstd/thread/local.rs
2 parents 88ae218 + 29aca83 commit 9e347b3

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/libstd/thread/local.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -178,15 +178,13 @@ macro_rules! __thread_local_inner {
178178

179179
#[cfg(any(not(any(target_os = "macos", target_os = "linux")), target_arch = "aarch64"))]
180180
const _INIT: ::std::thread::__local::__impl::KeyInner<$t> = {
181-
unsafe extern fn __destroy(ptr: *mut u8) {
182-
::std::thread::__local::__impl::destroy_value::<$t>(ptr);
183-
}
184-
185181
::std::thread::__local::__impl::KeyInner {
186182
inner: ::std::cell::UnsafeCell { value: $init },
187183
os: ::std::thread::__local::__impl::OsStaticKey {
188184
inner: ::std::thread::__local::__impl::OS_INIT_INNER,
189-
dtor: ::std::option::Option::Some(__destroy as unsafe extern fn(*mut u8)),
185+
dtor: ::std::option::Option::Some(
186+
::std::thread::__local::__impl::destroy_value::<$t>
187+
),
190188
},
191189
}
192190
};

0 commit comments

Comments
 (0)