diff --git a/library/core/src/cmp.rs b/library/core/src/cmp.rs index bffd3b2af97..dd0d59f6035 100644 --- a/library/core/src/cmp.rs +++ b/library/core/src/cmp.rs @@ -710,7 +710,8 @@ fn clone_from(&mut self, other: &Self) { /// [lexicographic](https://en.wikipedia.org/wiki/Lexicographic_order) ordering /// based on the top-to-bottom declaration order of the struct's members. /// -/// When `derive`d on enums, variants are ordered by their discriminants. +/// When `derive`d on enums, variants are ordered primarily by their discriminants. +/// Secondarily, they are ordered by their fields. /// By default, the discriminant is smallest for variants at the top, and /// largest for variants at the bottom. Here's an example: /// @@ -963,7 +964,8 @@ fn clamp(self, min: Self, max: Self) -> Self /// [lexicographic](https://en.wikipedia.org/wiki/Lexicographic_order) ordering /// based on the top-to-bottom declaration order of the struct's members. /// -/// When `derive`d on enums, variants are ordered by their discriminants. +/// When `derive`d on enums, variants are primarily ordered by their discriminants. +/// Secondarily, they are ordered by their fields. /// By default, the discriminant is smallest for variants at the top, and /// largest for variants at the bottom. Here's an example: ///