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