about summary refs log tree commit diff
path: root/src/libcore/slice.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-05-29 17:45:07 -0700
committerAlex Crichton <alex@alexcrichton.com>2014-05-30 15:52:24 -0700
commit748bc3ca49de8ab0b890726120c40567094e43fc (patch)
treea205dcd5582cbecbb1a02fa3ed1ebfdcc85ff881 /src/libcore/slice.rs
parentf4fa7c8a07a96cc9d0aae0bfc6515fb747f25341 (diff)
downloadrust-748bc3ca49de8ab0b890726120c40567094e43fc.tar.gz
rust-748bc3ca49de8ab0b890726120c40567094e43fc.zip
std: Rename {Eq,Ord} to Partial{Eq,Ord}
This is part of the ongoing renaming of the equality traits. See #12517 for more
details. All code using Eq/Ord will temporarily need to move to Partial{Eq,Ord}
or the Total{Eq,Ord} traits. The Total traits will soon be renamed to {Eq,Ord}.

cc #12517

[breaking-change]
Diffstat (limited to 'src/libcore/slice.rs')
-rw-r--r--src/libcore/slice.rs22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/libcore/slice.rs b/src/libcore/slice.rs
index 795dd389958..9771d766e65 100644
--- a/src/libcore/slice.rs
+++ b/src/libcore/slice.rs
@@ -15,7 +15,7 @@
 use mem::transmute;
 use clone::Clone;
 use container::Container;
-use cmp::{Eq, TotalOrd, Ordering, Less, Equal, Greater};
+use cmp::{PartialEq, TotalOrd, Ordering, Less, Equal, Greater};
 use cmp;
 use default::Default;
 use iter::*;
@@ -249,11 +249,11 @@ impl<'a, T> RandomAccessIterator<&'a [T]> for Chunks<'a, T> {
 pub mod traits {
     use super::*;
 
-    use cmp::{Eq, Ord, TotalEq, TotalOrd, Ordering, Equiv};
+    use cmp::{PartialEq, PartialOrd, TotalEq, TotalOrd, Ordering, Equiv};
     use iter::{order, Iterator};
     use container::Container;
 
-    impl<'a,T:Eq> Eq for &'a [T] {
+    impl<'a,T:PartialEq> PartialEq for &'a [T] {
         fn eq(&self, other: & &'a [T]) -> bool {
             self.len() == other.len() &&
                 order::eq(self.iter(), other.iter())
@@ -264,7 +264,7 @@ pub mod traits {
         }
     }
 
-    impl<T:Eq> Eq for ~[T] {
+    impl<T:PartialEq> PartialEq for ~[T] {
         #[inline]
         fn eq(&self, other: &~[T]) -> bool { self.as_slice() == *other }
         #[inline]
@@ -275,12 +275,12 @@ pub mod traits {
 
     impl<T:TotalEq> TotalEq for ~[T] {}
 
-    impl<'a,T:Eq, V: Vector<T>> Equiv<V> for &'a [T] {
+    impl<'a,T:PartialEq, V: Vector<T>> Equiv<V> for &'a [T] {
         #[inline]
         fn equiv(&self, other: &V) -> bool { self.as_slice() == other.as_slice() }
     }
 
-    impl<'a,T:Eq, V: Vector<T>> Equiv<V> for ~[T] {
+    impl<'a,T:PartialEq, V: Vector<T>> Equiv<V> for ~[T] {
         #[inline]
         fn equiv(&self, other: &V) -> bool { self.as_slice() == other.as_slice() }
     }
@@ -296,7 +296,7 @@ pub mod traits {
         fn cmp(&self, other: &~[T]) -> Ordering { self.as_slice().cmp(&other.as_slice()) }
     }
 
-    impl<'a, T: Ord> Ord for &'a [T] {
+    impl<'a, T: PartialOrd> PartialOrd for &'a [T] {
         fn lt(&self, other: & &'a [T]) -> bool {
             order::lt(self.iter(), other.iter())
         }
@@ -314,7 +314,7 @@ pub mod traits {
         }
     }
 
-    impl<T: Ord> Ord for ~[T] {
+    impl<T: PartialOrd> PartialOrd for ~[T] {
         #[inline]
         fn lt(&self, other: &~[T]) -> bool { self.as_slice() < other.as_slice() }
         #[inline]
@@ -692,8 +692,8 @@ impl<'a,T> ImmutableVector<'a, T> for &'a [T] {
     }
 }
 
-/// Extension methods for vectors contain `Eq` elements.
-pub trait ImmutableEqVector<T:Eq> {
+/// Extension methods for vectors contain `PartialEq` elements.
+pub trait ImmutableEqVector<T:PartialEq> {
     /// Find the first index containing a matching value
     fn position_elem(&self, t: &T) -> Option<uint>;
 
@@ -710,7 +710,7 @@ pub trait ImmutableEqVector<T:Eq> {
     fn ends_with(&self, needle: &[T]) -> bool;
 }
 
-impl<'a,T:Eq> ImmutableEqVector<T> for &'a [T] {
+impl<'a,T:PartialEq> ImmutableEqVector<T> for &'a [T] {
     #[inline]
     fn position_elem(&self, x: &T) -> Option<uint> {
         self.iter().position(|y| *x == *y)