rust/tests/ui/double_neg.rs

11 lines
80 B
Rust
Raw Normal View History

2017-09-18 12:47:33 +02:00
2016-06-30 01:00:25 +02:00
#[warn(double_neg)]
2016-06-30 01:00:25 +02:00
fn main() {
let x = 1;
-x;
-(-x);
2017-02-08 14:58:07 +01:00
--x;
2016-06-30 01:00:25 +02:00
}