mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-27 15:11:30 +00:00
18 lines
371 B
Rust
18 lines
371 B
Rust
#![feature(plugin)]
|
|
#![plugin(clippy)]
|
|
#![deny(clippy)]
|
|
|
|
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");
|
|
}
|
|
}
|