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> {
110
110
}
111
111
}
112
112
113
+ #[ unstable]
113
114
impl < T : Share + Send > Clone for Arc < T > {
114
115
/// Duplicate an atomically reference counted wrapper.
115
116
///
@@ -236,6 +237,7 @@ impl<T: Share + Send> Weak<T> {
236
237
}
237
238
}
238
239
240
+ #[ unstable]
239
241
impl < T : Share + Send > Clone for Weak < T > {
240
242
#[ inline]
241
243
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> {
42
42
fn default ( ) -> Box < T > { box Default :: default ( ) }
43
43
}
44
44
45
+ #[ unstable]
45
46
impl < T : Clone > Clone for Box < T > {
46
47
/// Return a copy of the owned box.
47
48
#[ inline]
Original file line number Diff line number Diff line change @@ -143,6 +143,7 @@ impl<T> Drop for Rc<T> {
143
143
}
144
144
}
145
145
146
+ #[ unstable]
146
147
impl < T > Clone for Rc < T > {
147
148
#[ inline]
148
149
fn clone ( & self ) -> Rc < T > {
@@ -224,6 +225,7 @@ impl<T> Drop for Weak<T> {
224
225
}
225
226
}
226
227
228
+ #[ unstable]
227
229
impl < T > Clone for Weak < T > {
228
230
#[ inline]
229
231
fn clone ( & self ) -> Weak < T > {
Original file line number Diff line number Diff line change @@ -316,6 +316,7 @@ impl<T: Clone> Vec<T> {
316
316
}
317
317
}
318
318
319
+ #[ unstable]
319
320
impl < T : Clone > Clone for Vec < T > {
320
321
fn clone ( & self ) -> Vec < T > {
321
322
let len = self . len ;
Original file line number Diff line number Diff line change @@ -192,6 +192,7 @@ impl<T:Copy> Cell<T> {
192
192
}
193
193
}
194
194
195
+ #[ unstable]
195
196
impl < T : Copy > Clone for Cell < T > {
196
197
fn clone ( & self ) -> Cell < T > {
197
198
Cell :: new ( self . get ( ) )
@@ -298,6 +299,7 @@ impl<T> RefCell<T> {
298
299
}
299
300
}
300
301
302
+ #[ unstable]
301
303
impl < T : Clone > Clone for RefCell < T > {
302
304
fn clone ( & self ) -> RefCell < T > {
303
305
RefCell :: new ( self . borrow ( ) . clone ( ) )
Original file line number Diff line number Diff line change @@ -21,6 +21,8 @@ the `clone` method.
21
21
22
22
*/
23
23
24
+ #![ unstable]
25
+
24
26
/// A common trait for cloning an object.
25
27
pub trait Clone {
26
28
/// Returns a copy of the value. The contents of owned pointers
@@ -34,6 +36,7 @@ pub trait Clone {
34
36
/// but can be overridden to reuse the resources of `a` to avoid unnecessary
35
37
/// allocations.
36
38
#[ inline( always) ]
39
+ #[ experimental = "this function is mostly unused" ]
37
40
fn clone_from ( & mut self , source : & Self ) {
38
41
* self = source. clone ( )
39
42
}
@@ -88,6 +91,7 @@ clone_impl!(char)
88
91
89
92
macro_rules! extern_fn_clone(
90
93
( $( $A: ident) ,* ) => (
94
+ #[ experimental = "this may not be sufficient for fns with region parameters" ]
91
95
impl <$( $A, ) * ReturnType > Clone for extern "Rust" fn ( $( $A) ,* ) -> ReturnType {
92
96
/// Return a copy of a function pointer
93
97
#[ inline]
Original file line number Diff line number Diff line change @@ -104,6 +104,7 @@ macro_rules! tuple_impls {
104
104
) +
105
105
}
106
106
107
+ #[ unstable]
107
108
impl <$( $T: Clone ) ,+> Clone for ( $( $T, ) +) {
108
109
fn clone( & self ) -> ( $( $T, ) +) {
109
110
( $( self . $refN( ) . clone( ) , ) +)
Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ pub struct Gc<T> {
37
37
marker : marker:: NoSend ,
38
38
}
39
39
40
+ #[ unstable]
40
41
impl < T > Clone for Gc < T > {
41
42
/// Clone the pointer only
42
43
#[ inline]
You can’t perform that action at this time.
0 commit comments