mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-29 02:03:53 +00:00
38d4ac7cea
Discussion previously happened in https://github.com/rust-lang/rust/pull/43498
16 lines
167 B
Rust
16 lines
167 B
Rust
#![warn(clippy::short_circuit_statement)]
|
|
|
|
fn main() {
|
|
f() && g();
|
|
f() || g();
|
|
1 == 2 || g();
|
|
}
|
|
|
|
fn f() -> bool {
|
|
true
|
|
}
|
|
|
|
fn g() -> bool {
|
|
false
|
|
}
|