Skip to content

Commit

Permalink
Rollup merge of rust-lang#127128 - elomatreb:elomatreb/stabilize-dura…
Browse files Browse the repository at this point in the history
…tion_abs_diff, r=joboet

Stabilize `duration_abs_diff`

Stabilize `duration_abs_diff` following FCP in rust-lang#117618. Closes rust-lang#117618.
  • Loading branch information
GuillaumeGomez authored Jul 1, 2024
2 parents e89547a + 7f383d0 commit c2dbae6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
5 changes: 3 additions & 2 deletions library/core/src/time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -620,13 +620,14 @@ impl Duration {
/// Basic usage:
///
/// ```
/// #![feature(duration_abs_diff)]
/// use std::time::Duration;
///
/// assert_eq!(Duration::new(100, 0).abs_diff(Duration::new(80, 0)), Duration::new(20, 0));
/// assert_eq!(Duration::new(100, 400_000_000).abs_diff(Duration::new(110, 0)), Duration::new(9, 600_000_000));
/// ```
#[unstable(feature = "duration_abs_diff", issue = "117618")]
#[stable(feature = "duration_abs_diff", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "duration_abs_diff", since = "CURRENT_RUSTC_VERSION")]
#[rustc_allow_const_fn_unstable(const_option)]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]
Expand Down
1 change: 0 additions & 1 deletion library/core/tests/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
#![feature(core_private_bignum)]
#![feature(core_private_diy_float)]
#![feature(dec2flt)]
#![feature(duration_abs_diff)]
#![feature(duration_consts_float)]
#![feature(duration_constants)]
#![feature(duration_constructors)]
Expand Down

0 comments on commit c2dbae6

Please sign in to comment.