diff options
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/cmp.rs | 2 | ||||
| -rw-r--r-- | src/libcore/ptr.rs | 4 | ||||
| -rw-r--r-- | src/libcore/slice.rs | 6 | ||||
| -rw-r--r-- | src/libcore/str.rs | 2 |
4 files changed, 11 insertions, 3 deletions
diff --git a/src/libcore/cmp.rs b/src/libcore/cmp.rs index d5001a08b1d..df19256471e 100644 --- a/src/libcore/cmp.rs +++ b/src/libcore/cmp.rs @@ -240,7 +240,7 @@ pub trait PartialOrd<Sized? Rhs = Self> for Sized?: PartialEq<Rhs> { /// of different types. The most common use case for this relation is /// container types; e.g. it is often desirable to be able to use `&str` /// values to look up entries in a container with `String` keys. -#[experimental = "Better solutions may be discovered."] +#[deprecated = "Use overloaded core::cmp::PartialEq"] pub trait Equiv<Sized? T> for Sized? { /// Implement this function to decide equivalent values. fn equiv(&self, other: &T) -> bool; diff --git a/src/libcore/ptr.rs b/src/libcore/ptr.rs index 5e2f5529e8d..416bc4588b4 100644 --- a/src/libcore/ptr.rs +++ b/src/libcore/ptr.rs @@ -321,12 +321,16 @@ impl<T> PartialEq for *mut T { impl<T> Eq for *mut T {} // Equivalence for pointers +#[allow(deprecated)] +#[deprecated = "Use overloaded `core::cmp::PartialEq`"] impl<T> Equiv<*mut T> for *const T { fn equiv(&self, other: &*mut T) -> bool { self.to_uint() == other.to_uint() } } +#[allow(deprecated)] +#[deprecated = "Use overloaded `core::cmp::PartialEq`"] impl<T> Equiv<*const T> for *mut T { fn equiv(&self, other: &*const T) -> bool { self.to_uint() == other.to_uint() diff --git a/src/libcore/slice.rs b/src/libcore/slice.rs index 12cd20584a1..85bd6adf8b8 100644 --- a/src/libcore/slice.rs +++ b/src/libcore/slice.rs @@ -1816,13 +1816,15 @@ impl<A, B> PartialEq<[B]> for [A] where A: PartialEq<B> { #[unstable = "waiting for DST"] impl<T: Eq> Eq for [T] {} -#[unstable = "waiting for DST"] +#[allow(deprecated)] +#[deprecated = "Use overloaded `core::cmp::PartialEq`"] impl<T: PartialEq, Sized? V: AsSlice<T>> Equiv<V> for [T] { #[inline] fn equiv(&self, other: &V) -> bool { self.as_slice() == other.as_slice() } } -#[unstable = "waiting for DST"] +#[allow(deprecated)] +#[deprecated = "Use overloaded `core::cmp::PartialEq`"] impl<'a,T:PartialEq, Sized? V: AsSlice<T>> Equiv<V> for &'a mut [T] { #[inline] fn equiv(&self, other: &V) -> bool { self.as_slice() == other.as_slice() } diff --git a/src/libcore/str.rs b/src/libcore/str.rs index b9586399aec..4be628f0ac3 100644 --- a/src/libcore/str.rs +++ b/src/libcore/str.rs @@ -1248,6 +1248,8 @@ pub mod traits { } } + #[allow(deprecated)] + #[deprecated = "Use overloaded `core::cmp::PartialEq`"] impl<S: Str> Equiv<S> for str { #[inline] fn equiv(&self, other: &S) -> bool { eq_slice(self, other.as_slice()) } |
