@@ -182,7 +182,6 @@ impl Duration {
182182 #[ inline]
183183 #[ must_use]
184184 #[ rustc_const_stable( feature = "duration_consts_2" , since = "1.58.0" ) ]
185- #[ cfg_attr( bootstrap, rustc_allow_const_fn_unstable( const_panic) ) ]
186185 pub const fn new ( secs : u64 , nanos : u32 ) -> Duration {
187186 let secs = match secs. checked_add ( ( nanos / NANOS_PER_SEC ) as u64 ) {
188187 Some ( secs) => secs,
@@ -482,7 +481,6 @@ impl Duration {
482481 without modifying the original"]
483482 #[ inline]
484483 #[ rustc_const_stable( feature = "duration_consts_2" , since = "1.58.0" ) ]
485- #[ cfg_attr( bootstrap, rustc_allow_const_fn_unstable( const_panic) ) ]
486484 pub const fn checked_add ( self , rhs : Duration ) -> Option < Duration > {
487485 if let Some ( mut secs) = self . secs . checked_add ( rhs. secs ) {
488486 let mut nanos = self . nanos + rhs. nanos ;
@@ -543,7 +541,6 @@ impl Duration {
543541 without modifying the original"]
544542 #[ inline]
545543 #[ rustc_const_stable( feature = "duration_consts_2" , since = "1.58.0" ) ]
546- #[ cfg_attr( bootstrap, rustc_allow_const_fn_unstable( const_panic) ) ]
547544 pub const fn checked_sub ( self , rhs : Duration ) -> Option < Duration > {
548545 if let Some ( mut secs) = self . secs . checked_sub ( rhs. secs ) {
549546 let nanos = if self . nanos >= rhs. nanos {
@@ -602,7 +599,6 @@ impl Duration {
602599 without modifying the original"]
603600 #[ inline]
604601 #[ rustc_const_stable( feature = "duration_consts_2" , since = "1.58.0" ) ]
605- #[ cfg_attr( bootstrap, rustc_allow_const_fn_unstable( const_panic) ) ]
606602 pub const fn checked_mul ( self , rhs : u32 ) -> Option < Duration > {
607603 // Multiply nanoseconds as u64, because it cannot overflow that way.
608604 let total_nanos = self . nanos as u64 * rhs as u64 ;
@@ -660,7 +656,6 @@ impl Duration {
660656 without modifying the original"]
661657 #[ inline]
662658 #[ rustc_const_stable( feature = "duration_consts_2" , since = "1.58.0" ) ]
663- #[ cfg_attr( bootstrap, rustc_allow_const_fn_unstable( const_panic) ) ]
664659 pub const fn checked_div ( self , rhs : u32 ) -> Option < Duration > {
665660 if rhs != 0 {
666661 let secs = self . secs / ( rhs as u64 ) ;
0 commit comments