From 18f47d81dae6740a4b62262cf2518ea1cfe19e62 Mon Sep 17 00:00:00 2001 From: Ayush Kumar Mishra Date: Sun, 23 Aug 2020 10:55:15 +0530 Subject: [PATCH] Misleading documentation for derived Ord/PartialOrd implementation for enums #75620 --- library/core/src/cmp.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/core/src/cmp.rs b/library/core/src/cmp.rs index e775ded60f5..ef691489f08 100644 --- a/library/core/src/cmp.rs +++ b/library/core/src/cmp.rs @@ -505,7 +505,7 @@ impl Ord for Reverse { /// /// 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`? ///