Skip to content

Commit

Permalink
Auto merge of rust-lang#96138 - erikdesjardins:revertinl, r=Mark-Simu…
Browse files Browse the repository at this point in the history
…lacrum

[beta] Revert: Make TLS __getit #[inline(always)] on non-Windows

Fixes rust-lang#96132

r? `@Mark-Simulacrum`
  • Loading branch information
bors committed Apr 17, 2022
2 parents 7c13df8 + 6a8a8f5 commit 2431a97
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions library/std/src/thread/local.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ macro_rules! thread_local {
macro_rules! __thread_local_inner {
// used to generate the `LocalKey` value for const-initialized thread locals
(@key $t:ty, const $init:expr) => {{
#[cfg_attr(not(windows), inline(always))] // see comments below
#[cfg_attr(not(windows), inline)] // see comments below
unsafe fn __getit(
_init: $crate::option::Option<&mut $crate::option::Option<$t>>,
) -> $crate::option::Option<&'static $t> {
Expand Down Expand Up @@ -311,7 +311,7 @@ macro_rules! __thread_local_inner {
// gets the pessimistic path for now where it's never inlined.
//
// The issue of "should enable on Windows sometimes" is #84933
#[cfg_attr(not(windows), inline(always))]
#[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 2431a97

Please sign in to comment.