about summary refs log tree commit diff
path: root/src/libcore/array.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcore/array.rs')
-rw-r--r--src/libcore/array.rs12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/libcore/array.rs b/src/libcore/array.rs
index 838ca4e478b..b2bb5ee7999 100644
--- a/src/libcore/array.rs
+++ b/src/libcore/array.rs
@@ -17,7 +17,7 @@
 use clone::Clone;
 use cmp::{PartialEq, Eq, PartialOrd, Ord, Ordering};
 use fmt;
-use hash::{Hash, Hasher, self};
+use hash::{Hash, self};
 use iter::IntoIterator;
 use marker::Copy;
 use ops::Deref;
@@ -35,11 +35,19 @@ macro_rules! array_impls {
                 }
             }
 
-            impl<S: hash::Writer + Hasher, T: Hash<S>> Hash<S> for [T; $N] {
+            #[cfg(stage0)]
+            impl<S: hash::Writer + hash::Hasher, T: Hash<S>> Hash<S> for [T; $N] {
                 fn hash(&self, state: &mut S) {
                     Hash::hash(&self[], state)
                 }
             }
+            #[cfg(not(stage0))]
+            #[stable(feature = "rust1", since = "1.0.0")]
+            impl<T: Hash> Hash for [T; $N] {
+                fn hash<H: hash::Hasher>(&self, state: &mut H) {
+                    Hash::hash(&self[], state)
+                }
+            }
 
             #[stable(feature = "rust1", since = "1.0.0")]
             impl<T: fmt::Debug> fmt::Debug for [T; $N] {