diff options
Diffstat (limited to 'library/std/src')
| -rw-r--r-- | library/std/src/sys_common/thread_info.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/library/std/src/sys_common/thread_info.rs b/library/std/src/sys_common/thread_info.rs index a0dbdcd979a..1d2e2dd4361 100644 --- a/library/std/src/sys_common/thread_info.rs +++ b/library/std/src/sys_common/thread_info.rs @@ -1,4 +1,5 @@ #![allow(dead_code)] // stack_guard isn't used right now on all platforms +#![allow(unused_unsafe)] // thread_local with `const {}` triggers this liny use crate::cell::RefCell; use crate::sys::thread::guard::Guard; @@ -9,7 +10,7 @@ struct ThreadInfo { thread: Thread, } -thread_local! { static THREAD_INFO: RefCell<Option<ThreadInfo>> = RefCell::new(None) } +thread_local! { static THREAD_INFO: RefCell<Option<ThreadInfo>> = const { RefCell::new(None) } } impl ThreadInfo { fn with<R, F>(f: F) -> Option<R> |
