]>
Commit | Line | Data |
---|---|---|
f20569fa XL |
1 | error: this boolean expression contains a logic bug |
2 | --> $DIR/logic_bug.rs:10:13 | |
3 | | | |
4 | LL | let _ = a && b || a; | |
5 | | ^^^^^^^^^^^ help: it would look like the following: `a` | |
6 | | | |
7 | = note: `-D clippy::logic-bug` implied by `-D warnings` | |
8 | help: this expression can be optimized out by applying boolean operations to the outer expression | |
9 | --> $DIR/logic_bug.rs:10:18 | |
10 | | | |
11 | LL | let _ = a && b || a; | |
12 | | ^ | |
13 | ||
14 | error: this boolean expression contains a logic bug | |
15 | --> $DIR/logic_bug.rs:12:13 | |
16 | | | |
17 | LL | let _ = false && a; | |
18 | | ^^^^^^^^^^ help: it would look like the following: `false` | |
19 | | | |
20 | help: this expression can be optimized out by applying boolean operations to the outer expression | |
21 | --> $DIR/logic_bug.rs:12:22 | |
22 | | | |
23 | LL | let _ = false && a; | |
24 | | ^ | |
25 | ||
26 | error: this boolean expression contains a logic bug | |
27 | --> $DIR/logic_bug.rs:22:13 | |
28 | | | |
29 | LL | let _ = a == b && a != b; | |
30 | | ^^^^^^^^^^^^^^^^ help: it would look like the following: `false` | |
31 | | | |
32 | help: this expression can be optimized out by applying boolean operations to the outer expression | |
33 | --> $DIR/logic_bug.rs:22:13 | |
34 | | | |
35 | LL | let _ = a == b && a != b; | |
36 | | ^^^^^^ | |
37 | ||
38 | error: this boolean expression contains a logic bug | |
39 | --> $DIR/logic_bug.rs:23:13 | |
40 | | | |
41 | LL | let _ = a < b && a >= b; | |
42 | | ^^^^^^^^^^^^^^^ help: it would look like the following: `false` | |
43 | | | |
44 | help: this expression can be optimized out by applying boolean operations to the outer expression | |
45 | --> $DIR/logic_bug.rs:23:13 | |
46 | | | |
47 | LL | let _ = a < b && a >= b; | |
48 | | ^^^^^ | |
49 | ||
50 | error: this boolean expression contains a logic bug | |
51 | --> $DIR/logic_bug.rs:24:13 | |
52 | | | |
53 | LL | let _ = a > b && a <= b; | |
54 | | ^^^^^^^^^^^^^^^ help: it would look like the following: `false` | |
55 | | | |
56 | help: this expression can be optimized out by applying boolean operations to the outer expression | |
57 | --> $DIR/logic_bug.rs:24:13 | |
58 | | | |
59 | LL | let _ = a > b && a <= b; | |
60 | | ^^^^^ | |
61 | ||
62 | error: aborting due to 5 previous errors | |
63 |