]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/suspicious_unary_op_formatting.rs
Auto merge of #102717 - beetrees:repr128-c-style-debuginfo, r=nagisa
[rust.git] / src / tools / clippy / tests / ui / suspicious_unary_op_formatting.rs
1 #![warn(clippy::suspicious_unary_op_formatting)]
2
3 #[rustfmt::skip]
4 fn main() {
5     // weird binary operator formatting:
6     let a = 42;
7
8     if a >- 30 {}
9     if a >=- 30 {}
10
11     let b = true;
12     let c = false;
13
14     if b &&! c {}
15
16     if a >-   30 {}
17
18     // those are ok:
19     if a >-30 {}
20     if a < -30 {}
21     if b && !c {}
22     if a > -   30 {}
23 }