summary refs log tree commit diff
path: root/src/tools/clippy/tests/ui/bool_comparison.stderr
blob: eeb1f20ee894d89b0d267ff67bb4098054f6ab04 (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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
error: equality checks against true are unnecessary
  --> $DIR/bool_comparison.rs:6:8
   |
LL |     if x == true {
   |        ^^^^^^^^^ help: try simplifying it as shown: `x`
   |
   = note: `-D clippy::bool-comparison` implied by `-D warnings`

error: equality checks against false can be replaced by a negation
  --> $DIR/bool_comparison.rs:11:8
   |
LL |     if x == false {
   |        ^^^^^^^^^^ help: try simplifying it as shown: `!x`

error: equality checks against true are unnecessary
  --> $DIR/bool_comparison.rs:16:8
   |
LL |     if true == x {
   |        ^^^^^^^^^ help: try simplifying it as shown: `x`

error: equality checks against false can be replaced by a negation
  --> $DIR/bool_comparison.rs:21:8
   |
LL |     if false == x {
   |        ^^^^^^^^^^ help: try simplifying it as shown: `!x`

error: inequality checks against true can be replaced by a negation
  --> $DIR/bool_comparison.rs:26:8
   |
LL |     if x != true {
   |        ^^^^^^^^^ help: try simplifying it as shown: `!x`

error: inequality checks against false are unnecessary
  --> $DIR/bool_comparison.rs:31:8
   |
LL |     if x != false {
   |        ^^^^^^^^^^ help: try simplifying it as shown: `x`

error: inequality checks against true can be replaced by a negation
  --> $DIR/bool_comparison.rs:36:8
   |
LL |     if true != x {
   |        ^^^^^^^^^ help: try simplifying it as shown: `!x`

error: inequality checks against false are unnecessary
  --> $DIR/bool_comparison.rs:41:8
   |
LL |     if false != x {
   |        ^^^^^^^^^^ help: try simplifying it as shown: `x`

error: less than comparison against true can be replaced by a negation
  --> $DIR/bool_comparison.rs:46:8
   |
LL |     if x < true {
   |        ^^^^^^^^ help: try simplifying it as shown: `!x`

error: greater than checks against false are unnecessary
  --> $DIR/bool_comparison.rs:51:8
   |
LL |     if false < x {
   |        ^^^^^^^^^ help: try simplifying it as shown: `x`

error: greater than checks against false are unnecessary
  --> $DIR/bool_comparison.rs:56:8
   |
LL |     if x > false {
   |        ^^^^^^^^^ help: try simplifying it as shown: `x`

error: less than comparison against true can be replaced by a negation
  --> $DIR/bool_comparison.rs:61:8
   |
LL |     if true > x {
   |        ^^^^^^^^ help: try simplifying it as shown: `!x`

error: order comparisons between booleans can be simplified
  --> $DIR/bool_comparison.rs:67:8
   |
LL |     if x < y {
   |        ^^^^^ help: try simplifying it as shown: `!x & y`

error: order comparisons between booleans can be simplified
  --> $DIR/bool_comparison.rs:72:8
   |
LL |     if x > y {
   |        ^^^^^ help: try simplifying it as shown: `x & !y`

error: This comparison might be written more concisely
  --> $DIR/bool_comparison.rs:120:8
   |
LL |     if a == !b {};
   |        ^^^^^^^ help: try simplifying it as shown: `a != b`

error: This comparison might be written more concisely
  --> $DIR/bool_comparison.rs:121:8
   |
LL |     if !a == b {};
   |        ^^^^^^^ help: try simplifying it as shown: `a != b`

error: This comparison might be written more concisely
  --> $DIR/bool_comparison.rs:125:8
   |
LL |     if b == !a {};
   |        ^^^^^^^ help: try simplifying it as shown: `b != a`

error: This comparison might be written more concisely
  --> $DIR/bool_comparison.rs:126:8
   |
LL |     if !b == a {};
   |        ^^^^^^^ help: try simplifying it as shown: `b != a`

error: aborting due to 18 previous errors