]> git.lizzy.rs Git - rust.git/blob - tests/ui/unit_cmp.rs
Adapt the *.stderr files of the ui-tests to the tool_lints
[rust.git] / tests / ui / unit_cmp.rs
1 #![feature(tool_lints)]
2
3
4 #![warn(clippy::unit_cmp)]
5 #![allow(clippy::no_effect, clippy::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 }