summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-12-15 20:04:52 -0800
committerAlex Crichton <alex@alexcrichton.com>2014-12-15 20:04:52 -0800
commit9021f61ef7979cb146c5786e1c54c6d928cc0483 (patch)
tree27ac6ed7de9a386a692e20dbf84e8aba722e4e9a /src/liballoc
parent23bae856b7f3a037caffbf6af6f376a7d48058cd (diff)
downloadrust-9021f61ef7979cb146c5786e1c54c6d928cc0483.tar.gz
rust-9021f61ef7979cb146c5786e1c54c6d928cc0483.zip
std: Second pass stabilization of `default`
This commit performs a second pass stabilization of the `std::default` module.
The module was already marked `#[stable]`, and the inheritance of `#[stable]`
was removed since this attribute was applied. This commit adds the `#[stable]`
attribute to the trait definition and one method name, along with all
implementations found in the standard distribution.
Diffstat (limited to 'src/liballoc')
-rw-r--r--src/liballoc/arc.rs2
-rw-r--r--src/liballoc/boxed.rs4
-rw-r--r--src/liballoc/rc.rs1
3 files changed, 7 insertions, 0 deletions
diff --git a/src/liballoc/arc.rs b/src/liballoc/arc.rs
index 1f1909fd33c..876f335406f 100644
--- a/src/liballoc/arc.rs
+++ b/src/liballoc/arc.rs
@@ -316,7 +316,9 @@ impl<T: fmt::Show> fmt::Show for Arc<T> {
     }
 }
 
+#[stable]
 impl<T: Default + Sync + Send> Default for Arc<T> {
+    #[stable]
     fn default() -> Arc<T> { Arc::new(Default::default()) }
 }
 
diff --git a/src/liballoc/boxed.rs b/src/liballoc/boxed.rs
index b0ba20b0133..8fb441c374f 100644
--- a/src/liballoc/boxed.rs
+++ b/src/liballoc/boxed.rs
@@ -44,11 +44,15 @@ pub static HEAP: () = ();
 #[unstable = "custom allocators will add an additional type parameter (with default)"]
 pub struct Box<T>(*mut T);
 
+#[stable]
 impl<T: Default> Default for Box<T> {
+    #[stable]
     fn default() -> Box<T> { box Default::default() }
 }
 
+#[stable]
 impl<T> Default for Box<[T]> {
+    #[stable]
     fn default() -> Box<[T]> { box [] }
 }
 
diff --git a/src/liballoc/rc.rs b/src/liballoc/rc.rs
index 217c898e661..636bf48e876 100644
--- a/src/liballoc/rc.rs
+++ b/src/liballoc/rc.rs
@@ -447,6 +447,7 @@ impl<T: Default> Default for Rc<T> {
     /// let x: Rc<int> = Default::default();
     /// ```
     #[inline]
+    #[stable]
     fn default() -> Rc<T> {
         Rc::new(Default::default())
     }