about summary refs log tree commit diff
path: root/src/libcore/array.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-11-18 01:02:19 +0000
committerbors <bors@rust-lang.org>2014-11-18 01:02:19 +0000
commit9c96a79a74f10bed18b031ce0ac4126c56d6cfb3 (patch)
tree42a980b8b8b145b37aae79c28c7540f8a7eec8d0 /src/libcore/array.rs
parent336349c93207d792587eb0b5258b29da6ec0db8a (diff)
parent330a1afae84c7bea583907e5b1f02448a4c7bc20 (diff)
downloadrust-9c96a79a74f10bed18b031ce0ac4126c56d6cfb3.tar.gz
rust-9c96a79a74f10bed18b031ce0ac4126c56d6cfb3.zip
auto merge of #19049 : jakub-/rust/roll-up, r=alexcrichton
r? @alexcrichton
Diffstat (limited to 'src/libcore/array.rs')
-rw-r--r--src/libcore/array.rs30
1 files changed, 22 insertions, 8 deletions
diff --git a/src/libcore/array.rs b/src/libcore/array.rs
index 829605ce7cc..60765e82cb4 100644
--- a/src/libcore/array.rs
+++ b/src/libcore/array.rs
@@ -8,22 +8,36 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-/*!
- * Implementations of things like `Eq` for fixed-length arrays
- * up to a certain length. Eventually we should able to generalize
- * to all lengths.
- */
+//! Implementations of things like `Eq` for fixed-length arrays
+//! up to a certain length. Eventually we should able to generalize
+//! to all lengths.
 
-#![stable]
 #![experimental] // not yet reviewed
 
-use cmp::*;
-use option::{Option};
+use clone::Clone;
+use cmp::{PartialEq, Eq, PartialOrd, Ord, Ordering};
+use fmt;
+use kinds::Copy;
+use option::Option;
 
 // macro for implementing n-ary tuple functions and operations
 macro_rules! array_impls {
     ($($N:expr)+) => {
         $(
+            #[unstable = "waiting for Clone to stabilize"]
+            impl<T:Copy> Clone for [T, ..$N] {
+                fn clone(&self) -> [T, ..$N] {
+                    *self
+                }
+            }
+
+            #[unstable = "waiting for Show to stabilize"]
+            impl<T:fmt::Show> fmt::Show for [T, ..$N] {
+                fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+                    fmt::Show::fmt(&self[], f)
+                }
+            }
+
             #[unstable = "waiting for PartialEq to stabilize"]
             impl<T:PartialEq> PartialEq for [T, ..$N] {
                 #[inline]