From fa45958ec8362c1157d8d655fc8ec95ba3f811d6 Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Wed, 15 May 2013 00:40:14 -0400 Subject: [PATCH] clone: clarify docstring --- src/libcore/clone.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/libcore/clone.rs b/src/libcore/clone.rs index 9da970918b0d..518ea46f10bb 100644 --- a/src/libcore/clone.rs +++ b/src/libcore/clone.rs @@ -23,7 +23,8 @@ by convention implementing the `Clone` trait and calling the */ pub trait Clone { - /// 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 + /// are cloned with a shallow copy. fn clone(&self) -> Self; } @@ -33,7 +34,7 @@ impl Clone for () { fn clone(&self) -> () { () } } -impl Clone for ~T { +impl Clone for ~T { /// Return a deep copy of the owned box. #[inline(always)] fn clone(&self) -> ~T { ~(**self).clone() }