mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-23 05:03:21 +00:00
19 lines
393 B
Rust
Executable file
19 lines
393 B
Rust
Executable file
#![feature(plugin)]
|
|
#![plugin(clippy)]
|
|
#![deny(clippy)]
|
|
#![deny(if_not_else)]
|
|
|
|
fn bla() -> bool { unimplemented!() }
|
|
|
|
fn main() {
|
|
if !bla() { //~ ERROR: Unnecessary boolean `not` operation
|
|
println!("Bugs");
|
|
} else {
|
|
println!("Bunny");
|
|
}
|
|
if 4 != 5 { //~ ERROR: Unnecessary `!=` operation
|
|
println!("Bugs");
|
|
} else {
|
|
println!("Bunny");
|
|
}
|
|
}
|