| error: boolean expression will never evaluate to 'true' | |
| --> tests/ui/const_comparisons.rs:46:5 | |
| | | |
| LL | status_code <= 400 && status_code > 500; | |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| | | |
| = note: since `400` < `500`, the expression evaluates to false for any value of `status_code` | |
| = note: `-D clippy::impossible-comparisons` implied by `-D warnings` | |
| = help: to override `-D warnings` add `#[allow(clippy::impossible_comparisons)]` | |
| error: boolean expression will never evaluate to 'true' | |
| --> tests/ui/const_comparisons.rs:49:5 | |
| | | |
| LL | status_code > 500 && status_code < 400; | |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| | | |
| = note: since `500` > `400`, the expression evaluates to false for any value of `status_code` | |
| error: boolean expression will never evaluate to 'true' | |
| --> tests/ui/const_comparisons.rs:52:5 | |
| | | |
| LL | status_code < 500 && status_code > 500; | |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| | | |
| = note: `status_code` cannot simultaneously be greater than and less than `500` | |
| error: boolean expression will never evaluate to 'true' | |
| --> tests/ui/const_comparisons.rs:56:5 | |
| | | |
| LL | status_code < { 400 } && status_code > { 500 }; | |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| | | |
| = note: since `{ 400 }` < `{ 500 }`, the expression evaluates to false for any value of `status_code` | |
| error: boolean expression will never evaluate to 'true' | |
| --> tests/ui/const_comparisons.rs:59:5 | |
| | | |
| LL | status_code < STATUS_BAD_REQUEST && status_code > STATUS_SERVER_ERROR; | |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| | | |
| = note: since `STATUS_BAD_REQUEST` < `STATUS_SERVER_ERROR`, the expression evaluates to false for any value of `status_code` | |
| error: boolean expression will never evaluate to 'true' | |
| --> tests/ui/const_comparisons.rs:62:5 | |
| | | |
| LL | status_code <= u16::MIN + 1 && status_code > STATUS_SERVER_ERROR; | |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| | | |
| = note: since `u16::MIN + 1` < `STATUS_SERVER_ERROR`, the expression evaluates to false for any value of `status_code` | |
| error: boolean expression will never evaluate to 'true' | |
| --> tests/ui/const_comparisons.rs:65:5 | |
| | | |
| LL | status_code < STATUS_SERVER_ERROR && status_code > STATUS_SERVER_ERROR; | |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| | | |
| = note: `status_code` cannot simultaneously be greater than and less than `STATUS_SERVER_ERROR` | |
| error: boolean expression will never evaluate to 'true' | |
| --> tests/ui/const_comparisons.rs:69:5 | |
| | | |
| LL | status < { 400 } && status > { 500 }; | |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| | | |
| = note: since `{ 400 }` < `{ 500 }`, the expression evaluates to false for any value of `status` | |
| error: boolean expression will never evaluate to 'true' | |
| --> tests/ui/const_comparisons.rs:72:5 | |
| | | |
| LL | status < STATUS_BAD_REQUEST && status > STATUS_SERVER_ERROR; | |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| | | |
| = note: since `STATUS_BAD_REQUEST` < `STATUS_SERVER_ERROR`, the expression evaluates to false for any value of `status` | |
| error: boolean expression will never evaluate to 'true' | |
| --> tests/ui/const_comparisons.rs:75:5 | |
| | | |
| LL | status <= u16::MIN + 1 && status > STATUS_SERVER_ERROR; | |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| | | |
| = note: since `u16::MIN + 1` < `STATUS_SERVER_ERROR`, the expression evaluates to false for any value of `status` | |
| error: boolean expression will never evaluate to 'true' | |
| --> tests/ui/const_comparisons.rs:78:5 | |
| | | |
| LL | status < STATUS_SERVER_ERROR && status > STATUS_SERVER_ERROR; | |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| | | |
| = note: `status` cannot simultaneously be greater than and less than `STATUS_SERVER_ERROR` | |
| error: boolean expression will never evaluate to 'true' | |
| --> tests/ui/const_comparisons.rs:87:5 | |
| | | |
| LL | 500 >= status_code && 600 < status_code; | |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| | | |
| = note: since `500` < `600`, the expression evaluates to false for any value of `status_code` | |
| error: boolean expression will never evaluate to 'true' | |
| --> tests/ui/const_comparisons.rs:91:5 | |
| | | |
| LL | 500 >= status_code && status_code > 600; | |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| | | |
| = note: since `500` < `600`, the expression evaluates to false for any value of `status_code` | |
| error: boolean expression will never evaluate to 'true' | |
| --> tests/ui/const_comparisons.rs:100:5 | |
| | | |
| LL | 500 >= status && 600 < status; | |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| | | |
| = note: since `500` < `600`, the expression evaluates to false for any value of `status` | |
| error: boolean expression will never evaluate to 'true' | |
| --> tests/ui/const_comparisons.rs:104:5 | |
| | | |
| LL | 500 >= status && status > 600; | |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| | | |
| = note: since `500` < `600`, the expression evaluates to false for any value of `status` | |
| error: right-hand side of `&&` operator has no effect | |
| --> tests/ui/const_comparisons.rs:108:5 | |
| | | |
| LL | status_code < 200 && status_code <= 299; | |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| | | |
| note: `if `status_code < 200` evaluates to true, status_code <= 299` will always evaluate to true as well | |
| --> tests/ui/const_comparisons.rs:108:23 | |
| | | |
| LL | status_code < 200 && status_code <= 299; | |
| | ^^^^^^^^^^^^^^^^^^^^^ | |
| = note: `-D clippy::redundant-comparisons` implied by `-D warnings` | |
| = help: to override `-D warnings` add `#[allow(clippy::redundant_comparisons)]` | |
| error: left-hand side of `&&` operator has no effect | |
| --> tests/ui/const_comparisons.rs:111:5 | |
| | | |
| LL | status_code > 200 && status_code >= 299; | |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| | | |
| note: `if `status_code >= 299` evaluates to true, status_code > 200` will always evaluate to true as well | |
| --> tests/ui/const_comparisons.rs:111:5 | |
| | | |
| LL | status_code > 200 && status_code >= 299; | |
| | ^^^^^^^^^^^^^^^^^^^^^ | |
| error: left-hand side of `&&` operator has no effect | |
| --> tests/ui/const_comparisons.rs:115:5 | |
| | | |
| LL | status_code >= 500 && status_code > 500; | |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| | | |
| note: `if `status_code > 500` evaluates to true, status_code >= 500` will always evaluate to true as well | |
| --> tests/ui/const_comparisons.rs:115:5 | |
| | | |
| LL | status_code >= 500 && status_code > 500; | |
| | ^^^^^^^^^^^^^^^^^^^^^^ | |
| error: right-hand side of `&&` operator has no effect | |
| --> tests/ui/const_comparisons.rs:119:5 | |
| | | |
| LL | status_code > 500 && status_code >= 500; | |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| | | |
| note: `if `status_code > 500` evaluates to true, status_code >= 500` will always evaluate to true as well | |
| --> tests/ui/const_comparisons.rs:119:23 | |
| | | |
| LL | status_code > 500 && status_code >= 500; | |
| | ^^^^^^^^^^^^^^^^^^^^^ | |
| error: left-hand side of `&&` operator has no effect | |
| --> tests/ui/const_comparisons.rs:123:5 | |
| | | |
| LL | status_code <= 500 && status_code < 500; | |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| | | |
| note: `if `status_code < 500` evaluates to true, status_code <= 500` will always evaluate to true as well | |
| --> tests/ui/const_comparisons.rs:123:5 | |
| | | |
| LL | status_code <= 500 && status_code < 500; | |
| | ^^^^^^^^^^^^^^^^^^^^^^ | |
| error: right-hand side of `&&` operator has no effect | |
| --> tests/ui/const_comparisons.rs:127:5 | |
| | | |
| LL | status_code < 500 && status_code <= 500; | |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| | | |
| note: `if `status_code < 500` evaluates to true, status_code <= 500` will always evaluate to true as well | |
| --> tests/ui/const_comparisons.rs:127:23 | |
| | | |
| LL | status_code < 500 && status_code <= 500; | |
| | ^^^^^^^^^^^^^^^^^^^^^ | |
| error: boolean expression will never evaluate to 'true' | |
| --> tests/ui/const_comparisons.rs:132:5 | |
| | | |
| LL | name < "Jennifer" && name > "Shannon"; | |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| | | |
| = note: since `"Jennifer"` < `"Shannon"`, the expression evaluates to false for any value of `name` | |
| error: boolean expression will never evaluate to 'true' | |
| --> tests/ui/const_comparisons.rs:136:5 | |
| | | |
| LL | numbers < [3, 4] && numbers > [5, 6]; | |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| | | |
| = note: since `[3, 4]` < `[5, 6]`, the expression evaluates to false for any value of `numbers` | |
| error: boolean expression will never evaluate to 'true' | |
| --> tests/ui/const_comparisons.rs:140:5 | |
| | | |
| LL | letter < 'b' && letter > 'c'; | |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| | | |
| = note: since `'b'` < `'c'`, the expression evaluates to false for any value of `letter` | |
| error: boolean expression will never evaluate to 'true' | |
| --> tests/ui/const_comparisons.rs:144:5 | |
| | | |
| LL | area < std::f32::consts::E && area > std::f32::consts::PI; | |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| | | |
| = note: since `std::f32::consts::E` < `std::f32::consts::PI`, the expression evaluates to false for any value of `area` | |
| error: aborting due to 25 previous errors | |