Skip to content

Commit

Permalink
add panics section to method docs
Browse files Browse the repository at this point in the history
  • Loading branch information
newpavlov authored Sep 13, 2018
1 parent 9e78cb2 commit 2aca697
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/libcore/time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down Expand Up @@ -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)]
Expand All @@ -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)]
Expand Down

0 comments on commit 2aca697

Please sign in to comment.