rust/tests/ui/double_neg.rs

11 lines
111 B
Rust
Raw Normal View History

2018-07-28 10:34:52 -05:00
#![feature(tool_lints)]
2017-09-18 05:47:33 -05:00
2018-07-28 10:34:52 -05:00
#[warn(clippy::double_neg)]
2016-06-29 18:00:25 -05:00
fn main() {
let x = 1;
-x;
-(-x);
2017-02-08 07:58:07 -06:00
--x;
2016-06-29 18:00:25 -05:00
}