Skip to content

Commit 427e969

Browse files
authored
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
2 parents b8e456f + 18f47d8 commit 427e969

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)