From 2aca69757f078ac3aad9c2aff3c357ca35e5c486 Mon Sep 17 00:00:00 2001 From: Artyom Pavlov Date: Thu, 13 Sep 2018 01:47:08 +0000 Subject: [PATCH] add panics section to method docs --- src/libcore/time.rs | 9 +++++++++ 1 file changed, 9 insertions(+) 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)]