rust-clippy/tests/ui/if_not_else.rs
2018-08-29 11:08:29 -07:00

19 lines
307 B
Rust

#![feature(tool_lints)]
#![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");
}
}