rust-clippy/tests/ui/double_neg.rs

8 lines
85 B
Rust
Raw Normal View History

2018-07-28 15:34:52 +00:00
#[warn(clippy::double_neg)]
2016-06-29 23:00:25 +00:00
fn main() {
let x = 1;
-x;
-(-x);
2017-02-08 13:58:07 +00:00
--x;
2016-06-29 23:00:25 +00:00
}