about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2022-06-12 17:35:41 -0700
committerGitHub <noreply@github.com>2022-06-12 17:35:41 -0700
commit5dccf4e5fcbb49aa8da0d2186c26bbd00eb2a81f (patch)
tree41a941b0a651c19cd95871aa1a7c15c41d585e3f
parent6efaaed64b65cc271c0c0e6d0391fe02b2fd2523 (diff)
parent7bbf914078fe3124bc077ce4a52b793c93086c4d (diff)
downloadrust-5dccf4e5fcbb49aa8da0d2186c26bbd00eb2a81f.tar.gz
rust-5dccf4e5fcbb49aa8da0d2186c26bbd00eb2a81f.zip
Rollup merge of #97950 - eggyal:issue-97945, r=Dylan-DPC
Clarify `#[derive(PartialEq)]` on enums

Fixes #97945
-rw-r--r--library/core/src/cmp.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/core/src/cmp.rs b/library/core/src/cmp.rs
index 81aed8afd5b..064675ee7cf 100644
--- a/library/core/src/cmp.rs
+++ b/library/core/src/cmp.rs
@@ -61,8 +61,8 @@ use self::Ordering::*;
 ///
 /// This trait can be used with `#[derive]`. When `derive`d on structs, two
 /// instances are equal if all fields are equal, and not equal if any fields
-/// are not equal. When `derive`d on enums, each variant is equal to itself
-/// and not equal to the other variants.
+/// are not equal. When `derive`d on enums, two instances are equal if they
+/// are the same variant and all fields are equal.
 ///
 /// ## How can I implement `PartialEq`?
 ///