about summary refs log tree commit diff
path: root/tests/ui/lint/lint-double-negations.rs
blob: 43e61dd7c1327f2439b3d8fc394af8b4fc552db4 (plain)
1
2
3
4
5
6
7
8
9
//@ check-pass
fn main() {
    let x = 1;
    -x;
    -(-x);
    --x; //~ WARN use of a double negation
    ---x; //~ WARN use of a double negation
    let _y = --(-x); //~ WARN use of a double negation
}