rust/tests/ui/absurd-extreme-comparisons.stderr

148 lines
6.2 KiB
Plaintext
Raw Normal View History

error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
2018-12-10 06:27:19 +01:00
--> $DIR/absurd-extreme-comparisons.rs:23:5
|
2018-12-10 06:27:19 +01:00
23 | u <= 0;
| ^^^^^^
|
= note: `-D clippy::absurd-extreme-comparisons` implied by `-D warnings`
= help: because 0 is the minimum value for this type, the case where the two sides are not equal never occurs, consider using u == 0 instead
error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
2018-12-10 06:27:19 +01:00
--> $DIR/absurd-extreme-comparisons.rs:24:5
|
2018-12-10 06:27:19 +01:00
24 | u <= Z;
| ^^^^^^
|
= help: because Z is the minimum value for this type, the case where the two sides are not equal never occurs, consider using u == Z instead
error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
2018-12-10 06:27:19 +01:00
--> $DIR/absurd-extreme-comparisons.rs:25:5
|
2018-12-10 06:27:19 +01:00
25 | u < Z;
| ^^^^^
|
= help: because Z is the minimum value for this type, this comparison is always false
error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
2018-12-10 06:27:19 +01:00
--> $DIR/absurd-extreme-comparisons.rs:26:5
|
2018-12-10 06:27:19 +01:00
26 | Z >= u;
| ^^^^^^
|
= help: because Z is the minimum value for this type, the case where the two sides are not equal never occurs, consider using Z == u instead
error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
2018-12-10 06:27:19 +01:00
--> $DIR/absurd-extreme-comparisons.rs:27:5
|
2018-12-10 06:27:19 +01:00
27 | Z > u;
| ^^^^^
|
= help: because Z is the minimum value for this type, this comparison is always false
error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
2018-12-10 06:27:19 +01:00
--> $DIR/absurd-extreme-comparisons.rs:28:5
|
2018-12-10 06:27:19 +01:00
28 | u > std::u32::MAX;
| ^^^^^^^^^^^^^^^^^
|
= help: because std::u32::MAX is the maximum value for this type, this comparison is always false
error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
2018-12-10 06:27:19 +01:00
--> $DIR/absurd-extreme-comparisons.rs:29:5
|
2018-12-10 06:27:19 +01:00
29 | u >= std::u32::MAX;
| ^^^^^^^^^^^^^^^^^^
|
= help: because std::u32::MAX is the maximum value for this type, the case where the two sides are not equal never occurs, consider using u == std::u32::MAX instead
error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
2018-12-10 06:27:19 +01:00
--> $DIR/absurd-extreme-comparisons.rs:30:5
|
2018-12-10 06:27:19 +01:00
30 | std::u32::MAX < u;
| ^^^^^^^^^^^^^^^^^
|
= help: because std::u32::MAX is the maximum value for this type, this comparison is always false
error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
2018-12-10 06:27:19 +01:00
--> $DIR/absurd-extreme-comparisons.rs:31:5
|
2018-12-10 06:27:19 +01:00
31 | std::u32::MAX <= u;
| ^^^^^^^^^^^^^^^^^^
|
= help: because std::u32::MAX is the maximum value for this type, the case where the two sides are not equal never occurs, consider using std::u32::MAX == u instead
error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
2018-12-10 06:27:19 +01:00
--> $DIR/absurd-extreme-comparisons.rs:32:5
|
2018-12-10 06:27:19 +01:00
32 | 1-1 > u;
| ^^^^^^^
|
= help: because 1-1 is the minimum value for this type, this comparison is always false
error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
2018-12-10 06:27:19 +01:00
--> $DIR/absurd-extreme-comparisons.rs:33:5
|
2018-12-10 06:27:19 +01:00
33 | u >= !0;
| ^^^^^^^
|
= help: because !0 is the maximum value for this type, the case where the two sides are not equal never occurs, consider using u == !0 instead
error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
2018-12-10 06:27:19 +01:00
--> $DIR/absurd-extreme-comparisons.rs:34:5
|
2018-12-10 06:27:19 +01:00
34 | u <= 12 - 2*6;
| ^^^^^^^^^^^^^
|
= help: because 12 - 2*6 is the minimum value for this type, the case where the two sides are not equal never occurs, consider using u == 12 - 2*6 instead
error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
2018-12-10 06:27:19 +01:00
--> $DIR/absurd-extreme-comparisons.rs:36:5
|
2018-12-10 06:27:19 +01:00
36 | i < -127 - 1;
| ^^^^^^^^^^^^
|
= help: because -127 - 1 is the minimum value for this type, this comparison is always false
error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
2018-12-10 06:27:19 +01:00
--> $DIR/absurd-extreme-comparisons.rs:37:5
|
2018-12-10 06:27:19 +01:00
37 | std::i8::MAX >= i;
| ^^^^^^^^^^^^^^^^^
|
= help: because std::i8::MAX is the maximum value for this type, this comparison is always true
error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
2018-12-10 06:27:19 +01:00
--> $DIR/absurd-extreme-comparisons.rs:38:5
|
2018-12-10 06:27:19 +01:00
38 | 3-7 < std::i32::MIN;
| ^^^^^^^^^^^^^^^^^^^
|
= help: because std::i32::MIN is the minimum value for this type, this comparison is always false
error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
2018-12-10 06:27:19 +01:00
--> $DIR/absurd-extreme-comparisons.rs:40:5
|
2018-12-10 06:27:19 +01:00
40 | b >= true;
| ^^^^^^^^^
|
= help: because true is the maximum value for this type, the case where the two sides are not equal never occurs, consider using b == true instead
error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
2018-12-10 06:27:19 +01:00
--> $DIR/absurd-extreme-comparisons.rs:41:5
|
2018-12-10 06:27:19 +01:00
41 | false > b;
| ^^^^^^^^^
|
= help: because false is the minimum value for this type, this comparison is always false
error: <-comparison of unit values detected. This will always be false
2018-12-10 06:27:19 +01:00
--> $DIR/absurd-extreme-comparisons.rs:44:5
|
2018-12-10 06:27:19 +01:00
44 | () < {};
| ^^^^^^^
|
= note: #[deny(clippy::unit_cmp)] on by default
2018-01-16 17:06:27 +01:00
error: aborting due to 18 previous errors