@@ -124,14 +124,13 @@ impl Duration {
124
124
/// # Examples
125
125
///
126
126
/// ```
127
- /// #![feature(duration_zero)]
128
127
/// use std::time::Duration;
129
128
///
130
129
/// let duration = Duration::ZERO;
131
130
/// assert!(duration.is_zero());
132
131
/// assert_eq!(duration.as_nanos(), 0);
133
132
/// ```
134
- #[ unstable ( feature = "duration_zero" , issue = "73544 " ) ]
133
+ #[ stable ( feature = "duration_zero" , since = "1.53.0 " ) ]
135
134
pub const ZERO : Duration = Duration :: from_nanos ( 0 ) ;
136
135
137
136
/// The maximum duration.
@@ -269,7 +268,6 @@ impl Duration {
269
268
/// # Examples
270
269
///
271
270
/// ```
272
- /// #![feature(duration_zero)]
273
271
/// use std::time::Duration;
274
272
///
275
273
/// assert!(Duration::ZERO.is_zero());
@@ -281,7 +279,8 @@ impl Duration {
281
279
/// assert!(!Duration::from_nanos(1).is_zero());
282
280
/// assert!(!Duration::from_secs(1).is_zero());
283
281
/// ```
284
- #[ unstable( feature = "duration_zero" , issue = "73544" ) ]
282
+ #[ stable( feature = "duration_zero" , since = "1.53.0" ) ]
283
+ #[ rustc_const_stable( feature = "duration_zero" , since = "1.53.0" ) ]
285
284
#[ inline]
286
285
pub const fn is_zero ( & self ) -> bool {
287
286
self . secs == 0 && self . nanos == 0
@@ -536,7 +535,6 @@ impl Duration {
536
535
/// # Examples
537
536
///
538
537
/// ```
539
- /// #![feature(duration_zero)]
540
538
/// use std::time::Duration;
541
539
///
542
540
/// assert_eq!(Duration::new(0, 1).saturating_sub(Duration::new(0, 0)), Duration::new(0, 1));
0 commit comments