Make Clone a lang item and generate builtin impls.

Fixes #28229.
Fixes #24000.
This commit is contained in:
scalexm
2017-08-04 14:44:12 +02:00
parent b1ff235490
commit 0c3ac648f8
17 changed files with 313 additions and 32 deletions

View File

@@ -124,6 +124,7 @@ macro_rules! array_impls {
}
#[stable(feature = "rust1", since = "1.0.0")]
#[cfg(stage0)]
impl<T:Copy> Clone for [T; $N] {
fn clone(&self) -> [T; $N] {
*self