]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/src/docs/erasing_op.txt
Auto merge of #98559 - jackh726:remove-reempty, r=oli-obk
[rust.git] / src / tools / clippy / src / docs / erasing_op.txt
1 ### What it does
2 Checks for erasing operations, e.g., `x * 0`.
3
4 ### Why is this bad?
5 The whole expression can be replaced by zero.
6 This is most likely not the intended outcome and should probably be
7 corrected
8
9 ### Example
10 ```
11 let x = 1;
12 0 / x;
13 0 * x;
14 x & 0;
15 ```