diff options
Diffstat (limited to 'src/tools/clippy/src/docs/identity_op.txt')
-rw-r--r-- | src/tools/clippy/src/docs/identity_op.txt | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/tools/clippy/src/docs/identity_op.txt b/src/tools/clippy/src/docs/identity_op.txt new file mode 100644 index 000000000..a8e40bb43 --- /dev/null +++ b/src/tools/clippy/src/docs/identity_op.txt @@ -0,0 +1,11 @@ +### What it does +Checks for identity operations, e.g., `x + 0`. + +### Why is this bad? +This code can be removed without changing the +meaning. So it just obscures what's going on. Delete it mercilessly. + +### Example +``` +x / 1 + 0 * 1 - 0 | 0; +```
\ No newline at end of file |