diff options
| author | Artyom Pavlov <newpavlov@gmail.com> | 2018-09-13 01:47:08 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-09-13 01:47:08 +0000 |
| commit | 2aca69757f078ac3aad9c2aff3c357ca35e5c486 (patch) | |
| tree | ddb813647af7dd264c5dc15ed3b6369f2e56d0a5 | |
| parent | 9e78cb24461177ee1477abcbda01e3c4158722d1 (diff) | |
| download | rust-2aca69757f078ac3aad9c2aff3c357ca35e5c486.tar.gz rust-2aca69757f078ac3aad9c2aff3c357ca35e5c486.zip | |
add panics section to method docs
| -rw-r--r-- | src/libcore/time.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libcore/time.rs b/src/libcore/time.rs index f0e4b29700b..e2990c8660e 100644 --- a/src/libcore/time.rs +++ b/src/libcore/time.rs @@ -480,6 +480,9 @@ impl Duration { /// Creates a new `Duration` from the specified number of seconds. /// + /// # Panics + /// This constructor will panic if `secs` is not finite, negative or overflows `Duration`. + /// /// # Examples /// ``` /// #![feature(duration_float)] @@ -510,6 +513,9 @@ impl Duration { /// Multiply `Duration` by `f64`. /// + /// # Panics + /// This method will panic if result is not finite, negative or overflows `Duration`. + /// /// # Examples /// ``` /// #![feature(duration_float)] @@ -527,6 +533,9 @@ impl Duration { /// Divide `Duration` by `f64`. /// + /// # Panics + /// This method will panic if result is not finite, negative or overflows `Duration`. + /// /// # Examples /// ``` /// #![feature(duration_float)] |
