]> git.lizzy.rs Git - rust.git/blob - tests/compile-fail/if_not_else.rs
Lint literal suffixes not separated by underscores (see #703)
[rust.git] / tests / compile-fail / if_not_else.rs
1 #![feature(plugin)]
2 #![plugin(clippy)]
3 #![deny(clippy)]
4 #![deny(if_not_else)]
5
6 fn bla() -> bool { unimplemented!() }
7
8 fn main() {
9     if !bla() { //~ ERROR: Unnecessary boolean `not` operation
10         println!("Bugs");
11     } else {
12         println!("Bunny");
13     }
14     if 4 != 5 { //~ ERROR: Unnecessary `!=` operation
15         println!("Bugs");
16     } else {
17         println!("Bunny");
18     }
19 }