Rollup merge of #128135 - joboet:reduplicate_tls, r=tgross35
std: use duplicate thread local state in tests With rust-lang/miri#3739 merged, the deduplication hack is no longer necessary.
This commit is contained in:
commit
d146ecdcb9
@ -192,22 +192,14 @@ pub use scoped::{scope, Scope, ScopedJoinHandle};
|
|||||||
#[macro_use]
|
#[macro_use]
|
||||||
mod local;
|
mod local;
|
||||||
|
|
||||||
cfg_if::cfg_if! {
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
if #[cfg(test)] {
|
pub use self::local::{AccessError, LocalKey};
|
||||||
// Avoid duplicating the global state associated with thread-locals between this crate and
|
|
||||||
// realstd. Miri relies on this.
|
|
||||||
pub use realstd::thread::{local_impl, AccessError, LocalKey};
|
|
||||||
} else {
|
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
|
||||||
pub use self::local::{AccessError, LocalKey};
|
|
||||||
|
|
||||||
// Implementation details used by the thread_local!{} macro.
|
// Implementation details used by the thread_local!{} macro.
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
#[unstable(feature = "thread_local_internals", issue = "none")]
|
#[unstable(feature = "thread_local_internals", issue = "none")]
|
||||||
pub mod local_impl {
|
pub mod local_impl {
|
||||||
pub use crate::sys::thread_local::*;
|
pub use crate::sys::thread_local::*;
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
Loading…
x
Reference in New Issue
Block a user