diff options
Diffstat (limited to '')
-rw-r--r-- | src/tools/clippy/src/docs/unnecessary_operation.txt | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/tools/clippy/src/docs/unnecessary_operation.txt b/src/tools/clippy/src/docs/unnecessary_operation.txt new file mode 100644 index 000000000..7f455e264 --- /dev/null +++ b/src/tools/clippy/src/docs/unnecessary_operation.txt @@ -0,0 +1,12 @@ +### What it does +Checks for expression statements that can be reduced to a +sub-expression. + +### Why is this bad? +Expressions by themselves often have no side-effects. +Having such expressions reduces readability. + +### Example +``` +compute_array()[0]; +```
\ No newline at end of file |