File tree 1 file changed +12
-0
lines changed
1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -230,6 +230,12 @@ impl Instant {
230
230
impl Add < Duration > for Instant {
231
231
type Output = Instant ;
232
232
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
233
239
fn add ( self , other : Duration ) -> Instant {
234
240
self . checked_add ( other)
235
241
. expect ( "overflow when adding duration to instant" )
@@ -397,6 +403,12 @@ impl SystemTime {
397
403
impl Add < Duration > for SystemTime {
398
404
type Output = SystemTime ;
399
405
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
400
412
fn add ( self , dur : Duration ) -> SystemTime {
401
413
self . checked_add ( dur)
402
414
. expect ( "overflow when adding duration to instant" )
You can’t perform that action at this time.
0 commit comments