@@ -422,12 +422,13 @@ macro_rules! uint_impl {
422
422
#[ unstable(
423
423
feature = "unchecked_math" ,
424
424
reason = "niche optimization path" ,
425
- issue = "none " ,
425
+ issue = "85122 " ,
426
426
) ]
427
427
#[ must_use = "this returns the result of the operation, \
428
428
without modifying the original"]
429
+ #[ rustc_const_unstable( feature = "const_inherent_unchecked_arith" , issue = "85122" ) ]
429
430
#[ inline( always) ]
430
- pub unsafe fn unchecked_add( self , rhs: Self ) -> Self {
431
+ pub const unsafe fn unchecked_add( self , rhs: Self ) -> Self {
431
432
// SAFETY: the caller must uphold the safety contract for
432
433
// `unchecked_add`.
433
434
unsafe { intrinsics:: unchecked_add( self , rhs) }
@@ -460,12 +461,13 @@ macro_rules! uint_impl {
460
461
#[ unstable(
461
462
feature = "unchecked_math" ,
462
463
reason = "niche optimization path" ,
463
- issue = "none " ,
464
+ issue = "85122 " ,
464
465
) ]
465
466
#[ must_use = "this returns the result of the operation, \
466
467
without modifying the original"]
468
+ #[ rustc_const_unstable( feature = "const_inherent_unchecked_arith" , issue = "85122" ) ]
467
469
#[ inline( always) ]
468
- pub unsafe fn unchecked_sub( self , rhs: Self ) -> Self {
470
+ pub const unsafe fn unchecked_sub( self , rhs: Self ) -> Self {
469
471
// SAFETY: the caller must uphold the safety contract for
470
472
// `unchecked_sub`.
471
473
unsafe { intrinsics:: unchecked_sub( self , rhs) }
@@ -498,12 +500,13 @@ macro_rules! uint_impl {
498
500
#[ unstable(
499
501
feature = "unchecked_math" ,
500
502
reason = "niche optimization path" ,
501
- issue = "none " ,
503
+ issue = "85122 " ,
502
504
) ]
503
505
#[ must_use = "this returns the result of the operation, \
504
506
without modifying the original"]
507
+ #[ rustc_const_unstable( feature = "const_inherent_unchecked_arith" , issue = "85122" ) ]
505
508
#[ inline( always) ]
506
- pub unsafe fn unchecked_mul( self , rhs: Self ) -> Self {
509
+ pub const unsafe fn unchecked_mul( self , rhs: Self ) -> Self {
507
510
// SAFETY: the caller must uphold the safety contract for
508
511
// `unchecked_mul`.
509
512
unsafe { intrinsics:: unchecked_mul( self , rhs) }
0 commit comments