about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-05-28 10:00:00 -0700
committerAlex Crichton <alex@alexcrichton.com>2014-05-28 10:02:06 -0700
commitf786f9bb15dd4436d04a89898f5dc51707b5d435 (patch)
treeb32a2528ed3f65a6a74c325148bd5eb0583e025a /src/libcore
parent24b1ce1daf9dbf66d04116d0549a48a7610bc614 (diff)
rustc: Accept PartialOrd/PartialOrdEq for Eq/Ord
This is a transitionary step towards completing #12517. This change modifies the
compiler to accept Partial{Ord,Eq} as deriving modes which will currently expand
to implementations of PartialOrd and PartialEq (synonyms for Eq/Ord).

After a snapshot, all of deriving(Eq, Ord) will be removed, and after a snapshot
of that, TotalEq/TotalOrd will be renamed to Eq/Ord.
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/cmp.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libcore/cmp.rs b/src/libcore/cmp.rs
index 269dfa496eb..dc8c2ac68b2 100644
--- a/src/libcore/cmp.rs
+++ b/src/libcore/cmp.rs
@@ -37,6 +37,9 @@
 //! assert!(SketchyNum {num: 25} != SketchyNum {num: 57});
 //! ```
 
+pub use PartialEq = cmp::Eq;
+pub use PartialOrd = cmp::Ord;
+
 /// Trait for values that can be compared for equality and inequality.
 ///
 /// This trait allows partial equality, where types can be unordered instead of