about summary refs log tree commit diff
path: root/src/libcollections
diff options
context:
space:
mode:
authorAaron Turon <aturon@mozilla.com>2014-12-20 00:35:06 -0800
committerAaron Turon <aturon@mozilla.com>2014-12-20 00:37:44 -0800
commit92ccc073e1a5a68fada24b5b3cb47b65b5ff1c61 (patch)
tree4992a05d77d7c24af27d83d6a47c417db45a28f7 /src/libcollections
parent8443b09e361b96d1f9b7f45a65ed0d31c0e86e70 (diff)
downloadrust-92ccc073e1a5a68fada24b5b3cb47b65b5ff1c61.tar.gz
rust-92ccc073e1a5a68fada24b5b3cb47b65b5ff1c61.zip
Stabilize clone
This patch marks `clone` stable, as well as the `Clone` trait, but
leaves `clone_from` unstable. The latter will be decided by the beta.

The patch also marks most manual implementations of `Clone` as stable,
except where the APIs are otherwise deprecated or where there is
uncertainty about providing `Clone`.
Diffstat (limited to 'src/libcollections')
-rw-r--r--src/libcollections/bit.rs1
-rw-r--r--src/libcollections/btree/node.rs1
-rw-r--r--src/libcollections/dlist.rs1
-rw-r--r--src/libcollections/ring_buf.rs1
-rw-r--r--src/libcollections/vec.rs2
5 files changed, 5 insertions, 1 deletions
diff --git a/src/libcollections/bit.rs b/src/libcollections/bit.rs
index 7f78d56607e..2025af1286b 100644
--- a/src/libcollections/bit.rs
+++ b/src/libcollections/bit.rs
@@ -851,6 +851,7 @@ impl Extend<bool> for Bitv {
     }
 }
 
+#[stable]
 impl Clone for Bitv {
     #[inline]
     fn clone(&self) -> Bitv {
diff --git a/src/libcollections/btree/node.rs b/src/libcollections/btree/node.rs
index 9698b06c7fa..56b544c4087 100644
--- a/src/libcollections/btree/node.rs
+++ b/src/libcollections/btree/node.rs
@@ -390,6 +390,7 @@ impl<K, V> Node<K, V> {
 }
 
 // FIXME(gereeter) Write an efficient clone_from
+#[stable]
 impl<K: Clone, V: Clone> Clone for Node<K, V> {
     fn clone(&self) -> Node<K, V> {
         let mut ret = if self.is_leaf() {
diff --git a/src/libcollections/dlist.rs b/src/libcollections/dlist.rs
index e7454aef51e..04bd40bf51a 100644
--- a/src/libcollections/dlist.rs
+++ b/src/libcollections/dlist.rs
@@ -758,6 +758,7 @@ impl<A: Ord> Ord for DList<A> {
     }
 }
 
+#[stable]
 impl<A: Clone> Clone for DList<A> {
     fn clone(&self) -> DList<A> {
         self.iter().map(|x| x.clone()).collect()
diff --git a/src/libcollections/ring_buf.rs b/src/libcollections/ring_buf.rs
index cdb92d302e9..5d53520b8f3 100644
--- a/src/libcollections/ring_buf.rs
+++ b/src/libcollections/ring_buf.rs
@@ -48,6 +48,7 @@ pub struct RingBuf<T> {
     ptr: *mut T
 }
 
+#[stable]
 impl<T: Clone> Clone for RingBuf<T> {
     fn clone(&self) -> RingBuf<T> {
         self.iter().map(|t| t.clone()).collect()
diff --git a/src/libcollections/vec.rs b/src/libcollections/vec.rs
index e986b204430..7fca8b37705 100644
--- a/src/libcollections/vec.rs
+++ b/src/libcollections/vec.rs
@@ -443,7 +443,7 @@ impl<T: Clone> Vec<T> {
     }
 }
 
-#[unstable]
+#[stable]
 impl<T:Clone> Clone for Vec<T> {
     fn clone(&self) -> Vec<T> { self.as_slice().to_vec() }