std: use duplicate thread local state in tests · model-checking/verify-rust-std@eb79e09
@@ -192,22 +192,14 @@ pub use scoped::{scope, Scope, ScopedJoinHandle};
192192#[macro_use]
193193mod local;
194194195-cfg_if::cfg_if! {
196-if #[cfg(test)] {
197-// Avoid duplicating the global state associated with thread-locals between this crate and
198-// realstd. Miri relies on this.
199-pub use realstd::thread::{local_impl, AccessError, LocalKey};
200-} else {
201- #[stable(feature = "rust1", since = "1.0.0")]
202-pub use self::local::{AccessError, LocalKey};
203-204-// Implementation details used by the thread_local!{} macro.
205- #[doc(hidden)]
206- #[unstable(feature = "thread_local_internals", issue = "none")]
207-pub mod local_impl {
208-pub use crate::sys::thread_local::*;
209-}
210-}
195+#[stable(feature = "rust1", since = "1.0.0")]
196+pub use self::local::{AccessError, LocalKey};
197+198+// Implementation details used by the thread_local!{} macro.
199+#[doc(hidden)]
200+#[unstable(feature = "thread_local_internals", issue = "none")]
201+pub mod local_impl {
202+pub use crate::sys::thread_local::*;
211203}
212204213205////////////////////////////////////////////////////////////////////////////////