diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-05-29 17:45:07 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-05-30 15:52:24 -0700 |
| commit | 748bc3ca49de8ab0b890726120c40567094e43fc (patch) | |
| tree | a205dcd5582cbecbb1a02fa3ed1ebfdcc85ff881 /src/libcore/ptr.rs | |
| parent | f4fa7c8a07a96cc9d0aae0bfc6515fb747f25341 (diff) | |
| download | rust-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/ptr.rs')
| -rw-r--r-- | src/libcore/ptr.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/libcore/ptr.rs b/src/libcore/ptr.rs index 34596480273..442838b3d08 100644 --- a/src/libcore/ptr.rs +++ b/src/libcore/ptr.rs @@ -93,7 +93,7 @@ use intrinsics; use iter::{range, Iterator}; use option::{Some, None, Option}; -#[cfg(not(test))] use cmp::{Eq, TotalEq, Ord, Equiv}; +#[cfg(not(test))] use cmp::{PartialEq, TotalEq, PartialOrd, Equiv}; /// Return the offset of the first null pointer in `buf`. #[inline] @@ -386,7 +386,7 @@ impl<T> RawPtr<T> for *mut T { // Equality for pointers #[cfg(not(test))] -impl<T> Eq for *T { +impl<T> PartialEq for *T { #[inline] fn eq(&self, other: &*T) -> bool { *self == *other @@ -399,7 +399,7 @@ impl<T> Eq for *T { impl<T> TotalEq for *T {} #[cfg(not(test))] -impl<T> Eq for *mut T { +impl<T> PartialEq for *mut T { #[inline] fn eq(&self, other: &*mut T) -> bool { *self == *other @@ -430,9 +430,9 @@ impl<T> Equiv<*T> for *mut T { #[cfg(not(test))] mod externfnpointers { use mem; - use cmp::Eq; + use cmp::PartialEq; - impl<_R> Eq for extern "C" fn() -> _R { + impl<_R> PartialEq for extern "C" fn() -> _R { #[inline] fn eq(&self, other: &extern "C" fn() -> _R) -> bool { let self_: *() = unsafe { mem::transmute(*self) }; @@ -442,7 +442,7 @@ mod externfnpointers { } macro_rules! fnptreq( ($($p:ident),*) => { - impl<_R,$($p),*> Eq for extern "C" fn($($p),*) -> _R { + impl<_R,$($p),*> PartialEq for extern "C" fn($($p),*) -> _R { #[inline] fn eq(&self, other: &extern "C" fn($($p),*) -> _R) -> bool { let self_: *() = unsafe { mem::transmute(*self) }; @@ -461,13 +461,13 @@ mod externfnpointers { // Comparison for pointers #[cfg(not(test))] -impl<T> Ord for *T { +impl<T> PartialOrd for *T { #[inline] fn lt(&self, other: &*T) -> bool { *self < *other } } #[cfg(not(test))] -impl<T> Ord for *mut T { +impl<T> PartialOrd for *mut T { #[inline] fn lt(&self, other: &*mut T) -> bool { *self < *other } } |
