]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/short_circuit_statement.fixed
Merge commit '35d9c6bf256968e1b40e0d554607928bdf9cebea' into sync_cg_clif-2022-02-23
[rust.git] / src / tools / clippy / tests / ui / short_circuit_statement.fixed
1 // run-rustfix
2
3 #![warn(clippy::short_circuit_statement)]
4 #![allow(clippy::nonminimal_bool)]
5
6 fn main() {
7     if f() { g(); }
8     if !f() { g(); }
9     if 1 != 2 { g(); }
10 }
11
12 fn f() -> bool {
13     true
14 }
15
16 fn g() -> bool {
17     false
18 }