Skip to content

Commit 7bbf914

Browse files
committed
Clarify #[derive(PartialEq)] on enums
Fixes #97945
1 parent ec55c61 commit 7bbf914

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

library/core/src/cmp.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ use self::Ordering::*;
6161
///
6262
/// This trait can be used with `#[derive]`. When `derive`d on structs, two
6363
/// instances are equal if all fields are equal, and not equal if any fields
64-
/// are not equal. When `derive`d on enums, each variant is equal to itself
65-
/// and not equal to the other variants.
64+
/// are not equal. When `derive`d on enums, two instances are equal if they
65+
/// are the same variant and all fields are equal.
6666
///
6767
/// ## How can I implement `PartialEq`?
6868
///

0 commit comments

Comments
 (0)