summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/src/docs/op_ref.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/clippy/src/docs/op_ref.txt')
-rw-r--r--src/tools/clippy/src/docs/op_ref.txt17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/tools/clippy/src/docs/op_ref.txt b/src/tools/clippy/src/docs/op_ref.txt
new file mode 100644
index 000000000..7a7ed1bc9
--- /dev/null
+++ b/src/tools/clippy/src/docs/op_ref.txt
@@ -0,0 +1,17 @@
+### What it does
+Checks for arguments to `==` which have their address
+taken to satisfy a bound
+and suggests to dereference the other argument instead
+
+### Why is this bad?
+It is more idiomatic to dereference the other argument.
+
+### Example
+```
+&x == y
+```
+
+Use instead:
+```
+x == *y
+``` \ No newline at end of file