]> git.lizzy.rs Git - rust.git/commitdiff
libcore: rename private cmp macros
authorLiigo Zhuang <com.liigo@gmail.com>
Wed, 13 Aug 2014 03:41:29 +0000 (11:41 +0800)
committerLiigo Zhuang <com.liigo@gmail.com>
Wed, 13 Aug 2014 03:41:29 +0000 (11:41 +0800)
eq_impl! => partial_eq_impl!
totaleq_impl! => eq_impl!
ord_impl! => partial_ord_impl!
totalord_impl! => ord_impl!

src/libcore/cmp.rs

index a2537a1281e918480763f5db85ac022391819eb3..bfd10c835e2061a64b71e5d3bfa13f8172bd894a 100644 (file)
@@ -273,7 +273,7 @@ mod impls {
               Less, Greater, Equal};
     use option::{Option, Some, None};
 
-    macro_rules! eq_impl(
+    macro_rules! partial_eq_impl(
         ($($t:ty)*) => ($(
             #[unstable = "Trait is unstable."]
             impl PartialEq for $t {
@@ -293,18 +293,18 @@ fn eq(&self, _other: &()) -> bool { true }
         fn ne(&self, _other: &()) -> bool { false }
     }
 
-    eq_impl!(bool char uint u8 u16 u32 u64 int i8 i16 i32 i64 f32 f64)
+    partial_eq_impl!(bool char uint u8 u16 u32 u64 int i8 i16 i32 i64 f32 f64)
 
-    macro_rules! totaleq_impl(
+    macro_rules! eq_impl(
         ($($t:ty)*) => ($(
             #[unstable = "Trait is unstable."]
             impl Eq for $t {}
         )*)
     )
 
-    totaleq_impl!(() bool char uint u8 u16 u32 u64 int i8 i16 i32 i64)
+    eq_impl!(() bool char uint u8 u16 u32 u64 int i8 i16 i32 i64)
 
-    macro_rules! ord_impl(
+    macro_rules! partial_ord_impl(
         ($($t:ty)*) => ($(
             #[unstable = "Trait is unstable."]
             impl PartialOrd for $t {
@@ -345,9 +345,9 @@ fn partial_cmp(&self, other: &bool) -> Option<Ordering> {
         }
     }
 
-    ord_impl!(char uint u8 u16 u32 u64 int i8 i16 i32 i64 f32 f64)
+    partial_ord_impl!(char uint u8 u16 u32 u64 int i8 i16 i32 i64 f32 f64)
 
-    macro_rules! totalord_impl(
+    macro_rules! ord_impl(
         ($($t:ty)*) => ($(
             #[unstable = "Trait is unstable."]
             impl Ord for $t {
@@ -375,7 +375,7 @@ fn cmp(&self, other: &bool) -> Ordering {
         }
     }
 
-    totalord_impl!(char uint u8 u16 u32 u64 int i8 i16 i32 i64)
+    ord_impl!(char uint u8 u16 u32 u64 int i8 i16 i32 i64)
 
     // & pointers
     #[unstable = "Trait is unstable."]