Skip to content

Commit f187573

Browse files
committed
auto merge of #18795 : haberman/rust/master, r=cmr
Previously Int inherited from PartialOrd (via Primitive) but not Ord. But integers have a total order, so inheriting from Ord is appropriate. Fixes #18776.
2 parents 221115c + a7533b8 commit f187573

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/libcore/num/mod.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use {int, i8, i16, i32, i64};
1919
use {uint, u8, u16, u32, u64};
2020
use {f32, f64};
2121
use clone::Clone;
22-
use cmp::{PartialEq, PartialOrd};
22+
use cmp::{Ord, PartialEq, PartialOrd};
2323
use kinds::Copy;
2424
use mem::size_of;
2525
use ops::{Add, Sub, Mul, Div, Rem, Neg};
@@ -386,6 +386,7 @@ trait_impl!(Primitive for uint u8 u16 u32 u64 int i8 i16 i32 i64 f32 f64)
386386
/// A primitive signed or unsigned integer equipped with various bitwise
387387
/// operators, bit counting methods, and endian conversion functions.
388388
pub trait Int: Primitive
389+
+ Ord
389390
+ CheckedAdd
390391
+ CheckedSub
391392
+ CheckedMul

0 commit comments

Comments
 (0)