@@ -279,28 +279,6 @@ $EndFeature, "
279
279
pub const MAX : Self = !Self :: MIN ;
280
280
}
281
281
282
- doc_comment! {
283
- "Returns the smallest value that can be represented by this integer type." ,
284
- #[ stable( feature = "rust1" , since = "1.0.0" ) ]
285
- #[ inline( always) ]
286
- #[ rustc_promotable]
287
- #[ rustc_const_stable( feature = "const_min_value" , since = "1.32.0" ) ]
288
- pub const fn min_value( ) -> Self {
289
- Self :: MIN
290
- }
291
- }
292
-
293
- doc_comment! {
294
- "Returns the largest value that can be represented by this integer type." ,
295
- #[ stable( feature = "rust1" , since = "1.0.0" ) ]
296
- #[ inline( always) ]
297
- #[ rustc_promotable]
298
- #[ rustc_const_stable( feature = "const_max_value" , since = "1.32.0" ) ]
299
- pub const fn max_value( ) -> Self {
300
- Self :: MAX
301
- }
302
- }
303
-
304
282
doc_comment! {
305
283
concat!( "Converts a string slice in a given base to an integer.
306
284
@@ -2351,6 +2329,38 @@ fn read_ne_", stringify!($SelfT), "(input: &mut &[u8]) -> ", stringify!($SelfT),
2351
2329
unsafe { mem:: transmute( bytes) }
2352
2330
}
2353
2331
}
2332
+
2333
+ doc_comment! {
2334
+ concat!( "**This method is soft-deprecated.**
2335
+
2336
+ Although using it won’t cause compilation warning,
2337
+ new code should use [`" , stringify!( $SelfT) , "::MIN" , "`](#associatedconstant.MIN) instead.
2338
+
2339
+ Returns the smallest value that can be represented by this integer type." ) ,
2340
+ #[ stable( feature = "rust1" , since = "1.0.0" ) ]
2341
+ #[ inline( always) ]
2342
+ #[ rustc_promotable]
2343
+ #[ rustc_const_stable( feature = "const_min_value" , since = "1.32.0" ) ]
2344
+ pub const fn min_value( ) -> Self {
2345
+ Self :: MIN
2346
+ }
2347
+ }
2348
+
2349
+ doc_comment! {
2350
+ concat!( "**This method is soft-deprecated.**
2351
+
2352
+ Although using it won’t cause compilation warning,
2353
+ new code should use [`" , stringify!( $SelfT) , "::MAX" , "`](#associatedconstant.MAX) instead.
2354
+
2355
+ Returns the largest value that can be represented by this integer type." ) ,
2356
+ #[ stable( feature = "rust1" , since = "1.0.0" ) ]
2357
+ #[ inline( always) ]
2358
+ #[ rustc_promotable]
2359
+ #[ rustc_const_stable( feature = "const_max_value" , since = "1.32.0" ) ]
2360
+ pub const fn max_value( ) -> Self {
2361
+ Self :: MAX
2362
+ }
2363
+ }
2354
2364
}
2355
2365
}
2356
2366
@@ -2454,24 +2464,6 @@ $EndFeature, "
2454
2464
pub const MAX : Self = !0 ;
2455
2465
}
2456
2466
2457
- doc_comment! {
2458
- "Returns the smallest value that can be represented by this integer type." ,
2459
- #[ stable( feature = "rust1" , since = "1.0.0" ) ]
2460
- #[ rustc_promotable]
2461
- #[ inline( always) ]
2462
- #[ rustc_const_stable( feature = "const_max_value" , since = "1.32.0" ) ]
2463
- pub const fn min_value( ) -> Self { Self :: MIN }
2464
- }
2465
-
2466
- doc_comment! {
2467
- "Returns the largest value that can be represented by this integer type." ,
2468
- #[ stable( feature = "rust1" , since = "1.0.0" ) ]
2469
- #[ rustc_promotable]
2470
- #[ inline( always) ]
2471
- #[ rustc_const_stable( feature = "const_max_value" , since = "1.32.0" ) ]
2472
- pub const fn max_value( ) -> Self { Self :: MAX }
2473
- }
2474
-
2475
2467
doc_comment! {
2476
2468
concat!( "Converts a string slice in a given base to an integer.
2477
2469
@@ -4277,6 +4269,34 @@ fn read_ne_", stringify!($SelfT), "(input: &mut &[u8]) -> ", stringify!($SelfT),
4277
4269
unsafe { mem:: transmute( bytes) }
4278
4270
}
4279
4271
}
4272
+
4273
+ doc_comment! {
4274
+ concat!( "**This method is soft-deprecated.**
4275
+
4276
+ Although using it won’t cause compilation warning,
4277
+ new code should use [`" , stringify!( $SelfT) , "::MIN" , "`](#associatedconstant.MIN) instead.
4278
+
4279
+ Returns the smallest value that can be represented by this integer type." ) ,
4280
+ #[ stable( feature = "rust1" , since = "1.0.0" ) ]
4281
+ #[ rustc_promotable]
4282
+ #[ inline( always) ]
4283
+ #[ rustc_const_stable( feature = "const_max_value" , since = "1.32.0" ) ]
4284
+ pub const fn min_value( ) -> Self { Self :: MIN }
4285
+ }
4286
+
4287
+ doc_comment! {
4288
+ concat!( "**This method is soft-deprecated.**
4289
+
4290
+ Although using it won’t cause compilation warning,
4291
+ new code should use [`" , stringify!( $SelfT) , "::MAX" , "`](#associatedconstant.MAX) instead.
4292
+
4293
+ Returns the largest value that can be represented by this integer type." ) ,
4294
+ #[ stable( feature = "rust1" , since = "1.0.0" ) ]
4295
+ #[ rustc_promotable]
4296
+ #[ inline( always) ]
4297
+ #[ rustc_const_stable( feature = "const_max_value" , since = "1.32.0" ) ]
4298
+ pub const fn max_value( ) -> Self { Self :: MAX }
4299
+ }
4280
4300
}
4281
4301
}
4282
4302
0 commit comments