Skip to content

Commit 4a8f4b7

Browse files
committed
stabilize duration_extras feature
1 parent 335195d commit 4a8f4b7

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/libcore/time.rs

+3-6
Original file line numberDiff line numberDiff line change
@@ -158,15 +158,14 @@ impl Duration {
158158
/// # Examples
159159
///
160160
/// ```
161-
/// #![feature(duration_extras)]
162161
/// use std::time::Duration;
163162
///
164163
/// let duration = Duration::from_nanos(1_000_000_123);
165164
///
166165
/// assert_eq!(1, duration.as_secs());
167166
/// assert_eq!(123, duration.subsec_nanos());
168167
/// ```
169-
#[unstable(feature = "duration_extras", issue = "46507")]
168+
#[stable(feature = "duration_extras", since = "1.27.0")]
170169
#[inline]
171170
pub const fn from_nanos(nanos: u64) -> Duration {
172171
Duration {
@@ -216,14 +215,13 @@ impl Duration {
216215
/// # Examples
217216
///
218217
/// ```
219-
/// #![feature(duration_extras)]
220218
/// use std::time::Duration;
221219
///
222220
/// let duration = Duration::from_millis(5432);
223221
/// assert_eq!(duration.as_secs(), 5);
224222
/// assert_eq!(duration.subsec_millis(), 432);
225223
/// ```
226-
#[unstable(feature = "duration_extras", issue = "46507")]
224+
#[stable(feature = "duration_extras", since = "1.27.0")]
227225
#[inline]
228226
pub fn subsec_millis(&self) -> u32 { self.nanos / NANOS_PER_MILLI }
229227

@@ -236,14 +234,13 @@ impl Duration {
236234
/// # Examples
237235
///
238236
/// ```
239-
/// #![feature(duration_extras, duration_from_micros)]
240237
/// use std::time::Duration;
241238
///
242239
/// let duration = Duration::from_micros(1_234_567);
243240
/// assert_eq!(duration.as_secs(), 1);
244241
/// assert_eq!(duration.subsec_micros(), 234_567);
245242
/// ```
246-
#[unstable(feature = "duration_extras", issue = "46507")]
243+
#[stable(feature = "duration_extras", since = "1.27.0")]
247244
#[inline]
248245
pub fn subsec_micros(&self) -> u32 { self.nanos / NANOS_PER_MICRO }
249246

0 commit comments

Comments
 (0)