parent
ce36a966c7
commit
40ecda6a33
1 changed files with 1 additions and 3 deletions
|
@ -28,9 +28,7 @@ pub macro thread_local_inner {
|
||||||
// user provided type or type alias with a matching name. Please update the shadowing test
|
// user provided type or type alias with a matching name. Please update the shadowing test
|
||||||
// in `tests/thread.rs` if these types are renamed.
|
// in `tests/thread.rs` if these types are renamed.
|
||||||
unsafe {
|
unsafe {
|
||||||
// Inlining does not work on windows-gnu due to linking errors around
|
$crate::thread::LocalKey::new(|init| {
|
||||||
// dllimports. See https://github.com/rust-lang/rust/issues/109797.
|
|
||||||
$crate::thread::LocalKey::new(#[cfg_attr(windows, inline(never))] |init| {
|
|
||||||
static VAL: $crate::thread::local_impl::Storage<$t>
|
static VAL: $crate::thread::local_impl::Storage<$t>
|
||||||
= $crate::thread::local_impl::Storage::new();
|
= $crate::thread::local_impl::Storage::new();
|
||||||
VAL.get(init, __init)
|
VAL.get(init, __init)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue