about summary refs log tree commit diff
path: root/src/libcore/cmp.rs
diff options
context:
space:
mode:
authorFelix S. Klock II <pnkfelix@pnkfx.org>2015-02-18 14:39:06 +0100
committerFelix S. Klock II <pnkfelix@pnkfx.org>2015-02-18 14:39:06 +0100
commit343909bca1a3903bc6df51007723601ac5a103c0 (patch)
treec57da285d5ace3c531ed0f115521681fcd067e9c /src/libcore/cmp.rs
parentf82e2310b3b35bc1d137712576d2d16b82e03fcb (diff)
downloadrust-343909bca1a3903bc6df51007723601ac5a103c0.tar.gz
rust-343909bca1a3903bc6df51007723601ac5a103c0.zip
Audit `core::cmp` for `int/uint`.
* cast 3-valued `core::cmp::Ordering` to `i32`, not `int`.

* use `isize`/`usize` in the impl macros.
Diffstat (limited to 'src/libcore/cmp.rs')
-rw-r--r--src/libcore/cmp.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libcore/cmp.rs b/src/libcore/cmp.rs
index 19ec245300d..b37bad5f754 100644
--- a/src/libcore/cmp.rs
+++ b/src/libcore/cmp.rs
@@ -215,7 +215,7 @@ impl Ord for Ordering {
     #[inline]
     #[stable(feature = "rust1", since = "1.0.0")]
     fn cmp(&self, other: &Ordering) -> Ordering {
-        (*self as int).cmp(&(*other as int))
+        (*self as i32).cmp(&(*other as i32))
     }
 }
 
@@ -224,7 +224,7 @@ impl PartialOrd for Ordering {
     #[inline]
     #[stable(feature = "rust1", since = "1.0.0")]
     fn partial_cmp(&self, other: &Ordering) -> Option<Ordering> {
-        (*self as int).partial_cmp(&(*other as int))
+        (*self as i32).partial_cmp(&(*other as i32))
     }
 }
 
@@ -482,7 +482,7 @@ mod impls {
     }
 
     partial_eq_impl! {
-        bool char uint u8 u16 u32 u64 int i8 i16 i32 i64 f32 f64
+        bool char usize u8 u16 u32 u64 isize i8 i16 i32 i64 f32 f64
     }
 
     macro_rules! eq_impl {
@@ -492,7 +492,7 @@ mod impls {
         )*)
     }
 
-    eq_impl! { () bool char uint u8 u16 u32 u64 int i8 i16 i32 i64 }
+    eq_impl! { () bool char usize u8 u16 u32 u64 isize i8 i16 i32 i64 }
 
     macro_rules! partial_ord_impl {
         ($($t:ty)*) => ($(
@@ -535,7 +535,7 @@ mod impls {
         }
     }
 
-    partial_ord_impl! { char uint u8 u16 u32 u64 int i8 i16 i32 i64 f32 f64 }
+    partial_ord_impl! { char usize u8 u16 u32 u64 isize i8 i16 i32 i64 f32 f64 }
 
     macro_rules! ord_impl {
         ($($t:ty)*) => ($(
@@ -565,7 +565,7 @@ mod impls {
         }
     }
 
-    ord_impl! { char uint u8 u16 u32 u64 int i8 i16 i32 i64 }
+    ord_impl! { char usize u8 u16 u32 u64 isize i8 i16 i32 i64 }
 
     // & pointers