make DeepClone inherit from Clone

This commit is contained in:
Daniel Micay 2013-11-08 23:26:53 -05:00
parent 421c631570
commit 6943ca8dcd

View File

@ -133,7 +133,7 @@ fn clone(&self) -> extern "Rust" fn($($A),*) -> ReturnType { *self }
/// A trait distinct from `Clone` which represents "deep copies" of things like
/// managed boxes which would otherwise not be copied.
pub trait DeepClone {
pub trait DeepClone: Clone {
/// Return a deep copy of the value. Unlike `Clone`, the contents of shared pointer types
/// *are* copied.
fn deep_clone(&self) -> Self;