diff options
| author | Stuart Cook <Zalathar@users.noreply.github.com> | 2025-08-10 19:45:51 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-10 19:45:51 +1000 |
| commit | c15c2f0a428c97e26ffa90ea13a11eabddd28978 (patch) | |
| tree | 1c5166beee7dd01f37bfb1524d95b0d3e8923b4d /library/core/src | |
| parent | 7b3afa65540e13deb346d7a0b34b30bd43eec46b (diff) | |
| parent | b5e2ba67756896eb76322882cceb979625c0514b (diff) | |
| download | rust-c15c2f0a428c97e26ffa90ea13a11eabddd28978.tar.gz rust-c15c2f0a428c97e26ffa90ea13a11eabddd28978.zip | |
Rollup merge of #145135 - Kivooeo:stabilize-duration_constructors_lite, r=ChrisDenton
Stabilize `duration_constructors_lite` feature This closes [tracking issue](https://github.com/rust-lang/rust/issues/140881) and stabilises `Duration::from_hours` and `Duration::from_mins` while not touching a `duration_constructors` feature from the related [tracking issue (2)](https://github.com/rust-lang/rust/issues/120301)
Diffstat (limited to 'library/core/src')
| -rw-r--r-- | library/core/src/time.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/library/core/src/time.rs b/library/core/src/time.rs index 0fb5c0bac75..9a0f5e0faef 100644 --- a/library/core/src/time.rs +++ b/library/core/src/time.rs @@ -373,7 +373,6 @@ impl Duration { /// # Examples /// /// ``` - /// #![feature(duration_constructors_lite)] /// use std::time::Duration; /// /// let duration = Duration::from_hours(6); @@ -381,7 +380,8 @@ impl Duration { /// assert_eq!(6 * 60 * 60, duration.as_secs()); /// assert_eq!(0, duration.subsec_nanos()); /// ``` - #[unstable(feature = "duration_constructors_lite", issue = "140881")] + #[stable(feature = "duration_constructors_lite", since = "CURRENT_RUSTC_VERSION")] + #[rustc_const_stable(feature = "duration_constructors_lite", since = "CURRENT_RUSTC_VERSION")] #[must_use] #[inline] pub const fn from_hours(hours: u64) -> Duration { @@ -401,7 +401,6 @@ impl Duration { /// # Examples /// /// ``` - /// #![feature(duration_constructors_lite)] /// use std::time::Duration; /// /// let duration = Duration::from_mins(10); @@ -409,7 +408,8 @@ impl Duration { /// assert_eq!(10 * 60, duration.as_secs()); /// assert_eq!(0, duration.subsec_nanos()); /// ``` - #[unstable(feature = "duration_constructors_lite", issue = "140881")] + #[stable(feature = "duration_constructors_lite", since = "CURRENT_RUSTC_VERSION")] + #[rustc_const_stable(feature = "duration_constructors_lite", since = "CURRENT_RUSTC_VERSION")] #[must_use] #[inline] pub const fn from_mins(mins: u64) -> Duration { |
