summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/short_circuit_statement.fixed
blob: 1737d50144198808d8eab66e42e5f78e2b8e99b2 (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() {
    if f() { g(); }
    if !f() { g(); }
    if 1 != 2 { g(); }
}

fn f() -> bool {
    true
}

fn g() -> bool {
    false
}