]> git.lizzy.rs Git - rust.git/blob - src/docs/double_neg.txt
a07f67496d7ccec92f2b90254a8bb68bd0632a1c
[rust.git] / src / docs / double_neg.txt
1 ### What it does
2 Detects expressions of the form `--x`.
3
4 ### Why is this bad?
5 It can mislead C/C++ programmers to think `x` was
6 decremented.
7
8 ### Example
9 ```
10 let mut x = 3;
11 --x;
12 ```