Skip to content

Commit 5aa7c6a

Browse files
numero-744Côme Allart
authored andcommitted
doc(core::cmp::Eq): fix definition of consistency
The definition did not match the one from PartialEq and was merged with the definition of symmetry.
1 parent e22c616 commit 5aa7c6a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

library/core/src/cmp.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,8 +280,9 @@ pub macro PartialEq($item:item) {
280280
/// The primary difference to [`PartialEq`] is the additional requirement for reflexivity. A type
281281
/// that implements [`PartialEq`] guarantees that for all `a`, `b` and `c`:
282282
///
283-
/// - symmetric: `a == b` implies `b == a` and `a != b` implies `!(a == b)`
283+
/// - symmetric: `a == b` implies `b == a`
284284
/// - transitive: `a == b` and `b == c` implies `a == c`
285+
/// - constistent: `a != b` if and only if `!(a == b)`
285286
///
286287
/// `Eq`, which builds on top of [`PartialEq`] also implies:
287288
///

0 commit comments

Comments
 (0)