Skip to content

Commit

Permalink
Rollup merge of rust-lang#66779 - guanqun:reorder-funcs, r=Dylan-DPC
Browse files Browse the repository at this point in the history
follow the same function order in the trait

With this change, the function order in both traits and implementation matches.

And this fix removes several warnings in IDE.
  • Loading branch information
tmandry authored Nov 26, 2019
2 parents 339d717 + 55d7258 commit 84a2d66
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/libcore/cmp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -464,9 +464,9 @@ impl<T: PartialOrd> PartialOrd for Reverse<T> {
#[inline]
fn le(&self, other: &Self) -> bool { other.0 <= self.0 }
#[inline]
fn ge(&self, other: &Self) -> bool { other.0 >= self.0 }
#[inline]
fn gt(&self, other: &Self) -> bool { other.0 > self.0 }
#[inline]
fn ge(&self, other: &Self) -> bool { other.0 >= self.0 }
}

#[stable(feature = "reverse_cmp_key", since = "1.19.0")]
Expand Down Expand Up @@ -1176,9 +1176,9 @@ mod impls {
#[inline]
fn le(&self, other: & &B) -> bool { PartialOrd::le(*self, *other) }
#[inline]
fn ge(&self, other: & &B) -> bool { PartialOrd::ge(*self, *other) }
#[inline]
fn gt(&self, other: & &B) -> bool { PartialOrd::gt(*self, *other) }
#[inline]
fn ge(&self, other: & &B) -> bool { PartialOrd::ge(*self, *other) }
}
#[stable(feature = "rust1", since = "1.0.0")]
impl<A: ?Sized> Ord for &A where A: Ord {
Expand Down Expand Up @@ -1208,9 +1208,9 @@ mod impls {
#[inline]
fn le(&self, other: &&mut B) -> bool { PartialOrd::le(*self, *other) }
#[inline]
fn ge(&self, other: &&mut B) -> bool { PartialOrd::ge(*self, *other) }
#[inline]
fn gt(&self, other: &&mut B) -> bool { PartialOrd::gt(*self, *other) }
#[inline]
fn ge(&self, other: &&mut B) -> bool { PartialOrd::ge(*self, *other) }
}
#[stable(feature = "rust1", since = "1.0.0")]
impl<A: ?Sized> Ord for &mut A where A: Ord {
Expand Down

0 comments on commit 84a2d66

Please sign in to comment.