We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8baae66 commit d25ee97Copy full SHA for d25ee97
std/src/sys/thread_local/statik.rs
@@ -14,12 +14,11 @@ pub macro thread_local_inner {
14
(@key $t:ty, const $init:expr) => {{
15
const __INIT: $t = $init;
16
17
+ // NOTE: Please update the shadowing test in `tests/thread.rs` if these types are renamed.
18
unsafe {
- use $crate::thread::LocalKey;
19
- use $crate::thread::local_impl::EagerStorage;
20
-
21
- LocalKey::new(|_| {
22
- static VAL: EagerStorage<$t> = EagerStorage { value: __INIT };
+ $crate::thread::LocalKey::new(|_| {
+ static VAL: $crate::thread::local_impl::EagerStorage<$t> =
+ $crate::thread::local_impl::EagerStorage { value: __INIT };
23
&VAL.value
24
})
25
}
0 commit comments