about summary refs log tree commit diff
path: root/src/libstd/sync
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd/sync')
-rw-r--r--src/libstd/sync/mod.rs1
-rw-r--r--src/libstd/sync/semaphore.rs4
2 files changed, 5 insertions, 0 deletions
diff --git a/src/libstd/sync/mod.rs b/src/libstd/sync/mod.rs
index e1b7930b6d8..9c9aa20eff5 100644
--- a/src/libstd/sync/mod.rs
+++ b/src/libstd/sync/mod.rs
@@ -39,6 +39,7 @@ pub use self::rwlock::{RwLockReadGuard, RwLockWriteGuard};
 #[stable(feature = "rust1", since = "1.0.0")]
 pub use self::rwlock::{RwLock, StaticRwLock, RW_LOCK_INIT};
 #[stable(feature = "rust1", since = "1.0.0")]
+#[allow(deprecated)]
 pub use self::semaphore::{Semaphore, SemaphoreGuard};
 
 pub mod mpsc;
diff --git a/src/libstd/sync/semaphore.rs b/src/libstd/sync/semaphore.rs
index 891f8775ff2..8f08c840c21 100644
--- a/src/libstd/sync/semaphore.rs
+++ b/src/libstd/sync/semaphore.rs
@@ -12,6 +12,10 @@
             reason = "the interaction between semaphores and the acquisition/release \
                       of resources is currently unclear",
             issue = "27798")]
+#![rustc_deprecated(since = "1.7.0",
+                    reason = "easily confused with system sempahores and not \
+                              used enough to pull its weight")]
+#![allow(deprecated)]
 
 use ops::Drop;
 use sync::{Mutex, Condvar};