mirror of
https://github.com/rust-lang/rust
synced 2024-10-14 12:33:57 +00:00
Rollup merge of #75826 - ayushmishra2005:misleading_documentation_for_derived_Ord_PartialOrd, r=KodrAus
Corrected Misleading documentation for derived Ord/PartialOrd implementation Corrected Misleading documentation for derived Ord/PartialOrd implementation Fixes #75620
This commit is contained in:
commit
427e969c43
|
@ -505,7 +505,7 @@ fn cmp(&self, other: &Reverse<T>) -> Ordering {
|
|||
///
|
||||
/// This trait can be used with `#[derive]`. When `derive`d on structs, it will produce a
|
||||
/// lexicographic ordering based on the top-to-bottom declaration order of the struct's members.
|
||||
/// When `derive`d on enums, variants are ordered by their top-to-bottom declaration order.
|
||||
/// When `derive`d on enums, variants are ordered by their top-to-bottom discriminant order.
|
||||
///
|
||||
/// ## How can I implement `Ord`?
|
||||
///
|
||||
|
@ -694,7 +694,7 @@ fn partial_cmp(&self, other: &Ordering) -> Option<Ordering> {
|
|||
///
|
||||
/// This trait can be used with `#[derive]`. When `derive`d on structs, it will produce a
|
||||
/// lexicographic ordering based on the top-to-bottom declaration order of the struct's members.
|
||||
/// When `derive`d on enums, variants are ordered by their top-to-bottom declaration order.
|
||||
/// When `derive`d on enums, variants are ordered by their top-to-bottom discriminant order.
|
||||
///
|
||||
/// ## How can I implement `PartialOrd`?
|
||||
///
|
||||
|
|
Loading…
Reference in a new issue