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

error: this boolean expression contains a logic bug
  --> $DIR/logic_bug.rs:13:13
   |
LL |     let _ = false && a;
   |             ^^^^^^^^^^ help: it would look like the following: `false`
   |
help: this expression can be optimized out by applying boolean operations to the outer expression
  --> $DIR/logic_bug.rs:13:22
   |
LL |     let _ = false && a;
   |                      ^

error: this boolean expression contains a logic bug
  --> $DIR/logic_bug.rs:23:13
   |
LL |     let _ = a == b && a != b;
   |             ^^^^^^^^^^^^^^^^ help: it would look like the following: `false`
   |
help: this expression can be optimized out by applying boolean operations to the outer expression
  --> $DIR/logic_bug.rs:23:13
   |
LL |     let _ = a == b && a != b;
   |             ^^^^^^

error: this boolean expression contains a logic bug
  --> $DIR/logic_bug.rs:24:13
   |
LL |     let _ = a < b && a >= b;
   |             ^^^^^^^^^^^^^^^ help: it would look like the following: `false`
   |
help: this expression can be optimized out by applying boolean operations to the outer expression
  --> $DIR/logic_bug.rs:24:13
   |
LL |     let _ = a < b && a >= b;
   |             ^^^^^

error: this boolean expression contains a logic bug
  --> $DIR/logic_bug.rs:25:13
   |
LL |     let _ = a > b && a <= b;
   |             ^^^^^^^^^^^^^^^ help: it would look like the following: `false`
   |
help: this expression can be optimized out by applying boolean operations to the outer expression
  --> $DIR/logic_bug.rs:25:13
   |
LL |     let _ = a > b && a <= b;
   |             ^^^^^

error: aborting due to 5 previous errors