1
Fork 0

Rollup merge of #75348 - denisvasilik:intra-doc-links-core-time, r=jyn514

Move to intra-doc links in library/core/src/time.rs

Helps with #75080.
This commit is contained in:
Yuki Okushi 2020-08-10 09:08:01 +09:00 committed by GitHub
commit 64d71095c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -30,12 +30,10 @@ const MICROS_PER_SEC: u64 = 1_000_000;
/// nanosecond-level precision, APIs binding a system timeout will typically round up
/// the number of nanoseconds.
///
/// `Duration`s implement many common traits, including [`Add`], [`Sub`], and other
/// [`ops`] traits. It implements `Default` by returning a zero-length `Duration`.
/// [`Duration`]s implement many common traits, including [`Add`], [`Sub`], and other
/// [`ops`] traits. It implements [`Default`] by returning a zero-length `Duration`.
///
/// [`Add`]: ../../std/ops/trait.Add.html
/// [`Sub`]: ../../std/ops/trait.Sub.html
/// [`ops`]: ../../std/ops/index.html
/// [`ops`]: crate::ops
///
/// # Examples
///
@ -293,7 +291,7 @@ impl Duration {
/// + duration.subsec_nanos() as f64 * 1e-9);
/// ```
///
/// [`subsec_nanos`]: #method.subsec_nanos
/// [`subsec_nanos`]: Duration::subsec_nanos
#[stable(feature = "duration", since = "1.3.0")]
#[rustc_const_stable(feature = "duration", since = "1.32.0")]
#[inline]
@ -421,8 +419,6 @@ impl Duration {
/// Checked `Duration` addition. Computes `self + other`, returning [`None`]
/// if overflow occurred.
///
/// [`None`]: ../../std/option/enum.Option.html#variant.None
///
/// # Examples
///
/// Basic usage:
@ -457,8 +453,6 @@ impl Duration {
/// Checked `Duration` subtraction. Computes `self - other`, returning [`None`]
/// if the result would be negative or if overflow occurred.
///
/// [`None`]: ../../std/option/enum.Option.html#variant.None
///
/// # Examples
///
/// Basic usage:
@ -494,8 +488,6 @@ impl Duration {
/// Checked `Duration` multiplication. Computes `self * other`, returning
/// [`None`] if overflow occurred.
///
/// [`None`]: ../../std/option/enum.Option.html#variant.None
///
/// # Examples
///
/// Basic usage:
@ -526,8 +518,6 @@ impl Duration {
/// Checked `Duration` division. Computes `self / other`, returning [`None`]
/// if `other == 0`.
///
/// [`None`]: ../../std/option/enum.Option.html#variant.None
///
/// # Examples
///
/// Basic usage: