diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-04-08 16:38:38 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-04-08 16:40:03 -0700 |
| commit | 6b32072c0c958949a4b6946bb7adb29241804454 (patch) | |
| tree | ee741d8bc59a2ac5ac664de825536d1cb973338a | |
| parent | 926f38e588bb99aff1902fa94ab82b1db89cbbce (diff) | |
| download | rust-6b32072c0c958949a4b6946bb7adb29241804454.tar.gz rust-6b32072c0c958949a4b6946bb7adb29241804454.zip | |
std: Stabilize Clone::clone_from
This method hasn't really changed since is inception, and it can often be a nice performance win for some situations. This method also imposes no burden on implementors or users of `Clone` as it's just a default method on the side.
| -rw-r--r-- | src/libcore/clone.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libcore/clone.rs b/src/libcore/clone.rs index 85e5bde4859..0ded6a4b364 100644 --- a/src/libcore/clone.rs +++ b/src/libcore/clone.rs @@ -44,8 +44,7 @@ pub trait Clone : Sized { /// but can be overridden to reuse the resources of `a` to avoid unnecessary /// allocations. #[inline(always)] - #[unstable(feature = "core", - reason = "this function is rarely used")] + #[stable(feature = "rust1", since = "1.0.0")] fn clone_from(&mut self, source: &Self) { *self = source.clone() } |
