mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-30 14:52:56 +03:00
Rollup merge of #97950 - eggyal:issue-97945, r=Dylan-DPC
Clarify `#[derive(PartialEq)]` on enums Fixes #97945
This commit is contained in:
@@ -61,8 +61,8 @@
|
||||
///
|
||||
/// 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`?
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user