]> git.lizzy.rs Git - rust.git/blob - tests/ui/unit_cmp.rs
Move all our tests back to ui tests
[rust.git] / tests / ui / unit_cmp.rs
1 #![feature(plugin)]
2 #![plugin(clippy)]
3
4 #![warn(unit_cmp)]
5 #![allow(no_effect, unnecessary_operation)]
6
7 #[derive(PartialEq)]
8 pub struct ContainsUnit(()); // should be fine
9
10 fn main() {
11     // this is fine
12     if true == false {
13     }
14
15     // this warns
16     if { true; } == { false; } {
17     }
18
19     if { true; } > { false; } {
20     }
21 }