We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 92221ab commit 6b3d380Copy full SHA for 6b3d380
src/libcore/cmp.rs
@@ -43,8 +43,10 @@
43
/// equivalence relation. For example, in floating point numbers `NaN != NaN`,
44
/// so floating point types implement `PartialEq` but not `Eq`.
45
///
46
-/// PartialEq only requires the `eq` method to be implemented; `ne` is its
47
-/// negation by default.
+/// PartialEq only requires the `eq` method to be implemented; `ne` is defined
+/// in terms of it by default. Any manual implementation of `ne` *must* respect
48
+/// the rule that `eq` is a strict inverse of `ne`; that is, `!(a == b)` if and
49
+/// only if `a != b`.
50
51
/// Eventually, this will be implemented by default for types that implement
52
/// `Eq`.
0 commit comments