@@ -72,10 +72,10 @@ LL | u32::MAX;
72
72
| +++++
73
73
74
74
error: usage of a legacy numeric method
75
- --> tests/ui/legacy_numeric_constants.rs:50:10
75
+ --> tests/ui/legacy_numeric_constants.rs:50:5
76
76
|
77
77
LL | i32::max_value();
78
- | ^^^^^^^^^^^
78
+ | ^^^^^ ^^^^^^^^^^^
79
79
|
80
80
help: use the associated constant instead
81
81
|
@@ -84,10 +84,10 @@ LL + i32::MAX;
84
84
|
85
85
86
86
error: usage of a legacy numeric method
87
- --> tests/ui/legacy_numeric_constants.rs:53:9
87
+ --> tests/ui/legacy_numeric_constants.rs:53:5
88
88
|
89
89
LL | u8::max_value();
90
- | ^^^^^^^^^^^
90
+ | ^^^^ ^^^^^^^^^^^
91
91
|
92
92
help: use the associated constant instead
93
93
|
@@ -96,10 +96,10 @@ LL + u8::MAX;
96
96
|
97
97
98
98
error: usage of a legacy numeric method
99
- --> tests/ui/legacy_numeric_constants.rs:56:9
99
+ --> tests/ui/legacy_numeric_constants.rs:56:5
100
100
|
101
101
LL | u8::min_value();
102
- | ^^^^^^^^^^^
102
+ | ^^^^ ^^^^^^^^^^^
103
103
|
104
104
help: use the associated constant instead
105
105
|
@@ -120,10 +120,10 @@ LL + u8::MIN;
120
120
|
121
121
122
122
error: usage of a legacy numeric method
123
- --> tests/ui/legacy_numeric_constants.rs:62:27
123
+ --> tests/ui/legacy_numeric_constants.rs:62:5
124
124
|
125
125
LL | ::std::primitive::u8::min_value();
126
- | ^^^^^^^^^^^
126
+ | ^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^
127
127
|
128
128
help: use the associated constant instead
129
129
|
@@ -132,10 +132,10 @@ LL + ::std::primitive::u8::MIN;
132
132
|
133
133
134
134
error: usage of a legacy numeric method
135
- --> tests/ui/legacy_numeric_constants.rs:65:26
135
+ --> tests/ui/legacy_numeric_constants.rs:65:5
136
136
|
137
137
LL | std::primitive::i32::max_value();
138
- | ^^^^^^^^^^^
138
+ | ^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^
139
139
|
140
140
help: use the associated constant instead
141
141
|
@@ -171,8 +171,20 @@ LL - let x = std::u64::MAX;
171
171
LL + let x = u64::MAX;
172
172
|
173
173
174
+ error: usage of a legacy numeric method
175
+ --> tests/ui/legacy_numeric_constants.rs:82:5
176
+ |
177
+ LL | <std::primitive::i32>::max_value();
178
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
179
+ |
180
+ help: use the associated constant instead
181
+ |
182
+ LL - <std::primitive::i32>::max_value();
183
+ LL + std::primitive::i32::MAX;
184
+ |
185
+
174
186
error: usage of a legacy numeric constant
175
- --> tests/ui/legacy_numeric_constants.rs:82 :14
187
+ --> tests/ui/legacy_numeric_constants.rs:85 :14
176
188
|
177
189
LL | [(0, "", std::i128::MAX)];
178
190
| ^^^^^^^^^^^^^^
@@ -183,8 +195,56 @@ LL - [(0, "", std::i128::MAX)];
183
195
LL + [(0, "", i128::MAX)];
184
196
|
185
197
198
+ error: usage of a legacy numeric method
199
+ --> tests/ui/legacy_numeric_constants.rs:88:5
200
+ |
201
+ LL | (i32::max_value());
202
+ | ^^^^^^^^^^^^^^^^^^
203
+ |
204
+ help: use the associated constant instead
205
+ |
206
+ LL - (i32::max_value());
207
+ LL + i32::MAX;
208
+ |
209
+
210
+ error: usage of a legacy numeric method
211
+ --> tests/ui/legacy_numeric_constants.rs:91:20
212
+ |
213
+ LL | assert_eq!(0, -(i32::max_value()));
214
+ | ^^^^^^^^^^^^^^^^^^
215
+ |
216
+ help: use the associated constant instead
217
+ |
218
+ LL - assert_eq!(0, -(i32::max_value()));
219
+ LL + assert_eq!(0, -i32::MAX);
220
+ |
221
+
222
+ error: usage of a legacy numeric constant
223
+ --> tests/ui/legacy_numeric_constants.rs:94:5
224
+ |
225
+ LL | (std::i128::MAX);
226
+ | ^^^^^^^^^^^^^^^^
227
+ |
228
+ help: use the associated constant instead
229
+ |
230
+ LL - (std::i128::MAX);
231
+ LL + i128::MAX;
232
+ |
233
+
234
+ error: usage of a legacy numeric method
235
+ --> tests/ui/legacy_numeric_constants.rs:97:5
236
+ |
237
+ LL | (<u32>::max_value());
238
+ | ^^^^^^^^^^^^^^^^^^^^
239
+ |
240
+ help: use the associated constant instead
241
+ |
242
+ LL - (<u32>::max_value());
243
+ LL + u32::MAX;
244
+ |
245
+
186
246
error: usage of a legacy numeric constant
187
- --> tests/ui/legacy_numeric_constants.rs:116 :5
247
+ --> tests/ui/legacy_numeric_constants.rs:131 :5
188
248
|
189
249
LL | std::u32::MAX;
190
250
| ^^^^^^^^^^^^^
@@ -195,5 +255,5 @@ LL - std::u32::MAX;
195
255
LL + u32::MAX;
196
256
|
197
257
198
- error: aborting due to 16 previous errors
258
+ error: aborting due to 21 previous errors
199
259
0 commit comments