]> git.lizzy.rs Git - rust.git/blob - src/docs/op_ref.txt
[Arithmetic] Consider literals
[rust.git] / src / docs / op_ref.txt
1 ### What it does
2 Checks for arguments to `==` which have their address
3 taken to satisfy a bound
4 and suggests to dereference the other argument instead
5
6 ### Why is this bad?
7 It is more idiomatic to dereference the other argument.
8
9 ### Example
10 ```
11 &x == y
12 ```
13
14 Use instead:
15 ```
16 x == *y
17 ```