File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -230,6 +230,12 @@ impl Instant {
230230impl Add < Duration > for Instant {
231231 type Output = Instant ;
232232
233+ /// # Panics
234+ ///
235+ /// This function may panic if the resulting point in time cannot be represented by the
236+ /// underlying data structure. See [`checked_add`] for a version without panic.
237+ ///
238+ /// [`checked_add`]: ../../std/time/struct.Instant.html#method.checked_add
233239 fn add ( self , other : Duration ) -> Instant {
234240 self . checked_add ( other)
235241 . expect ( "overflow when adding duration to instant" )
@@ -397,6 +403,12 @@ impl SystemTime {
397403impl Add < Duration > for SystemTime {
398404 type Output = SystemTime ;
399405
406+ /// # Panics
407+ ///
408+ /// This function may panic if the resulting point in time cannot be represented by the
409+ /// underlying data structure. See [`checked_add`] for a version without panic.
410+ ///
411+ /// [`checked_add`]: ../../std/time/struct.SystemTime.html#method.checked_add
400412 fn add ( self , dur : Duration ) -> SystemTime {
401413 self . checked_add ( dur)
402414 . expect ( "overflow when adding duration to instant" )
You can’t perform that action at this time.
0 commit comments