rust/tests/ui/short_circuit_statement.rs

28 lines
208 B
Rust
Raw Normal View History

#![feature(plugin)]
#![plugin(clippy)]
#![deny(short_circuit_statement)]
fn main() {
f() && g();
2017-02-08 07:58:07 -06:00
f() || g();
2017-02-08 07:58:07 -06:00
1 == 2 || g();
2017-02-08 07:58:07 -06:00
}
fn f() -> bool {
true
}
fn g() -> bool {
false
}