diff options
| author | Mara Bos <m-ou.se@m-ou.se> | 2022-04-06 22:14:43 +0200 |
|---|---|---|
| committer | Mara Bos <m-ou.se@m-ou.se> | 2022-04-12 08:44:39 +0200 |
| commit | 43651aa34fd7762058aea6920d2e401561d97076 (patch) | |
| tree | edd0aaf1992d03fc73646347efb0430a5c5cad03 | |
| parent | 319a9b0f71d21409858297357bc047fb7a6ba27f (diff) | |
| download | rust-43651aa34fd7762058aea6920d2e401561d97076.tar.gz rust-43651aa34fd7762058aea6920d2e401561d97076.zip | |
Initialize thread local with const{}.
| -rw-r--r-- | library/std/src/sys/unix/locks/futex.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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)) } |
