about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTyler Mandry <tmandry@gmail.com>2020-09-01 18:24:43 -0700
committerGitHub <noreply@github.com>2020-09-01 18:24:43 -0700
commit7edc93b45c6fa6515ce08f3fb8741560d4f2d139 (patch)
tree806c0873c06391a1f946cc73c17d65415d037cf0
parent11ff32f9ecabb0806140d5e950b5c19698cc5efc (diff)
parent3510c568874eb1274805b25cfa5cc54aa1819030 (diff)
downloadrust-7edc93b45c6fa6515ce08f3fb8741560d4f2d139.tar.gz
rust-7edc93b45c6fa6515ce08f3fb8741560d4f2d139.zip
Rollup merge of #76207 - denisvasilik:intra-doc-links-core-clone, r=jyn514
# Move to intra-doc links for library/core/src/clone.rs

Helps with #75080.

@rustbot modify labels: T-doc, A-intra-doc-links
-rw-r--r--library/core/src/clone.rs13
1 files changed, 5 insertions, 8 deletions
diff --git a/library/core/src/clone.rs b/library/core/src/clone.rs
index 7784ec687ea..a953a3a4182 100644
--- a/library/core/src/clone.rs
+++ b/library/core/src/clone.rs
@@ -7,11 +7,9 @@
 //! contain owned boxes or implement [`Drop`]), so the compiler considers
 //! them cheap and safe to copy. For other types copies must be made
 //! explicitly, by convention implementing the [`Clone`] trait and calling
-//! the [`clone`][clone] method.
+//! the [`clone`] method.
 //!
-//! [`Clone`]: trait.Clone.html
-//! [clone]: trait.Clone.html#tymethod.clone
-//! [`Drop`]: ../../std/ops/trait.Drop.html
+//! [`clone`]: Clone::clone
 //!
 //! Basic usage example:
 //!
@@ -51,7 +49,9 @@
 /// ## Derivable
 ///
 /// This trait can be used with `#[derive]` if all fields are `Clone`. The `derive`d
-/// implementation of [`clone`] calls [`clone`] on each field.
+/// implementation of [`Clone`] calls [`clone`] on each field.
+///
+/// [`clone`]: Clone::clone
 ///
 /// For a generic struct, `#[derive]` implements `Clone` conditionally by adding bound `Clone` on
 /// generic parameters.
@@ -74,9 +74,6 @@
 /// An example is a generic struct holding a function pointer. In this case, the
 /// implementation of `Clone` cannot be `derive`d, but can be implemented as:
 ///
-/// [`Copy`]: ../../std/marker/trait.Copy.html
-/// [`clone`]: trait.Clone.html#tymethod.clone
-///
 /// ```
 /// struct Generate<T>(fn() -> T);
 ///