summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/overly_complex_bool_expr.stderr
blob: 158cae8b8f373a8f6d344ce0be44a52563ef0591 (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/overly_complex_bool_expr.rs:11:13
   |
LL |     let _ = a && b || a;
   |             ^^^^^^^^^^^ help: it would look like the following: `a`
   |
   = note: `-D clippy::overly-complex-bool-expr` implied by `-D warnings`
help: this expression can be optimized out by applying boolean operations to the outer expression
  --> $DIR/overly_complex_bool_expr.rs:11:18
   |
LL |     let _ = a && b || a;
   |                  ^

error: this boolean expression contains a logic bug
  --> $DIR/overly_complex_bool_expr.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/overly_complex_bool_expr.rs:13:22
   |
LL |     let _ = false && a;
   |                      ^

error: this boolean expression contains a logic bug
  --> $DIR/overly_complex_bool_expr.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/overly_complex_bool_expr.rs:23:13
   |
LL |     let _ = a == b && a != b;
   |             ^^^^^^

error: this boolean expression contains a logic bug
  --> $DIR/overly_complex_bool_expr.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/overly_complex_bool_expr.rs:24:13
   |
LL |     let _ = a < b && a >= b;
   |             ^^^^^

error: this boolean expression contains a logic bug
  --> $DIR/overly_complex_bool_expr.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/overly_complex_bool_expr.rs:25:13
   |
LL |     let _ = a > b && a <= b;
   |             ^^^^^

error: aborting due to 5 previous errors