std tests: use __OsLocalKeyInner from realstd
This commit is contained in:
@@ -177,6 +177,12 @@ use crate::sys_common::thread_parking::Parker;
|
|||||||
use crate::sys_common::{AsInner, IntoInner};
|
use crate::sys_common::{AsInner, IntoInner};
|
||||||
use crate::time::Duration;
|
use crate::time::Duration;
|
||||||
|
|
||||||
|
#[stable(feature = "scoped_threads", since = "1.63.0")]
|
||||||
|
mod scoped;
|
||||||
|
|
||||||
|
#[stable(feature = "scoped_threads", since = "1.63.0")]
|
||||||
|
pub use scoped::{scope, Scope, ScopedJoinHandle};
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// Thread-local storage
|
// Thread-local storage
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
@@ -184,12 +190,6 @@ use crate::time::Duration;
|
|||||||
#[macro_use]
|
#[macro_use]
|
||||||
mod local;
|
mod local;
|
||||||
|
|
||||||
#[stable(feature = "scoped_threads", since = "1.63.0")]
|
|
||||||
mod scoped;
|
|
||||||
|
|
||||||
#[stable(feature = "scoped_threads", since = "1.63.0")]
|
|
||||||
pub use scoped::{scope, Scope, ScopedJoinHandle};
|
|
||||||
|
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
pub use self::local::{AccessError, LocalKey};
|
pub use self::local::{AccessError, LocalKey};
|
||||||
|
|
||||||
@@ -209,7 +209,6 @@ pub use self::local::{AccessError, LocalKey};
|
|||||||
))]
|
))]
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
pub use self::local::fast::Key as __FastLocalKeyInner;
|
pub use self::local::fast::Key as __FastLocalKeyInner;
|
||||||
|
|
||||||
// when building for tests, use real std's type
|
// when building for tests, use real std's type
|
||||||
#[unstable(feature = "libstd_thread_internals", issue = "none")]
|
#[unstable(feature = "libstd_thread_internals", issue = "none")]
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
@@ -220,12 +219,21 @@ pub use self::local::fast::Key as __FastLocalKeyInner;
|
|||||||
pub use realstd::thread::__FastLocalKeyInner;
|
pub use realstd::thread::__FastLocalKeyInner;
|
||||||
|
|
||||||
#[unstable(feature = "libstd_thread_internals", issue = "none")]
|
#[unstable(feature = "libstd_thread_internals", issue = "none")]
|
||||||
|
#[cfg(not(test))]
|
||||||
#[cfg(all(
|
#[cfg(all(
|
||||||
not(target_thread_local),
|
not(target_thread_local),
|
||||||
not(all(target_family = "wasm", not(target_feature = "atomics"))),
|
not(all(target_family = "wasm", not(target_feature = "atomics"))),
|
||||||
))]
|
))]
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
pub use self::local::os::Key as __OsLocalKeyInner;
|
pub use self::local::os::Key as __OsLocalKeyInner;
|
||||||
|
// when building for tests, use real std's type
|
||||||
|
#[unstable(feature = "libstd_thread_internals", issue = "none")]
|
||||||
|
#[cfg(test)]
|
||||||
|
#[cfg(all(
|
||||||
|
not(target_thread_local),
|
||||||
|
not(all(target_family = "wasm", not(target_feature = "atomics"))),
|
||||||
|
))]
|
||||||
|
pub use realstd::thread::__OsLocalKeyInner;
|
||||||
|
|
||||||
#[unstable(feature = "libstd_thread_internals", issue = "none")]
|
#[unstable(feature = "libstd_thread_internals", issue = "none")]
|
||||||
#[cfg(all(target_family = "wasm", not(target_feature = "atomics")))]
|
#[cfg(all(target_family = "wasm", not(target_feature = "atomics")))]
|
||||||
|
|||||||
Reference in New Issue
Block a user