@@ -72,10 +72,10 @@ LL | u32::MAX;
7272 | +++++
7373
7474error: usage of a legacy numeric method
75- --> tests/ui/legacy_numeric_constants.rs:50:10
75+ --> tests/ui/legacy_numeric_constants.rs:50:5
7676 |
7777LL | i32::max_value();
78- | ^^^^^^^^^^^
78+ | ^^^^^ ^^^^^^^^^^^
7979 |
8080help: use the associated constant instead
8181 |
@@ -84,10 +84,10 @@ LL + i32::MAX;
8484 |
8585
8686error: usage of a legacy numeric method
87- --> tests/ui/legacy_numeric_constants.rs:53:9
87+ --> tests/ui/legacy_numeric_constants.rs:53:5
8888 |
8989LL | u8::max_value();
90- | ^^^^^^^^^^^
90+ | ^^^^ ^^^^^^^^^^^
9191 |
9292help: use the associated constant instead
9393 |
@@ -96,10 +96,10 @@ LL + u8::MAX;
9696 |
9797
9898error: usage of a legacy numeric method
99- --> tests/ui/legacy_numeric_constants.rs:56:9
99+ --> tests/ui/legacy_numeric_constants.rs:56:5
100100 |
101101LL | u8::min_value();
102- | ^^^^^^^^^^^
102+ | ^^^^ ^^^^^^^^^^^
103103 |
104104help: use the associated constant instead
105105 |
@@ -120,10 +120,10 @@ LL + u8::MIN;
120120 |
121121
122122error: usage of a legacy numeric method
123- --> tests/ui/legacy_numeric_constants.rs:62:27
123+ --> tests/ui/legacy_numeric_constants.rs:62:5
124124 |
125125LL | ::std::primitive::u8::min_value();
126- | ^^^^^^^^^^^
126+ | ^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^
127127 |
128128help: use the associated constant instead
129129 |
@@ -132,10 +132,10 @@ LL + ::std::primitive::u8::MIN;
132132 |
133133
134134error: usage of a legacy numeric method
135- --> tests/ui/legacy_numeric_constants.rs:65:26
135+ --> tests/ui/legacy_numeric_constants.rs:65:5
136136 |
137137LL | std::primitive::i32::max_value();
138- | ^^^^^^^^^^^
138+ | ^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^
139139 |
140140help: use the associated constant instead
141141 |
@@ -171,8 +171,20 @@ LL - let x = std::u64::MAX;
171171LL + let x = u64::MAX;
172172 |
173173
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+
174186error: usage of a legacy numeric constant
175- --> tests/ui/legacy_numeric_constants.rs:82 :14
187+ --> tests/ui/legacy_numeric_constants.rs:85 :14
176188 |
177189LL | [(0, "", std::i128::MAX)];
178190 | ^^^^^^^^^^^^^^
@@ -183,8 +195,56 @@ LL - [(0, "", std::i128::MAX)];
183195LL + [(0, "", i128::MAX)];
184196 |
185197
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+
186246error: usage of a legacy numeric constant
187- --> tests/ui/legacy_numeric_constants.rs:116 :5
247+ --> tests/ui/legacy_numeric_constants.rs:131 :5
188248 |
189249LL | std::u32::MAX;
190250 | ^^^^^^^^^^^^^
@@ -195,5 +255,5 @@ LL - std::u32::MAX;
195255LL + u32::MAX;
196256 |
197257
198- error: aborting due to 16 previous errors
258+ error: aborting due to 21 previous errors
199259
0 commit comments