File tree Expand file tree Collapse file tree 8 files changed +14
-0
lines changed Expand file tree Collapse file tree 8 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -110,6 +110,7 @@ impl<T: Share + Send> Arc<T> {
110110 }
111111}
112112
113+ #[ unstable]
113114impl < T : Share + Send > Clone for Arc < T > {
114115 /// Duplicate an atomically reference counted wrapper.
115116 ///
@@ -236,6 +237,7 @@ impl<T: Share + Send> Weak<T> {
236237 }
237238}
238239
240+ #[ unstable]
239241impl < T : Share + Send > Clone for Weak < T > {
240242 #[ inline]
241243 fn clone ( & self ) -> Weak < T > {
Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ impl<T: Default> Default for Box<T> {
4242 fn default ( ) -> Box < T > { box Default :: default ( ) }
4343}
4444
45+ #[ unstable]
4546impl < T : Clone > Clone for Box < T > {
4647 /// Return a copy of the owned box.
4748 #[ inline]
Original file line number Diff line number Diff line change @@ -143,6 +143,7 @@ impl<T> Drop for Rc<T> {
143143 }
144144}
145145
146+ #[ unstable]
146147impl < T > Clone for Rc < T > {
147148 #[ inline]
148149 fn clone ( & self ) -> Rc < T > {
@@ -224,6 +225,7 @@ impl<T> Drop for Weak<T> {
224225 }
225226}
226227
228+ #[ unstable]
227229impl < T > Clone for Weak < T > {
228230 #[ inline]
229231 fn clone ( & self ) -> Weak < T > {
Original file line number Diff line number Diff line change @@ -316,6 +316,7 @@ impl<T: Clone> Vec<T> {
316316 }
317317}
318318
319+ #[ unstable]
319320impl < T : Clone > Clone for Vec < T > {
320321 fn clone ( & self ) -> Vec < T > {
321322 let len = self . len ;
Original file line number Diff line number Diff line change @@ -192,6 +192,7 @@ impl<T:Copy> Cell<T> {
192192 }
193193}
194194
195+ #[ unstable]
195196impl < T : Copy > Clone for Cell < T > {
196197 fn clone ( & self ) -> Cell < T > {
197198 Cell :: new ( self . get ( ) )
@@ -298,6 +299,7 @@ impl<T> RefCell<T> {
298299 }
299300}
300301
302+ #[ unstable]
301303impl < T : Clone > Clone for RefCell < T > {
302304 fn clone ( & self ) -> RefCell < T > {
303305 RefCell :: new ( self . borrow ( ) . clone ( ) )
Original file line number Diff line number Diff line change @@ -21,6 +21,8 @@ the `clone` method.
2121
2222*/
2323
24+ #![ unstable]
25+
2426/// A common trait for cloning an object.
2527pub trait Clone {
2628 /// Returns a copy of the value. The contents of owned pointers
@@ -34,6 +36,7 @@ pub trait Clone {
3436 /// but can be overridden to reuse the resources of `a` to avoid unnecessary
3537 /// allocations.
3638 #[ inline( always) ]
39+ #[ experimental = "this function is mostly unused" ]
3740 fn clone_from ( & mut self , source : & Self ) {
3841 * self = source. clone ( )
3942 }
@@ -88,6 +91,7 @@ clone_impl!(char)
8891
8992macro_rules! extern_fn_clone(
9093 ( $( $A: ident) ,* ) => (
94+ #[ experimental = "this may not be sufficient for fns with region parameters" ]
9195 impl <$( $A, ) * ReturnType > Clone for extern "Rust" fn ( $( $A) ,* ) -> ReturnType {
9296 /// Return a copy of a function pointer
9397 #[ inline]
Original file line number Diff line number Diff line change @@ -104,6 +104,7 @@ macro_rules! tuple_impls {
104104 ) +
105105 }
106106
107+ #[ unstable]
107108 impl <$( $T: Clone ) ,+> Clone for ( $( $T, ) +) {
108109 fn clone( & self ) -> ( $( $T, ) +) {
109110 ( $( self . $refN( ) . clone( ) , ) +)
Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ pub struct Gc<T> {
3737 marker : marker:: NoSend ,
3838}
3939
40+ #[ unstable]
4041impl < T > Clone for Gc < T > {
4142 /// Clone the pointer only
4243 #[ inline]
You can’t perform that action at this time.
0 commit comments