mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
Misleading documentation for derived Ord/PartialOrd implementation for enums #75620
This commit is contained in:
parent
e482c86b9d
commit
18f47d81da
@ -505,7 +505,7 @@ impl<T: Ord> Ord for Reverse<T> {
|
||||
///
|
||||
/// 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 @@ impl PartialOrd for 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 New Issue
Block a user