Clarify #[derive(PartialEq)] on enums

Fixes #97945
This commit is contained in:
Alan Egerton 2022-06-10 16:26:00 +01:00
parent ec55c61305
commit 7bbf914078
No known key found for this signature in database
GPG key ID: 07CAC3CCA7E0643F

View file

@ -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`?
///