rust-clippy/tests/ui/if_not_else.rs
2017-10-03 12:07:24 +02:00

19 lines
271 B
Rust

#![warn(clippy)]
#![warn(if_not_else)]
fn bla() -> bool { unimplemented!() }
fn main() {
if !bla() {
println!("Bugs");
} else {
println!("Bunny");
}
if 4 != 5 {
println!("Bugs");
} else {
println!("Bunny");
}
}