Skip to content

Commit fa45958

Browse files
committed
clone: clarify docstring
1 parent 2fc6b09 commit fa45958

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/libcore/clone.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ by convention implementing the `Clone` trait and calling the
2323
*/
2424

2525
pub trait Clone {
26-
/// Return a deep copy of the owned object tree. Managed boxes are cloned with a shallow copy.
26+
/// Return a deep copy of the owned object tree. Types with shared ownership like managed boxes
27+
/// are cloned with a shallow copy.
2728
fn clone(&self) -> Self;
2829
}
2930

@@ -33,7 +34,7 @@ impl Clone for () {
3334
fn clone(&self) -> () { () }
3435
}
3536

36-
impl<T:Clone> Clone for ~T {
37+
impl<T: Clone> Clone for ~T {
3738
/// Return a deep copy of the owned box.
3839
#[inline(always)]
3940
fn clone(&self) -> ~T { ~(**self).clone() }

0 commit comments

Comments
 (0)