rust/tests/ui/if_not_else.rs

20 lines
286 B
Rust
Raw Normal View History

2018-07-28 17:34:52 +02:00
#![warn(clippy::all)]
#![warn(clippy::if_not_else)]
2018-12-09 23:26:16 +01:00
fn bla() -> bool {
unimplemented!()
}
fn main() {
2017-02-08 14:58:07 +01:00
if !bla() {
println!("Bugs");
} else {
println!("Bunny");
}
2017-02-08 14:58:07 +01:00
if 4 != 5 {
println!("Bugs");
} else {
println!("Bunny");
}
}