rust-clippy/tests/ui/if_not_else.rs
2019-01-08 21:46:39 +01:00

19 lines
286 B
Rust

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