diff options
Diffstat (limited to 'src/libcore/vec.rs')
| -rw-r--r-- | src/libcore/vec.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/libcore/vec.rs b/src/libcore/vec.rs index f7676bd211e..ab5f04ace79 100644 --- a/src/libcore/vec.rs +++ b/src/libcore/vec.rs @@ -14,7 +14,7 @@ use container::{Container, Mutable}; use cast; -use cmp::{Eq, Ord, TotalOrd, Ordering, Less, Equal, Greater}; +use cmp::{Eq, Equiv, Ord, TotalOrd, Ordering, Less, Equal, Greater}; use iter::BaseIter; use iter; use kinds::Copy; @@ -1572,6 +1572,12 @@ impl<T:Eq> Eq for @[T] { pure fn ne(&self, other: &@[T]) -> bool { !(*self).eq(other) } } +#[cfg(notest)] +impl<T:Eq> Equiv<~[T]> for &[T] { + #[inline(always)] + pure fn equiv(&self, other: &~[T]) -> bool { eq(*self, *other) } +} + // Lexicographical comparison pure fn cmp<T: TotalOrd>(a: &[T], b: &[T]) -> Ordering { |
