Avoid use imports in thread_local_inner! in statik
Fixes #131863 for wasm targets All other macros were done in #131866, but this sub module is missed.
This commit is contained in:
parent
1d4a7670d4
commit
5368b120a1
@ -14,12 +14,11 @@
|
|||||||
(@key $t:ty, const $init:expr) => {{
|
(@key $t:ty, const $init:expr) => {{
|
||||||
const __INIT: $t = $init;
|
const __INIT: $t = $init;
|
||||||
|
|
||||||
|
// NOTE: Please update the shadowing test in `tests/thread.rs` if these types are renamed.
|
||||||
unsafe {
|
unsafe {
|
||||||
use $crate::thread::LocalKey;
|
$crate::thread::LocalKey::new(|_| {
|
||||||
use $crate::thread::local_impl::EagerStorage;
|
static VAL: $crate::thread::local_impl::EagerStorage<$t> =
|
||||||
|
$crate::thread::local_impl::EagerStorage { value: __INIT };
|
||||||
LocalKey::new(|_| {
|
|
||||||
static VAL: EagerStorage<$t> = EagerStorage { value: __INIT };
|
|
||||||
&VAL.value
|
&VAL.value
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user