Skip to content

Commit

Permalink
Rollup merge of #97950 - eggyal:issue-97945, r=Dylan-DPC
Browse files Browse the repository at this point in the history
Clarify `#[derive(PartialEq)]` on enums

Fixes #97945
  • Loading branch information
compiler-errors authored Jun 13, 2022
2 parents 6efaaed + 7bbf914 commit 5dccf4e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions library/core/src/cmp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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`?
///
Expand Down

0 comments on commit 5dccf4e

Please sign in to comment.