]> git.lizzy.rs Git - rust.git/blob - tests/ui/short_circuit_statement.stderr
rustup and compile-fail -> ui test move
[rust.git] / tests / ui / short_circuit_statement.stderr
1 error: boolean short circuit operator in statement may be clearer using an explicit test
2  --> $DIR/short_circuit_statement.rs:7:5
3   |
4 7 |     f() && g();
5   |     ^^^^^^^^^^^
6   |
7 note: lint level defined here
8  --> $DIR/short_circuit_statement.rs:4:9
9   |
10 4 | #![deny(short_circuit_statement)]
11   |         ^^^^^^^^^^^^^^^^^^^^^^^
12 help: replace it with
13   |     if f() { g(); }
14
15 error: boolean short circuit operator in statement may be clearer using an explicit test
16   --> $DIR/short_circuit_statement.rs:11:5
17    |
18 11 |     f() || g();
19    |     ^^^^^^^^^^^
20    |
21 help: replace it with
22    |     if !f() { g(); }
23
24 error: boolean short circuit operator in statement may be clearer using an explicit test
25   --> $DIR/short_circuit_statement.rs:15:5
26    |
27 15 |     1 == 2 || g();
28    |     ^^^^^^^^^^^^^^
29    |
30 help: replace it with
31    |     if !(1 == 2) { g(); }
32
33 error: aborting due to 3 previous errors
34