Skip to content

Commit 7edc93b

Browse files
authored
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
2 parents 11ff32f + 3510c56 commit 7edc93b

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

library/core/src/clone.rs

+5-8
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,9 @@
77
//! contain owned boxes or implement [`Drop`]), so the compiler considers
88
//! them cheap and safe to copy. For other types copies must be made
99
//! explicitly, by convention implementing the [`Clone`] trait and calling
10-
//! the [`clone`][clone] method.
10+
//! the [`clone`] method.
1111
//!
12-
//! [`Clone`]: trait.Clone.html
13-
//! [clone]: trait.Clone.html#tymethod.clone
14-
//! [`Drop`]: ../../std/ops/trait.Drop.html
12+
//! [`clone`]: Clone::clone
1513
//!
1614
//! Basic usage example:
1715
//!
@@ -51,7 +49,9 @@
5149
/// ## Derivable
5250
///
5351
/// This trait can be used with `#[derive]` if all fields are `Clone`. The `derive`d
54-
/// implementation of [`clone`] calls [`clone`] on each field.
52+
/// implementation of [`Clone`] calls [`clone`] on each field.
53+
///
54+
/// [`clone`]: Clone::clone
5555
///
5656
/// For a generic struct, `#[derive]` implements `Clone` conditionally by adding bound `Clone` on
5757
/// generic parameters.
@@ -74,9 +74,6 @@
7474
/// An example is a generic struct holding a function pointer. In this case, the
7575
/// implementation of `Clone` cannot be `derive`d, but can be implemented as:
7676
///
77-
/// [`Copy`]: ../../std/marker/trait.Copy.html
78-
/// [`clone`]: trait.Clone.html#tymethod.clone
79-
///
8077
/// ```
8178
/// struct Generate<T>(fn() -> T);
8279
///

0 commit comments

Comments
 (0)