add panics section to method docs

This commit is contained in:
Artyom Pavlov 2018-09-13 01:47:08 +00:00 committed by GitHub
parent 9e78cb2446
commit 2aca69757f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)]