Skip to content

Commit 18f47d8

Browse files
author
Ayush Kumar Mishra
committed
Misleading documentation for derived Ord/PartialOrd implementation for enums rust-lang#75620
1 parent e482c86 commit 18f47d8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

library/core/src/cmp.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ impl<T: Ord> Ord for Reverse<T> {
505505
///
506506
/// This trait can be used with `#[derive]`. When `derive`d on structs, it will produce a
507507
/// lexicographic ordering based on the top-to-bottom declaration order of the struct's members.
508-
/// When `derive`d on enums, variants are ordered by their top-to-bottom declaration order.
508+
/// When `derive`d on enums, variants are ordered by their top-to-bottom discriminant order.
509509
///
510510
/// ## How can I implement `Ord`?
511511
///
@@ -694,7 +694,7 @@ impl PartialOrd for Ordering {
694694
///
695695
/// This trait can be used with `#[derive]`. When `derive`d on structs, it will produce a
696696
/// lexicographic ordering based on the top-to-bottom declaration order of the struct's members.
697-
/// When `derive`d on enums, variants are ordered by their top-to-bottom declaration order.
697+
/// When `derive`d on enums, variants are ordered by their top-to-bottom discriminant order.
698698
///
699699
/// ## How can I implement `PartialOrd`?
700700
///

0 commit comments

Comments
 (0)