Skip to content

Commit

Permalink
Rollup merge of #75455 - pickfire:patch-3, r=jyn514
Browse files Browse the repository at this point in the history
Use explicit path link in place for doc in time

r? @jyn514

More worth for your time. :P
  • Loading branch information
JohnTitor authored Aug 13, 2020
2 parents a62dd23 + cda660b commit 9ea03dd
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions library/std/src/time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -359,9 +359,7 @@ impl Add<Duration> for Instant {
/// # Panics
///
/// This function may panic if the resulting point in time cannot be represented by the
/// underlying data structure. See [`checked_add`] for a version without panic.
///
/// [`checked_add`]: Instant::checked_add
/// underlying data structure. See [`Instant::checked_add`] for a version without panic.
fn add(self, other: Duration) -> Instant {
self.checked_add(other).expect("overflow when adding duration to instant")
}
Expand Down Expand Up @@ -525,9 +523,7 @@ impl Add<Duration> for SystemTime {
/// # Panics
///
/// This function may panic if the resulting point in time cannot be represented by the
/// underlying data structure. See [`checked_add`] for a version without panic.
///
/// [`checked_add`]: SystemTime::checked_add
/// underlying data structure. See [`SystemTime::checked_add`] for a version without panic.
fn add(self, dur: Duration) -> SystemTime {
self.checked_add(dur).expect("overflow when adding duration to instant")
}
Expand Down

0 comments on commit 9ea03dd

Please sign in to comment.