summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/short_circuit_statement.rs
blob: 73a55bf1f5e27c077c081206069879a47d0cf4b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// run-rustfix

#![warn(clippy::short_circuit_statement)]
#![allow(clippy::nonminimal_bool)]

fn main() {
    f() && g();
    f() || g();
    1 == 2 || g();
}

fn f() -> bool {
    true
}

fn g() -> bool {
    false
}