File tree 1 file changed +5
-8
lines changed
1 file changed +5
-8
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.
10
+ //! the [`clone`] method.
11
11
//!
12
- //! [`Clone`]: trait.Clone.html
13
- //! [clone]: trait.Clone.html#tymethod.clone
14
- //! [`Drop`]: ../../std/ops/trait.Drop.html
12
+ //! [`clone`]: Clone::clone
15
13
//!
16
14
//! Basic usage example:
17
15
//!
51
49
/// ## Derivable
52
50
///
53
51
/// 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
55
55
///
56
56
/// For a generic struct, `#[derive]` implements `Clone` conditionally by adding bound `Clone` on
57
57
/// generic parameters.
74
74
/// An example is a generic struct holding a function pointer. In this case, the
75
75
/// implementation of `Clone` cannot be `derive`d, but can be implemented as:
76
76
///
77
- /// [`Copy`]: ../../std/marker/trait.Copy.html
78
- /// [`clone`]: trait.Clone.html#tymethod.clone
79
- ///
80
77
/// ```
81
78
/// struct Generate<T>(fn() -> T);
82
79
///
You can’t perform that action at this time.
0 commit comments