]> git.lizzy.rs Git - rust.git/commitdiff
std: Stabilize Clone::clone_from
authorAlex Crichton <alex@alexcrichton.com>
Wed, 8 Apr 2015 23:38:38 +0000 (16:38 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Wed, 8 Apr 2015 23:40:03 +0000 (16:40 -0700)
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.

src/libcore/clone.rs

index 85e5bde48598eee8bde8ee706fc365e60f19104c..0ded6a4b364b12b022a08dfd325c1b2d0d751733 100644 (file)
@@ -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()
     }