diff options
Diffstat (limited to 'src/docs/partialeq_ne_impl.txt')
| -rw-r--r-- | src/docs/partialeq_ne_impl.txt | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/src/docs/partialeq_ne_impl.txt b/src/docs/partialeq_ne_impl.txt deleted file mode 100644 index 78f55188bab..00000000000 --- a/src/docs/partialeq_ne_impl.txt +++ /dev/null @@ -1,18 +0,0 @@ -### What it does -Checks for manual re-implementations of `PartialEq::ne`. - -### Why is this bad? -`PartialEq::ne` is required to always return the -negated result of `PartialEq::eq`, which is exactly what the default -implementation does. Therefore, there should never be any need to -re-implement it. - -### Example -``` -struct Foo; - -impl PartialEq for Foo { - fn eq(&self, other: &Foo) -> bool { true } - fn ne(&self, other: &Foo) -> bool { !(self == other) } -} -``` \ No newline at end of file |
