Skip to content

Commit dc82718

Browse files
committed
Initialize thread local with const{}.
1 parent 6888fb1 commit dc82718

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/std/src/sys/unix/locks/futex.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,6 @@ impl ReentrantMutex {
253253
/// This can be used as a non-null usize-sized ID.
254254
pub fn current_thread_unique_ptr() -> usize {
255255
// Use a non-drop type to make sure it's still available during thread destruction.
256-
thread_local! { static X: u8 = 0 }
256+
thread_local! { static X: u8 = const { 0 } }
257257
X.with(|x| <*const _>::addr(x))
258258
}

0 commit comments

Comments
 (0)