We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2fc6b09 commit fa45958Copy full SHA for fa45958
src/libcore/clone.rs
@@ -23,7 +23,8 @@ by convention implementing the `Clone` trait and calling the
23
*/
24
25
pub trait Clone {
26
- /// Return a deep copy of the owned object tree. Managed boxes are cloned with a shallow copy.
+ /// Return a deep copy of the owned object tree. Types with shared ownership like managed boxes
27
+ /// are cloned with a shallow copy.
28
fn clone(&self) -> Self;
29
}
30
@@ -33,7 +34,7 @@ impl Clone for () {
33
34
fn clone(&self) -> () { () }
35
36
-impl<T:Clone> Clone for ~T {
37
+impl<T: Clone> Clone for ~T {
38
/// Return a deep copy of the owned box.
39
#[inline(always)]
40
fn clone(&self) -> ~T { ~(**self).clone() }
0 commit comments