about summary refs log tree commit diff
path: root/src/libcore/num/mod.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/num/mod.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/num/mod.rs')
-rw-r--r--src/libcore/num/mod.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libcore/num/mod.rs b/src/libcore/num/mod.rs
index fe3f07c6024..a80b20775de 100644
--- a/src/libcore/num/mod.rs
+++ b/src/libcore/num/mod.rs
@@ -17,7 +17,7 @@ use {int, i8, i16, i32, i64};
 use {uint, u8, u16, u32, u64};
 use {f32, f64};
 use clone::Clone;
-use cmp::{Eq, Ord};
+use cmp::{PartialEq, PartialOrd};
 use kinds::Copy;
 use mem::size_of;
 use ops::{Add, Sub, Mul, Div, Rem, Neg};
@@ -25,7 +25,7 @@ use ops::{Not, BitAnd, BitOr, BitXor, Shl, Shr};
 use option::{Option, Some, None};
 
 /// The base trait for numeric types
-pub trait Num: Eq + Zero + One
+pub trait Num: PartialEq + Zero + One
              + Neg<Self>
              + Add<Self,Self>
              + Sub<Self,Self>
@@ -495,7 +495,7 @@ pub trait Primitive: Copy
                    + Clone
                    + Num
                    + NumCast
-                   + Ord
+                   + PartialOrd
                    + Bounded {}
 
 trait_impl!(Primitive for uint u8 u16 u32 u64 int i8 i16 i32 i64 f32 f64)
@@ -1043,7 +1043,7 @@ pub trait Saturating {
     fn saturating_sub(self, v: Self) -> Self;
 }
 
-impl<T: CheckedAdd + CheckedSub + Zero + Ord + Bounded> Saturating for T {
+impl<T: CheckedAdd + CheckedSub + Zero + PartialOrd + Bounded> Saturating for T {
     #[inline]
     fn saturating_add(self, v: T) -> T {
         match self.checked_add(&v) {
@@ -1238,7 +1238,7 @@ pub fn test_num<T:Num + NumCast + ::std::fmt::Show>(ten: T, two: T) {
 }
 
 /// Used for representing the classification of floating point numbers
-#[deriving(Eq, Show)]
+#[deriving(PartialEq, Show)]
 pub enum FPCategory {
     /// "Not a Number", often obtained by dividing by zero
     FPNaN,