Skip to content

libcore: rename private cmp macros #16470

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions src/libcore/cmp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -293,18 +293,18 @@ mod impls {
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 {
Expand Down Expand Up @@ -345,9 +345,9 @@ mod impls {
}
}

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 {
Expand Down Expand Up @@ -375,7 +375,7 @@ mod impls {
}
}

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."]
Expand Down