File tree 1 file changed +2
-9
lines changed
1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change 7
7
//! contain owned boxes or implement [`Drop`]), so the compiler considers
8
8
//! them cheap and safe to copy. For other types copies must be made
9
9
//! explicitly, by convention implementing the [`Clone`] trait and calling
10
- //! the [`clone`][clone] method.
11
- //!
12
- //! [`Clone`]: trait.Clone.html
13
- //! [clone]: trait.Clone.html#tymethod.clone
14
- //! [`Drop`]: ../../std/ops/trait.Drop.html
10
+ //! the [`Clone::clone`] method.
15
11
//!
16
12
//! Basic usage example:
17
13
//!
51
47
/// ## Derivable
52
48
///
53
49
/// This trait can be used with `#[derive]` if all fields are `Clone`. The `derive`d
54
- /// implementation of [`clone`] calls [`clone`] on each field.
50
+ /// implementation of [`Clone:: clone`] calls [`Clone:: clone`] on each field.
55
51
///
56
52
/// For a generic struct, `#[derive]` implements `Clone` conditionally by adding bound `Clone` on
57
53
/// generic parameters.
74
70
/// An example is a generic struct holding a function pointer. In this case, the
75
71
/// implementation of `Clone` cannot be `derive`d, but can be implemented as:
76
72
///
77
- /// [`Copy`]: ../../std/marker/trait.Copy.html
78
- /// [`clone`]: trait.Clone.html#tymethod.clone
79
- ///
80
73
/// ```
81
74
/// struct Generate<T>(fn() -> T);
82
75
///
You can’t perform that action at this time.
0 commit comments