We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2fff48d commit 8488ae6Copy full SHA for 8488ae6
core/src/clone.rs
@@ -160,6 +160,9 @@ pub trait Clone: Sized {
160
/// ```
161
#[stable(feature = "rust1", since = "1.0.0")]
162
#[must_use = "cloning is often expensive and is not expected to have side effects"]
163
+ // Clone::clone is special because the compiler generates MIR to implement it for some types.
164
+ // See InstanceKind::CloneShim.
165
+ #[cfg_attr(not(bootstrap), lang = "clone_fn")]
166
fn clone(&self) -> Self;
167
168
/// Performs copy-assignment from `source`.
0 commit comments