diff options
| author | Eugene Bulkin <ebulkin@caltech.edu> | 2016-09-14 17:13:06 -0700 |
|---|---|---|
| committer | Eugene Bulkin <ebulkin@caltech.edu> | 2016-09-14 17:13:06 -0700 |
| commit | b6321bd13362d69dc0bc4a1ca8416d58b0ff63d2 (patch) | |
| tree | 13468951c0620b580e2487d9e35558a6b6b067e2 /src/libstd/time | |
| parent | f2eb4f11d0c1e5667678def88235309bd083e7fe (diff) | |
| download | rust-b6321bd13362d69dc0bc4a1ca8416d58b0ff63d2.tar.gz rust-b6321bd13362d69dc0bc4a1ca8416d58b0ff63d2.zip | |
Add feature crate attribute for duration_checked_ops to docs
Diffstat (limited to 'src/libstd/time')
| -rw-r--r-- | src/libstd/time/duration.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libstd/time/duration.rs b/src/libstd/time/duration.rs index 6931c8d6315..246c57ab238 100644 --- a/src/libstd/time/duration.rs +++ b/src/libstd/time/duration.rs @@ -106,6 +106,8 @@ impl Duration { /// Basic usage: /// /// ``` + /// #![feature(duration_checked_ops)] + /// /// use std::time::Duration; /// /// assert_eq!(Duration::new(0, 0).checked_add(Duration::new(0, 1)), Some(Duration::new(0, 1))); @@ -142,6 +144,8 @@ impl Duration { /// Basic usage: /// /// ``` + /// #![feature(duration_checked_ops)] + /// /// use std::time::Duration; /// /// assert_eq!(Duration::new(0, 1).checked_sub(Duration::new(0, 0)), Some(Duration::new(0, 1))); @@ -176,6 +180,8 @@ impl Duration { /// Basic usage: /// /// ``` + /// #![feature(duration_checked_ops)] + /// /// use std::time::Duration; /// /// assert_eq!(Duration::new(0, 500_000_001).checked_mul(2), Some(Duration::new(1, 2))); @@ -209,6 +215,8 @@ impl Duration { /// Basic usage: /// /// ``` + /// #![feature(duration_checked_ops)] + /// /// use std::time::Duration; /// /// assert_eq!(Duration::new(2, 0).checked_div(2), Some(Duration::new(1, 0))); |
