Skip to content

Commit

Permalink
auto merge of #18795 : haberman/rust/master, r=cmr
Browse files Browse the repository at this point in the history
Previously Int inherited from PartialOrd (via Primitive)
but not Ord.  But integers have a total order, so
inheriting from Ord is appropriate. Fixes #18776.
  • Loading branch information
bors committed Nov 10, 2014
2 parents 221115c + a7533b8 commit f187573
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/libcore/num/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use {int, i8, i16, i32, i64};
use {uint, u8, u16, u32, u64};
use {f32, f64};
use clone::Clone;
use cmp::{PartialEq, PartialOrd};
use cmp::{Ord, PartialEq, PartialOrd};
use kinds::Copy;
use mem::size_of;
use ops::{Add, Sub, Mul, Div, Rem, Neg};
Expand Down Expand Up @@ -386,6 +386,7 @@ trait_impl!(Primitive for uint u8 u16 u32 u64 int i8 i16 i32 i64 f32 f64)
/// A primitive signed or unsigned integer equipped with various bitwise
/// operators, bit counting methods, and endian conversion functions.
pub trait Int: Primitive
+ Ord
+ CheckedAdd
+ CheckedSub
+ CheckedMul
Expand Down

0 comments on commit f187573

Please sign in to comment.