about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
Diffstat (limited to 'src/liballoc')
-rw-r--r--src/liballoc/arc.rs20
-rw-r--r--src/liballoc/boxed.rs5
-rw-r--r--src/liballoc/rc.rs1
3 files changed, 18 insertions, 8 deletions
diff --git a/src/liballoc/arc.rs b/src/liballoc/arc.rs
index 27174de8e74..1ac2c9fc6be 100644
--- a/src/liballoc/arc.rs
+++ b/src/liballoc/arc.rs
@@ -8,10 +8,10 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-/*!
- * Concurrency-enabled mechanisms for sharing mutable and/or immutable state
- * between tasks.
- */
+#![stable]
+
+//! Concurrency-enabled mechanisms for sharing mutable and/or immutable state
+//! between tasks.
 
 use core::atomics;
 use core::clone::Clone;
@@ -51,6 +51,7 @@ use heap::deallocate;
 /// }
 /// ```
 #[unsafe_no_drop_flag]
+#[stable]
 pub struct Arc<T> {
     // FIXME #12808: strange name to try to avoid interfering with
     // field accesses of the contained type via Deref
@@ -62,6 +63,7 @@ pub struct Arc<T> {
 /// Weak pointers will not keep the data inside of the `Arc` alive, and can be
 /// used to break cycles between `Arc` pointers.
 #[unsafe_no_drop_flag]
+#[experimental = "Weak pointers may not belong in this module."]
 pub struct Weak<T> {
     // FIXME #12808: strange name to try to avoid interfering with
     // field accesses of the contained type via Deref
@@ -77,6 +79,7 @@ struct ArcInner<T> {
 impl<T: Share + Send> Arc<T> {
     /// Create an atomically reference counted wrapper.
     #[inline]
+    #[stable]
     pub fn new(data: T) -> Arc<T> {
         // Start the weak pointer count as 1 which is the weak pointer that's
         // held by all the strong pointers (kinda), see std/rc.rs for more info
@@ -103,6 +106,7 @@ impl<T: Share + Send> Arc<T> {
     /// Weak pointers will not keep the data alive. Once all strong references
     /// to the underlying data have been dropped, the data itself will be
     /// destroyed.
+    #[experimental = "Weak pointers may not belong in this module."]
     pub fn downgrade(&self) -> Weak<T> {
         // See the clone() impl for why this is relaxed
         self.inner().weak.fetch_add(1, atomics::Relaxed);
@@ -110,7 +114,7 @@ impl<T: Share + Send> Arc<T> {
     }
 }
 
-#[unstable]
+#[unstable = "waiting on stability of Clone"]
 impl<T: Share + Send> Clone for Arc<T> {
     /// Duplicate an atomically reference counted wrapper.
     ///
@@ -135,6 +139,7 @@ impl<T: Share + Send> Clone for Arc<T> {
     }
 }
 
+#[experimental = "Deref is experimental."]
 impl<T: Send + Share> Deref<T> for Arc<T> {
     #[inline]
     fn deref<'a>(&'a self) -> &'a T {
@@ -169,6 +174,7 @@ impl<T: Send + Share + Clone> Arc<T> {
 }
 
 #[unsafe_destructor]
+#[experimental = "waiting on stability of Drop"]
 impl<T: Share + Send> Drop for Arc<T> {
     fn drop(&mut self) {
         // This structure has #[unsafe_no_drop_flag], so this drop glue may run
@@ -212,6 +218,7 @@ impl<T: Share + Send> Drop for Arc<T> {
     }
 }
 
+#[experimental = "Weak pointers may not belong in this module."]
 impl<T: Share + Send> Weak<T> {
     /// Attempts to upgrade this weak reference to a strong reference.
     ///
@@ -237,7 +244,7 @@ impl<T: Share + Send> Weak<T> {
     }
 }
 
-#[unstable]
+#[experimental = "Weak pointers may not belong in this module."]
 impl<T: Share + Send> Clone for Weak<T> {
     #[inline]
     fn clone(&self) -> Weak<T> {
@@ -248,6 +255,7 @@ impl<T: Share + Send> Clone for Weak<T> {
 }
 
 #[unsafe_destructor]
+#[experimental = "Weak pointers may not belong in this module."]
 impl<T: Share + Send> Drop for Weak<T> {
     fn drop(&mut self) {
         // see comments above for why this check is here
diff --git a/src/liballoc/boxed.rs b/src/liballoc/boxed.rs
index 89f6e934ad2..58278d5664e 100644
--- a/src/liballoc/boxed.rs
+++ b/src/liballoc/boxed.rs
@@ -87,10 +87,12 @@ impl<T: Ord> Ord for Box<T> {
 impl<T: Eq> Eq for Box<T> {}
 
 /// Extension methods for an owning `Any` trait object
-#[unstable = "post-DST, the signature of `downcast` will change to take `Box<Self>`"]
+#[unstable = "post-DST and coherence changes, this will not be a trait but \
+              rather a direct `impl` on `Box<Any>`"]
 pub trait BoxAny {
     /// Returns the boxed value if it is of type `T`, or
     /// `Err(Self)` if it isn't.
+    #[unstable = "naming conventions around accessing innards may change"]
     fn downcast<T: 'static>(self) -> Result<Box<T>, Self>;
 
     /// Deprecated; this method has been renamed to `downcast`.
@@ -100,6 +102,7 @@ pub trait BoxAny {
     }
 }
 
+#[stable]
 impl BoxAny for Box<Any> {
     #[inline]
     fn downcast<T: 'static>(self) -> Result<Box<T>, Box<Any>> {
diff --git a/src/liballoc/rc.rs b/src/liballoc/rc.rs
index 8d4e788bc80..b31931c6de3 100644
--- a/src/liballoc/rc.rs
+++ b/src/liballoc/rc.rs
@@ -379,7 +379,6 @@ impl<T> Drop for Weak<T> {
     }
 }
 
-#[unstable]
 #[experimental = "Weak pointers may not belong in this module."]
 impl<T> Clone for Weak<T> {
     #[inline]