Skip to content

Commit

Permalink
Workaround #109797 on windows-gnu
Browse files Browse the repository at this point in the history
  • Loading branch information
Zoxc committed Mar 31, 2023
1 parent 276029d commit 6c94136
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion library/std/src/sys/common/thread_local/os_local.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ macro_rules! __thread_local_inner {
#[inline]
fn __init() -> $t { $init }

#[cfg_attr(not(bootstrap), inline)]
// `#[inline] does not work on windows-gnu due to linking errors around dllimports.
// See https://github.com/rust-lang/rust/issues/109797.
#[cfg_attr(not(windows), inline)]
unsafe fn __getit(
init: $crate::option::Option<&mut $crate::option::Option<$t>>,
) -> $crate::option::Option<&'static $t> {
Expand Down

0 comments on commit 6c94136

Please sign in to comment.