]> git.lizzy.rs Git - rust.git/blob - tests/ui/absurd-extreme-comparisons.stderr
remove all //~ from tests
[rust.git] / tests / ui / absurd-extreme-comparisons.stderr
1 error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
2   --> $DIR/absurd-extreme-comparisons.rs:12:5
3    |
4 12 |     u <= 0;
5    |     ^^^^^^
6    |
7 note: lint level defined here
8   --> $DIR/absurd-extreme-comparisons.rs:4:9
9    |
10 4  | #![deny(absurd_extreme_comparisons)]
11    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^
12    = 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
13
14 error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
15   --> $DIR/absurd-extreme-comparisons.rs:15:5
16    |
17 15 |     u <= Z;
18    |     ^^^^^^
19    |
20    = 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
21
22 error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
23   --> $DIR/absurd-extreme-comparisons.rs:18:5
24    |
25 18 |     u < Z;
26    |     ^^^^^
27    |
28    = help: because Z is the minimum value for this type, this comparison is always false
29
30 error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
31   --> $DIR/absurd-extreme-comparisons.rs:21:5
32    |
33 21 |     Z >= u;
34    |     ^^^^^^
35    |
36    = 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
37
38 error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
39   --> $DIR/absurd-extreme-comparisons.rs:24:5
40    |
41 24 |     Z > u;
42    |     ^^^^^
43    |
44    = help: because Z is the minimum value for this type, this comparison is always false
45
46 error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
47   --> $DIR/absurd-extreme-comparisons.rs:27:5
48    |
49 27 |     u > std::u32::MAX;
50    |     ^^^^^^^^^^^^^^^^^
51    |
52    = help: because std::u32::MAX is the maximum value for this type, this comparison is always false
53
54 error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
55   --> $DIR/absurd-extreme-comparisons.rs:30:5
56    |
57 30 |     u >= std::u32::MAX;
58    |     ^^^^^^^^^^^^^^^^^^
59    |
60    = 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
61
62 error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
63   --> $DIR/absurd-extreme-comparisons.rs:33:5
64    |
65 33 |     std::u32::MAX < u;
66    |     ^^^^^^^^^^^^^^^^^
67    |
68    = help: because std::u32::MAX is the maximum value for this type, this comparison is always false
69
70 error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
71   --> $DIR/absurd-extreme-comparisons.rs:36:5
72    |
73 36 |     std::u32::MAX <= u;
74    |     ^^^^^^^^^^^^^^^^^^
75    |
76    = 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
77
78 error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
79   --> $DIR/absurd-extreme-comparisons.rs:40:5
80    |
81 40 |     1-1 > u;
82    |     ^^^^^^^
83    |
84    = help: because 1-1 is the minimum value for this type, this comparison is always false
85
86 error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
87   --> $DIR/absurd-extreme-comparisons.rs:43:5
88    |
89 43 |     u >= !0;
90    |     ^^^^^^^
91    |
92    = 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
93
94 error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
95   --> $DIR/absurd-extreme-comparisons.rs:46:5
96    |
97 46 |     u <= 12 - 2*6;
98    |     ^^^^^^^^^^^^^
99    |
100    = 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
101
102 error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
103   --> $DIR/absurd-extreme-comparisons.rs:51:5
104    |
105 51 |     i < -127 - 1;
106    |     ^^^^^^^^^^^^
107    |
108    = help: because -127 - 1 is the minimum value for this type, this comparison is always false
109
110 error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
111   --> $DIR/absurd-extreme-comparisons.rs:54:5
112    |
113 54 |     std::i8::MAX >= i;
114    |     ^^^^^^^^^^^^^^^^^
115    |
116    = help: because std::i8::MAX is the maximum value for this type, this comparison is always true
117
118 error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
119   --> $DIR/absurd-extreme-comparisons.rs:57:5
120    |
121 57 |     3-7 < std::i32::MIN;
122    |     ^^^^^^^^^^^^^^^^^^^
123    |
124    = help: because std::i32::MIN is the minimum value for this type, this comparison is always false
125
126 error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
127   --> $DIR/absurd-extreme-comparisons.rs:62:5
128    |
129 62 |     b >= true;
130    |     ^^^^^^^^^
131    |
132    = 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
133
134 error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
135   --> $DIR/absurd-extreme-comparisons.rs:65:5
136    |
137 65 |     false > b;
138    |     ^^^^^^^^^
139    |
140    = help: because false is the minimum value for this type, this comparison is always false
141
142 warning: <-comparison of unit values detected. This will always be false
143   --> $DIR/absurd-extreme-comparisons.rs:72:5
144    |
145 72 |     () < {};
146    |     ^^^^^^^
147    |
148    = note: #[warn(unit_cmp)] on by default
149
150 error: aborting due to 17 previous errors
151