Skip to content

Commit cdfbb11

Browse files
committed
Rollup merge of #24215 - alexcrichton:stabilize-clone-from, r=aturon
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.
2 parents 5daee19 + 6b32072 commit cdfbb11

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/libcore/clone.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@ pub trait Clone : Sized {
4444
/// but can be overridden to reuse the resources of `a` to avoid unnecessary
4545
/// allocations.
4646
#[inline(always)]
47-
#[unstable(feature = "core",
48-
reason = "this function is rarely used")]
47+
#[stable(feature = "rust1", since = "1.0.0")]
4948
fn clone_from(&mut self, source: &Self) {
5049
*self = source.clone()
5150
}

0 commit comments

Comments
 (0)