File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change 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//!
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.
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///
You can’t perform that action at this time.
0 commit comments