mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-22 18:15:07 +03:00
derive explanation for PartialOrd should match that for Ord
I think these just got out of sync, but both use a lexicographic ordering. Relevant commits in the history of these explanations: *8b81f76on 2015-06-30 *e22770bon 2016-02-09
This commit is contained in:
+2
-2
@@ -254,8 +254,8 @@ fn partial_cmp(&self, other: &Ordering) -> Option<Ordering> {
|
||||
/// total order. For example, for floating point numbers, `NaN < 0 == false` and `NaN >= 0 ==
|
||||
/// false` (cf. IEEE 754-2008 section 5.11).
|
||||
///
|
||||
/// This trait can be used with `#[derive]`. When `derive`d, it will produce an ordering
|
||||
/// based on the top-to-bottom declaration order of the struct's members.
|
||||
/// This trait can be used with `#[derive]`. When `derive`d, it will produce a lexicographic
|
||||
/// ordering based on the top-to-bottom declaration order of the struct's members.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user