rust-clippy/tests/ui/if_not_else.rs

20 lines
308 B
Rust
Raw Normal View History

#![feature(plugin)]
#![plugin(clippy)]
#![deny(clippy)]
#![deny(if_not_else)]
fn bla() -> bool { unimplemented!() }
fn main() {
2017-02-08 13:58:07 +00:00
if !bla() {
println!("Bugs");
} else {
println!("Bunny");
}
2017-02-08 13:58:07 +00:00
if 4 != 5 {
println!("Bugs");
} else {
println!("Bunny");
}
}