Skip to content

Commit 981cff3

Browse files
committed
fixup! docs: Correct terminology in std::cmp
In `std::cmp` module documentation, avoid claiming that `PartialEq` corresponds to partial equivalence relations (except when `Rhs` is `Self`).
1 parent 8dc068e commit 981cff3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

library/core/src/cmp.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
//! This module contains various tools for comparing and ordering values. In
44
//! summary:
55
//!
6-
//! * [`Eq`] and [`PartialEq`] correspond to equivalence relations and partial
7-
//! equivalence relations, respectively. Implementing these traits for types
8-
//! provides the `==` and `!=` operators for those types.
9-
//! Implementing `Eq` (in addition to `PartialEq`) indicates that `a == a` is
10-
//! `true` for every `a` (according to an equivalence relation).
6+
//! * [`PartialEq<Rhs>`] overloads the `==` and `!=` operators. In cases where
7+
//! `Rhs` (the right hand side's type) is `Self`, this corresponds to a
8+
//! partial equivalence relation.
9+
//! * [`Eq`] indicates that the overloaded `==` operator corresponds to an
10+
//! equivalence relation.
1111
//! * [`Ord`] and [`PartialOrd`] are traits that allow you to define total and
1212
//! partial orderings between values, respectively. Implementing them overloads
1313
//! the `<`, `<=`, `>`, and `>=` operators.

0 commit comments

Comments
 (0)