File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
branches/auto/src/libcore Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,6 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
14
14
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
15
15
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
16
16
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
17
- refs/heads/auto: 6d4845668f1755bb92c3053419cb182a4599f1d5
17
+ refs/heads/auto: 24609675ebeff66f6299e98e4687618a48cf47e7
18
18
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
19
19
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
Original file line number Diff line number Diff line change @@ -25,8 +25,9 @@ by convention implementing the `Clone` trait and calling the
25
25
use core:: kinds:: Const ;
26
26
27
27
pub trait Clone {
28
- /// Return a deep copy of the owned object tree. Types with shared ownership like managed boxes
29
- /// are cloned with a shallow copy.
28
+ /// Returns a copy of the value. The contents of owned pointers
29
+ /// are copied to maintain uniqueness, while the contents of
30
+ /// managed pointers are not copied.
30
31
fn clone ( & self ) -> Self ;
31
32
}
32
33
@@ -85,8 +86,9 @@ clone_impl!(bool)
85
86
clone_impl ! ( char )
86
87
87
88
pub trait DeepClone {
88
- /// Return a deep copy of the object tree. Types with shared ownership are also copied via a
89
- /// deep copy, unlike `Clone`.
89
+ /// Return a deep copy of the value. Unlike `Clone`, the contents of shared pointer types
90
+ /// *are* copied. Note that this is currently unimplemented for managed boxes, as
91
+ /// it would need to handle cycles, but it is implemented for other smart-pointer types.
90
92
fn deep_clone ( & self ) -> Self ;
91
93
}
92
94
You can’t perform that action at this time.
0 commit comments