We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f78cd44 commit a8bb3bcCopy full SHA for a8bb3bc
library/std/src/sys_common/thread_info.rs
@@ -1,4 +1,5 @@
1
#![allow(dead_code)] // stack_guard isn't used right now on all platforms
2
+#![allow(unused_unsafe)] // thread_local with `const {}` triggers this liny
3
4
use crate::cell::RefCell;
5
use crate::sys::thread::guard::Guard;
@@ -9,7 +10,7 @@ struct ThreadInfo {
9
10
thread: Thread,
11
}
12
-thread_local! { static THREAD_INFO: RefCell<Option<ThreadInfo>> = RefCell::new(None) }
13
+thread_local! { static THREAD_INFO: RefCell<Option<ThreadInfo>> = const { RefCell::new(None) } }
14
15
impl ThreadInfo {
16
fn with<R, F>(f: F) -> Option<R>
0 commit comments