diff options
| author | bors <bors@rust-lang.org> | 2024-07-26 08:26:17 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-07-26 08:26:17 +0000 |
| commit | 83d67685acb520fe68d5d5adde4b25fb725490de (patch) | |
| tree | c9d069da3bff063adb089082f8703c2c4c993d83 /library/core | |
| parent | 6ef11b81c2c02c3c4b7556d1991a98572fe9af87 (diff) | |
| parent | 97eade42f73f9ba081df3811e0ecfd2510e79aff (diff) | |
Auto merge of #128222 - tgross35:rollup-fk7qdo3, r=tgross35
Rollup of 7 pull requests Successful merges: - #126575 (Make it crystal clear what lint `type_alias_bounds` actually signifies) - #127017 (Extend rules of dead code analysis for impls for adts to impls for types refer to adts) - #127523 (Migrate `dump-ice-to-disk` and `panic-abort-eh_frame` `run-make` tests to rmake) - #127557 (Add a label to point to the lacking macro name definition) - #127989 (Migrate `interdependent-c-libraries`, `compiler-rt-works-on-mingw` and `incr-foreign-head-span` `run-make` tests to rmake) - #128099 (migrate tests/run-make/extern-flag-disambiguates to rmake) - #128170 (Make Clone::clone a lang item) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'library/core')
| -rw-r--r-- | library/core/src/clone.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/library/core/src/clone.rs b/library/core/src/clone.rs index 939b2be6dfa..76a89eaaff8 100644 --- a/library/core/src/clone.rs +++ b/library/core/src/clone.rs @@ -160,6 +160,9 @@ pub trait Clone: Sized { /// ``` #[stable(feature = "rust1", since = "1.0.0")] #[must_use = "cloning is often expensive and is not expected to have side effects"] + // Clone::clone is special because the compiler generates MIR to implement it for some types. + // See InstanceKind::CloneShim. + #[cfg_attr(not(bootstrap), lang = "clone_fn")] fn clone(&self) -> Self; /// Performs copy-assignment from `source`. |
