about summary refs log tree commit diff
path: root/src/libstd/thread
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd/thread')
-rw-r--r--src/libstd/thread/local.rs8
-rw-r--r--src/libstd/thread/mod.rs2
2 files changed, 7 insertions, 3 deletions
diff --git a/src/libstd/thread/local.rs b/src/libstd/thread/local.rs
index 5d2eb5f8e73..8207709e1f9 100644
--- a/src/libstd/thread/local.rs
+++ b/src/libstd/thread/local.rs
@@ -126,7 +126,8 @@ impl<T: 'static> fmt::Debug for LocalKey<T> {
 /// [`std::thread::LocalKey`]: ../std/thread/struct.LocalKey.html
 #[macro_export]
 #[stable(feature = "rust1", since = "1.0.0")]
-#[allow_internal_unstable]
+#[cfg_attr(stage0, allow_internal_unstable)]
+#[cfg_attr(not(stage0), allow_internal_unstable(thread_local_internals))]
 macro_rules! thread_local {
     // empty (base case for the recursion)
     () => {};
@@ -148,7 +149,10 @@ macro_rules! thread_local {
            reason = "should not be necessary",
            issue = "0")]
 #[macro_export]
-#[allow_internal_unstable]
+#[cfg_attr(stage0, allow_internal_unstable)]
+#[cfg_attr(not(stage0), allow_internal_unstable(
+    thread_local_internals, cfg_target_thread_local, thread_local,
+))]
 #[allow_internal_unsafe]
 macro_rules! __thread_local_inner {
     (@key $(#[$attr:meta])* $vis:vis $name:ident, $t:ty, $init:expr) => {
diff --git a/src/libstd/thread/mod.rs b/src/libstd/thread/mod.rs
index eb8e0c1c8ac..438ea3aa3f6 100644
--- a/src/libstd/thread/mod.rs
+++ b/src/libstd/thread/mod.rs
@@ -841,7 +841,7 @@ const NOTIFIED: usize = 2;
 /// let flag2 = Arc::clone(&flag);
 ///
 /// let parked_thread = thread::spawn(move || {
-///     // We want to wait until the flag is set.  We *could* just spin, but using
+///     // We want to wait until the flag is set. We *could* just spin, but using
 ///     // park/unpark is more efficient.
 ///     while !flag2.load(Ordering::Acquire) {
 ///         println!("Parking thread");