]> git.lizzy.rs Git - rust.git/blobdiff - src/libstd/sync/semaphore.rs
std: Add a tracking issue for Peekable::is_empty
[rust.git] / src / libstd / sync / semaphore.rs
index 8f08c840c218bca20e55765f5138924e90e24439..dd76444d3ae02edbbc0064f794b2b43e7f7b6de3 100644 (file)
@@ -12,9 +12,6 @@
             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;
 /// // Release our initially acquired resource
 /// sem.release();
 /// ```
+#[rustc_deprecated(since = "1.7.0",
+                   reason = "easily confused with system semaphores and not \
+                             used enough to pull its weight")]
+#[unstable(feature = "semaphore",
+           reason = "the interaction between semaphores and the acquisition/release \
+                     of resources is currently unclear",
+           issue = "27798")]
 pub struct Semaphore {
     lock: Mutex<isize>,
     cvar: Condvar,
@@ -56,10 +60,24 @@ pub struct Semaphore {
 
 /// An RAII guard which will release a resource acquired from a semaphore when
 /// dropped.
+#[rustc_deprecated(since = "1.7.0",
+                   reason = "easily confused with system semaphores and not \
+                             used enough to pull its weight")]
+#[unstable(feature = "semaphore",
+           reason = "the interaction between semaphores and the acquisition/release \
+                     of resources is currently unclear",
+           issue = "27798")]
 pub struct SemaphoreGuard<'a> {
     sem: &'a Semaphore,
 }
 
+#[rustc_deprecated(since = "1.7.0",
+                   reason = "easily confused with system semaphores and not \
+                             used enough to pull its weight")]
+#[unstable(feature = "semaphore",
+           reason = "the interaction between semaphores and the acquisition/release \
+                     of resources is currently unclear",
+           issue = "27798")]
 impl Semaphore {
     /// Creates a new semaphore with the initial count specified.
     ///