@@ -422,12 +422,13 @@ macro_rules! uint_impl {
422422 #[ unstable(
423423 feature = "unchecked_math" ,
424424 reason = "niche optimization path" ,
425- issue = "none " ,
425+ issue = "85122 " ,
426426 ) ]
427427 #[ must_use = "this returns the result of the operation, \
428428 without modifying the original"]
429+ #[ rustc_const_unstable( feature = "const_inherent_unchecked_arith" , issue = "85122" ) ]
429430 #[ inline( always) ]
430- pub unsafe fn unchecked_add( self , rhs: Self ) -> Self {
431+ pub const unsafe fn unchecked_add( self , rhs: Self ) -> Self {
431432 // SAFETY: the caller must uphold the safety contract for
432433 // `unchecked_add`.
433434 unsafe { intrinsics:: unchecked_add( self , rhs) }
@@ -460,12 +461,13 @@ macro_rules! uint_impl {
460461 #[ unstable(
461462 feature = "unchecked_math" ,
462463 reason = "niche optimization path" ,
463- issue = "none " ,
464+ issue = "85122 " ,
464465 ) ]
465466 #[ must_use = "this returns the result of the operation, \
466467 without modifying the original"]
468+ #[ rustc_const_unstable( feature = "const_inherent_unchecked_arith" , issue = "85122" ) ]
467469 #[ inline( always) ]
468- pub unsafe fn unchecked_sub( self , rhs: Self ) -> Self {
470+ pub const unsafe fn unchecked_sub( self , rhs: Self ) -> Self {
469471 // SAFETY: the caller must uphold the safety contract for
470472 // `unchecked_sub`.
471473 unsafe { intrinsics:: unchecked_sub( self , rhs) }
@@ -498,12 +500,13 @@ macro_rules! uint_impl {
498500 #[ unstable(
499501 feature = "unchecked_math" ,
500502 reason = "niche optimization path" ,
501- issue = "none " ,
503+ issue = "85122 " ,
502504 ) ]
503505 #[ must_use = "this returns the result of the operation, \
504506 without modifying the original"]
507+ #[ rustc_const_unstable( feature = "const_inherent_unchecked_arith" , issue = "85122" ) ]
505508 #[ inline( always) ]
506- pub unsafe fn unchecked_mul( self , rhs: Self ) -> Self {
509+ pub const unsafe fn unchecked_mul( self , rhs: Self ) -> Self {
507510 // SAFETY: the caller must uphold the safety contract for
508511 // `unchecked_mul`.
509512 unsafe { intrinsics:: unchecked_mul( self , rhs) }
0 commit comments