]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/bool_comparison.stderr
Rollup merge of #84221 - ABouttefeux:generic-arg-elision, r=estebank
[rust.git] / src / tools / clippy / tests / ui / bool_comparison.stderr
1 error: equality checks against true are unnecessary
2   --> $DIR/bool_comparison.rs:7:8
3    |
4 LL |     if x == true {
5    |        ^^^^^^^^^ help: try simplifying it as shown: `x`
6    |
7    = note: `-D clippy::bool-comparison` implied by `-D warnings`
8
9 error: equality checks against false can be replaced by a negation
10   --> $DIR/bool_comparison.rs:12:8
11    |
12 LL |     if x == false {
13    |        ^^^^^^^^^^ help: try simplifying it as shown: `!x`
14
15 error: equality checks against true are unnecessary
16   --> $DIR/bool_comparison.rs:17:8
17    |
18 LL |     if true == x {
19    |        ^^^^^^^^^ help: try simplifying it as shown: `x`
20
21 error: equality checks against false can be replaced by a negation
22   --> $DIR/bool_comparison.rs:22:8
23    |
24 LL |     if false == x {
25    |        ^^^^^^^^^^ help: try simplifying it as shown: `!x`
26
27 error: inequality checks against true can be replaced by a negation
28   --> $DIR/bool_comparison.rs:27:8
29    |
30 LL |     if x != true {
31    |        ^^^^^^^^^ help: try simplifying it as shown: `!x`
32
33 error: inequality checks against false are unnecessary
34   --> $DIR/bool_comparison.rs:32:8
35    |
36 LL |     if x != false {
37    |        ^^^^^^^^^^ help: try simplifying it as shown: `x`
38
39 error: inequality checks against true can be replaced by a negation
40   --> $DIR/bool_comparison.rs:37:8
41    |
42 LL |     if true != x {
43    |        ^^^^^^^^^ help: try simplifying it as shown: `!x`
44
45 error: inequality checks against false are unnecessary
46   --> $DIR/bool_comparison.rs:42:8
47    |
48 LL |     if false != x {
49    |        ^^^^^^^^^^ help: try simplifying it as shown: `x`
50
51 error: less than comparison against true can be replaced by a negation
52   --> $DIR/bool_comparison.rs:47:8
53    |
54 LL |     if x < true {
55    |        ^^^^^^^^ help: try simplifying it as shown: `!x`
56
57 error: greater than checks against false are unnecessary
58   --> $DIR/bool_comparison.rs:52:8
59    |
60 LL |     if false < x {
61    |        ^^^^^^^^^ help: try simplifying it as shown: `x`
62
63 error: greater than checks against false are unnecessary
64   --> $DIR/bool_comparison.rs:57:8
65    |
66 LL |     if x > false {
67    |        ^^^^^^^^^ help: try simplifying it as shown: `x`
68
69 error: less than comparison against true can be replaced by a negation
70   --> $DIR/bool_comparison.rs:62:8
71    |
72 LL |     if true > x {
73    |        ^^^^^^^^ help: try simplifying it as shown: `!x`
74
75 error: order comparisons between booleans can be simplified
76   --> $DIR/bool_comparison.rs:68:8
77    |
78 LL |     if x < y {
79    |        ^^^^^ help: try simplifying it as shown: `!x & y`
80
81 error: order comparisons between booleans can be simplified
82   --> $DIR/bool_comparison.rs:73:8
83    |
84 LL |     if x > y {
85    |        ^^^^^ help: try simplifying it as shown: `x & !y`
86
87 error: this comparison might be written more concisely
88   --> $DIR/bool_comparison.rs:121:8
89    |
90 LL |     if a == !b {};
91    |        ^^^^^^^ help: try simplifying it as shown: `a != b`
92
93 error: this comparison might be written more concisely
94   --> $DIR/bool_comparison.rs:122:8
95    |
96 LL |     if !a == b {};
97    |        ^^^^^^^ help: try simplifying it as shown: `a != b`
98
99 error: this comparison might be written more concisely
100   --> $DIR/bool_comparison.rs:126:8
101    |
102 LL |     if b == !a {};
103    |        ^^^^^^^ help: try simplifying it as shown: `b != a`
104
105 error: this comparison might be written more concisely
106   --> $DIR/bool_comparison.rs:127:8
107    |
108 LL |     if !b == a {};
109    |        ^^^^^^^ help: try simplifying it as shown: `b != a`
110
111 error: equality checks against false can be replaced by a negation
112   --> $DIR/bool_comparison.rs:151:8
113    |
114 LL |     if false == m!(func) {}
115    |        ^^^^^^^^^^^^^^^^^ help: try simplifying it as shown: `!m!(func)`
116
117 error: equality checks against false can be replaced by a negation
118   --> $DIR/bool_comparison.rs:152:8
119    |
120 LL |     if m!(func) == false {}
121    |        ^^^^^^^^^^^^^^^^^ help: try simplifying it as shown: `!m!(func)`
122
123 error: equality checks against true are unnecessary
124   --> $DIR/bool_comparison.rs:153:8
125    |
126 LL |     if true == m!(func) {}
127    |        ^^^^^^^^^^^^^^^^ help: try simplifying it as shown: `m!(func)`
128
129 error: equality checks against true are unnecessary
130   --> $DIR/bool_comparison.rs:154:8
131    |
132 LL |     if m!(func) == true {}
133    |        ^^^^^^^^^^^^^^^^ help: try simplifying it as shown: `m!(func)`
134
135 error: aborting due to 22 previous errors
136