1
1
error: boolean expression will never evaluate to 'true'
2
- --> $DIR/const_comparisons.rs:45 :5
2
+ --> $DIR/const_comparisons.rs:46 :5
3
3
|
4
4
LL | status_code <= 400 && status_code > 500;
5
5
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -9,217 +9,217 @@ LL | status_code <= 400 && status_code > 500;
9
9
= help: to override `-D warnings` add `#[allow(clippy::impossible_comparisons)]`
10
10
11
11
error: boolean expression will never evaluate to 'true'
12
- --> $DIR/const_comparisons.rs:48 :5
12
+ --> $DIR/const_comparisons.rs:49 :5
13
13
|
14
14
LL | status_code > 500 && status_code < 400;
15
15
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
16
16
|
17
17
= note: since `500` > `400`, the expression evaluates to false for any value of `status_code`
18
18
19
19
error: boolean expression will never evaluate to 'true'
20
- --> $DIR/const_comparisons.rs:51 :5
20
+ --> $DIR/const_comparisons.rs:52 :5
21
21
|
22
22
LL | status_code < 500 && status_code > 500;
23
23
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
24
24
|
25
25
= note: `status_code` cannot simultaneously be greater than and less than `500`
26
26
27
27
error: boolean expression will never evaluate to 'true'
28
- --> $DIR/const_comparisons.rs:56 :5
28
+ --> $DIR/const_comparisons.rs:57 :5
29
29
|
30
30
LL | status_code < { 400 } && status_code > { 500 };
31
31
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
32
32
|
33
33
= note: since `{ 400 }` < `{ 500 }`, the expression evaluates to false for any value of `status_code`
34
34
35
35
error: boolean expression will never evaluate to 'true'
36
- --> $DIR/const_comparisons.rs:59 :5
36
+ --> $DIR/const_comparisons.rs:60 :5
37
37
|
38
38
LL | status_code < STATUS_BAD_REQUEST && status_code > STATUS_SERVER_ERROR;
39
39
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
40
40
|
41
41
= note: since `STATUS_BAD_REQUEST` < `STATUS_SERVER_ERROR`, the expression evaluates to false for any value of `status_code`
42
42
43
43
error: boolean expression will never evaluate to 'true'
44
- --> $DIR/const_comparisons.rs:62 :5
44
+ --> $DIR/const_comparisons.rs:63 :5
45
45
|
46
46
LL | status_code <= u16::MIN + 1 && status_code > STATUS_SERVER_ERROR;
47
47
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
48
48
|
49
49
= note: since `u16::MIN + 1` < `STATUS_SERVER_ERROR`, the expression evaluates to false for any value of `status_code`
50
50
51
51
error: boolean expression will never evaluate to 'true'
52
- --> $DIR/const_comparisons.rs:65 :5
52
+ --> $DIR/const_comparisons.rs:66 :5
53
53
|
54
54
LL | status_code < STATUS_SERVER_ERROR && status_code > STATUS_SERVER_ERROR;
55
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
56
56
|
57
57
= note: `status_code` cannot simultaneously be greater than and less than `STATUS_SERVER_ERROR`
58
58
59
59
error: boolean expression will never evaluate to 'true'
60
- --> $DIR/const_comparisons.rs:70 :5
60
+ --> $DIR/const_comparisons.rs:71 :5
61
61
|
62
62
LL | status < { 400 } && status > { 500 };
63
63
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
64
64
|
65
65
= note: since `{ 400 }` < `{ 500 }`, the expression evaluates to false for any value of `status`
66
66
67
67
error: boolean expression will never evaluate to 'true'
68
- --> $DIR/const_comparisons.rs:73 :5
68
+ --> $DIR/const_comparisons.rs:74 :5
69
69
|
70
70
LL | status < STATUS_BAD_REQUEST && status > STATUS_SERVER_ERROR;
71
71
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
72
72
|
73
73
= note: since `STATUS_BAD_REQUEST` < `STATUS_SERVER_ERROR`, the expression evaluates to false for any value of `status`
74
74
75
75
error: boolean expression will never evaluate to 'true'
76
- --> $DIR/const_comparisons.rs:76 :5
76
+ --> $DIR/const_comparisons.rs:77 :5
77
77
|
78
78
LL | status <= u16::MIN + 1 && status > STATUS_SERVER_ERROR;
79
79
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
80
80
|
81
81
= note: since `u16::MIN + 1` < `STATUS_SERVER_ERROR`, the expression evaluates to false for any value of `status`
82
82
83
83
error: boolean expression will never evaluate to 'true'
84
- --> $DIR/const_comparisons.rs:79 :5
84
+ --> $DIR/const_comparisons.rs:80 :5
85
85
|
86
86
LL | status < STATUS_SERVER_ERROR && status > STATUS_SERVER_ERROR;
87
87
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
88
88
|
89
89
= note: `status` cannot simultaneously be greater than and less than `STATUS_SERVER_ERROR`
90
90
91
91
error: boolean expression will never evaluate to 'true'
92
- --> $DIR/const_comparisons.rs:89 :5
92
+ --> $DIR/const_comparisons.rs:90 :5
93
93
|
94
94
LL | 500 >= status_code && 600 < status_code;
95
95
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
96
96
|
97
97
= note: since `500` < `600`, the expression evaluates to false for any value of `status_code`
98
98
99
99
error: boolean expression will never evaluate to 'true'
100
- --> $DIR/const_comparisons.rs:93 :5
100
+ --> $DIR/const_comparisons.rs:94 :5
101
101
|
102
102
LL | 500 >= status_code && status_code > 600;
103
103
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
104
104
|
105
105
= note: since `500` < `600`, the expression evaluates to false for any value of `status_code`
106
106
107
107
error: boolean expression will never evaluate to 'true'
108
- --> $DIR/const_comparisons.rs:103 :5
108
+ --> $DIR/const_comparisons.rs:104 :5
109
109
|
110
110
LL | 500 >= status && 600 < status;
111
111
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
112
112
|
113
113
= note: since `500` < `600`, the expression evaluates to false for any value of `status`
114
114
115
115
error: boolean expression will never evaluate to 'true'
116
- --> $DIR/const_comparisons.rs:107 :5
116
+ --> $DIR/const_comparisons.rs:108 :5
117
117
|
118
118
LL | 500 >= status && status > 600;
119
119
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
120
120
|
121
121
= note: since `500` < `600`, the expression evaluates to false for any value of `status`
122
122
123
123
error: right-hand side of `&&` operator has no effect
124
- --> $DIR/const_comparisons.rs:112 :5
124
+ --> $DIR/const_comparisons.rs:113 :5
125
125
|
126
126
LL | status_code < 200 && status_code <= 299;
127
127
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
128
128
|
129
129
note: `if `status_code < 200` evaluates to true, status_code <= 299` will always evaluate to true as well
130
- --> $DIR/const_comparisons.rs:112 :23
130
+ --> $DIR/const_comparisons.rs:113 :23
131
131
|
132
132
LL | status_code < 200 && status_code <= 299;
133
133
| ^^^^^^^^^^^^^^^^^^^^^
134
134
= note: `-D clippy::redundant-comparisons` implied by `-D warnings`
135
135
= help: to override `-D warnings` add `#[allow(clippy::redundant_comparisons)]`
136
136
137
137
error: left-hand side of `&&` operator has no effect
138
- --> $DIR/const_comparisons.rs:114 :5
138
+ --> $DIR/const_comparisons.rs:115 :5
139
139
|
140
140
LL | status_code > 200 && status_code >= 299;
141
141
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
142
142
|
143
143
note: `if `status_code >= 299` evaluates to true, status_code > 200` will always evaluate to true as well
144
- --> $DIR/const_comparisons.rs:114 :5
144
+ --> $DIR/const_comparisons.rs:115 :5
145
145
|
146
146
LL | status_code > 200 && status_code >= 299;
147
147
| ^^^^^^^^^^^^^^^^^^^^^
148
148
149
149
error: left-hand side of `&&` operator has no effect
150
- --> $DIR/const_comparisons.rs:118 :5
150
+ --> $DIR/const_comparisons.rs:119 :5
151
151
|
152
152
LL | status_code >= 500 && status_code > 500;
153
153
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
154
154
|
155
155
note: `if `status_code > 500` evaluates to true, status_code >= 500` will always evaluate to true as well
156
- --> $DIR/const_comparisons.rs:118 :5
156
+ --> $DIR/const_comparisons.rs:119 :5
157
157
|
158
158
LL | status_code >= 500 && status_code > 500;
159
159
| ^^^^^^^^^^^^^^^^^^^^^^
160
160
161
161
error: right-hand side of `&&` operator has no effect
162
- --> $DIR/const_comparisons.rs:121 :5
162
+ --> $DIR/const_comparisons.rs:122 :5
163
163
|
164
164
LL | status_code > 500 && status_code >= 500;
165
165
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
166
166
|
167
167
note: `if `status_code > 500` evaluates to true, status_code >= 500` will always evaluate to true as well
168
- --> $DIR/const_comparisons.rs:121 :23
168
+ --> $DIR/const_comparisons.rs:122 :23
169
169
|
170
170
LL | status_code > 500 && status_code >= 500;
171
171
| ^^^^^^^^^^^^^^^^^^^^^
172
172
173
173
error: left-hand side of `&&` operator has no effect
174
- --> $DIR/const_comparisons.rs:124 :5
174
+ --> $DIR/const_comparisons.rs:125 :5
175
175
|
176
176
LL | status_code <= 500 && status_code < 500;
177
177
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
178
178
|
179
179
note: `if `status_code < 500` evaluates to true, status_code <= 500` will always evaluate to true as well
180
- --> $DIR/const_comparisons.rs:124 :5
180
+ --> $DIR/const_comparisons.rs:125 :5
181
181
|
182
182
LL | status_code <= 500 && status_code < 500;
183
183
| ^^^^^^^^^^^^^^^^^^^^^^
184
184
185
185
error: right-hand side of `&&` operator has no effect
186
- --> $DIR/const_comparisons.rs:127 :5
186
+ --> $DIR/const_comparisons.rs:128 :5
187
187
|
188
188
LL | status_code < 500 && status_code <= 500;
189
189
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
190
190
|
191
191
note: `if `status_code < 500` evaluates to true, status_code <= 500` will always evaluate to true as well
192
- --> $DIR/const_comparisons.rs:127 :23
192
+ --> $DIR/const_comparisons.rs:128 :23
193
193
|
194
194
LL | status_code < 500 && status_code <= 500;
195
195
| ^^^^^^^^^^^^^^^^^^^^^
196
196
197
197
error: boolean expression will never evaluate to 'true'
198
- --> $DIR/const_comparisons.rs:132 :5
198
+ --> $DIR/const_comparisons.rs:133 :5
199
199
|
200
200
LL | name < "Jennifer" && name > "Shannon";
201
201
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
202
202
|
203
203
= note: since `"Jennifer"` < `"Shannon"`, the expression evaluates to false for any value of `name`
204
204
205
205
error: boolean expression will never evaluate to 'true'
206
- --> $DIR/const_comparisons.rs:137 :5
206
+ --> $DIR/const_comparisons.rs:138 :5
207
207
|
208
208
LL | numbers < [3, 4] && numbers > [5, 6];
209
209
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
210
210
|
211
211
= note: since `[3, 4]` < `[5, 6]`, the expression evaluates to false for any value of `numbers`
212
212
213
213
error: boolean expression will never evaluate to 'true'
214
- --> $DIR/const_comparisons.rs:142 :5
214
+ --> $DIR/const_comparisons.rs:143 :5
215
215
|
216
216
LL | letter < 'b' && letter > 'c';
217
217
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
218
218
|
219
219
= note: since `'b'` < `'c'`, the expression evaluates to false for any value of `letter`
220
220
221
221
error: boolean expression will never evaluate to 'true'
222
- --> $DIR/const_comparisons.rs:147 :5
222
+ --> $DIR/const_comparisons.rs:148 :5
223
223
|
224
224
LL | area < std::f32::consts::E && area > std::f32::consts::PI;
225
225
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
0 commit comments