]> git.lizzy.rs Git - rust.git/blobdiff - src/eq_op.rs
added wiki comments + wiki-generating python script
[rust.git] / src / eq_op.rs
index 1d2146537c98424b42a8fb1fde0f55044e2dc1ef..282056e4eb4aa75062395189df051544fae8897d 100644 (file)
@@ -6,6 +6,13 @@
 use consts::constant;
 use utils::span_lint;
 
+/// **What it does:** This lint checks for equal operands to comparisons and bitwise binary operators (`&`, `|` and `^`). It is `Warn` by default.
+///
+/// **Why is this bad?** This is usually just a typo.
+///
+/// **Known problems:** False negatives: We had some false positives regarding calls (notably [racer](https://github.com/phildawes/racer) had one instance of `x.pop() && x.pop()`), so we removed matching any function or method calls. We may introduce a whitelist of known pure functions in the future.
+///
+/// **Example:** `x + 1 == x + 1`
 declare_lint! {
     pub EQ_OP,
     Warn,