From 43651aa34fd7762058aea6920d2e401561d97076 Mon Sep 17 00:00:00 2001 From: Mara Bos Date: Wed, 6 Apr 2022 22:14:43 +0200 Subject: [PATCH] Initialize thread local with const{}. --- library/std/src/sys/unix/locks/futex.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/std/src/sys/unix/locks/futex.rs b/library/std/src/sys/unix/locks/futex.rs index 1df7b532546..0c7fb098c5f 100644 --- a/library/std/src/sys/unix/locks/futex.rs +++ b/library/std/src/sys/unix/locks/futex.rs @@ -253,6 +253,6 @@ impl ReentrantMutex { /// This can be used as a non-null usize-sized ID. pub fn current_thread_unique_ptr() -> usize { // Use a non-drop type to make sure it's still available during thread destruction. - thread_local! { static X: u8 = 0 } + thread_local! { static X: u8 = const { 0 } } X.with(|x| <*const _>::addr(x)) }