about summary refs log tree commit diff
path: root/src/doc
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-02-11 08:25:42 +0100
committerGitHub <noreply@github.com>2024-02-11 08:25:42 +0100
commitba405a47bd23baa174f93541fe6005eea57c8bc3 (patch)
tree5fc8d4c0d083ce5f2e51bd61d331548ce9d6d011 /src/doc
parent0c5d8d3d3eba124329f9a3d11f1459488e117708 (diff)
parente077ff0eedd600c1e8e1a556a520b456457b0312 (diff)
downloadrust-ba405a47bd23baa174f93541fe6005eea57c8bc3.tar.gz
rust-ba405a47bd23baa174f93541fe6005eea57c8bc3.zip
Rollup merge of #120307 - djc:duration-constructors, r=Mark-Simulacrum
core: add Duration constructors

Add more `Duration` constructors.

Tracking issue: #120301.

These match similar convenience constructors available on both `chrono::Duration` and `time::Duration`.

What's the best ordering for these with respect to the existing constructors?
Diffstat (limited to 'src/doc')
-rw-r--r--src/doc/unstable-book/src/library-features/duration-constructors.md9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/doc/unstable-book/src/library-features/duration-constructors.md b/src/doc/unstable-book/src/library-features/duration-constructors.md
new file mode 100644
index 00000000000..098519c7c90
--- /dev/null
+++ b/src/doc/unstable-book/src/library-features/duration-constructors.md
@@ -0,0 +1,9 @@
+# `duration_constructors`
+
+The tracking issue for this feature is: [#120301]
+
+[#120301]: https://github.com/rust-lang/rust/issues/120301
+
+------------------------
+
+Add the methods `from_mins`, `from_hours` and `from_days` to `Duration`.