Skip to content

Commit c5ab1f0

Browse files
Rollup merge of rust-lang#127128 - elomatreb:elomatreb/stabilize-duration_abs_diff, r=joboet
Stabilize `duration_abs_diff` Stabilize `duration_abs_diff` following FCP in rust-lang#117618. Closes rust-lang#117618.
2 parents f090672 + f96a321 commit c5ab1f0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

core/src/time.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -620,13 +620,14 @@ impl Duration {
620620
/// Basic usage:
621621
///
622622
/// ```
623-
/// #![feature(duration_abs_diff)]
624623
/// use std::time::Duration;
625624
///
626625
/// assert_eq!(Duration::new(100, 0).abs_diff(Duration::new(80, 0)), Duration::new(20, 0));
627626
/// assert_eq!(Duration::new(100, 400_000_000).abs_diff(Duration::new(110, 0)), Duration::new(9, 600_000_000));
628627
/// ```
629-
#[unstable(feature = "duration_abs_diff", issue = "117618")]
628+
#[stable(feature = "duration_abs_diff", since = "CURRENT_RUSTC_VERSION")]
629+
#[rustc_const_stable(feature = "duration_abs_diff", since = "CURRENT_RUSTC_VERSION")]
630+
#[rustc_allow_const_fn_unstable(const_option)]
630631
#[must_use = "this returns the result of the operation, \
631632
without modifying the original"]
632633
#[inline]

core/tests/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
#![feature(core_private_bignum)]
3131
#![feature(core_private_diy_float)]
3232
#![feature(dec2flt)]
33-
#![feature(duration_abs_diff)]
3433
#![feature(duration_consts_float)]
3534
#![feature(duration_constants)]
3635
#![feature(duration_constructors)]

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy