]> git.lizzy.rs Git - rust.git/blob - tests/ui/absurd-extreme-comparisons.stderr
Merge pull request #1747 from Manishearth/mut_fp
[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:10:5
3    |
4 10 |     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:11:5
16    |
17 11 |     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:12:5
24    |
25 12 |     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:13:5
32    |
33 13 |     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:14:5
40    |
41 14 |     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:15:5
48    |
49 15 |     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:16:5
56    |
57 16 |     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:17:5
64    |
65 17 |     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:18:5
72    |
73 18 |     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:19:5
80    |
81 19 |     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:20:5
88    |
89 20 |     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:21:5
96    |
97 21 |     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:23:5
104    |
105 23 |     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:24:5
112    |
113 24 |     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:25:5
120    |
121 25 |     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:27:5
128    |
129 27 |     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:28:5
136    |
137 28 |     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:31:5
144    |
145 31 |     () < {};
146    |     ^^^^^^^
147    |
148    = note: #[warn(unit_cmp)] on by default
149
150 error: aborting due to 17 previous errors
151