mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-02 13:07:37 +00:00
10 lines
205 B
Rust
10 lines
205 B
Rust
![]() |
//@ 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
|
||
|
}
|