summary refs log tree commit diff
path: root/compiler/rustc_span/src
diff options
context:
space:
mode:
authorTrevor Gross <t.gross35@gmail.com>2024-07-26 02:20:31 -0400
committerGitHub <noreply@github.com>2024-07-26 02:20:31 -0400
commit97eade42f73f9ba081df3811e0ecfd2510e79aff (patch)
treee647d3128f14a7e5179e83104b29f756b522ee44 /compiler/rustc_span/src
parent0f1ea63393a9bde75852633790bd65b6d59943a4 (diff)
parentf4f57bfccb98522f4aaa2942baaa5a381c7d952d (diff)
downloadrust-97eade42f73f9ba081df3811e0ecfd2510e79aff.tar.gz
rust-97eade42f73f9ba081df3811e0ecfd2510e79aff.zip
Rollup merge of #128170 - saethlin:clone-fn, r=compiler-errors
Make Clone::clone a lang item

I want to absorb all the logic for picking whether an Instance is LocalCopy or GloballyShared into one place. As part of this, I wanted to identify Clone shims inside `cross_crate_inlinable` and found that rather tricky. `@compiler-errors` suggested that I add a lang item for `Clone::clone` because that would produce other cleanups in the compiler.

That sounds good to me, but I have looked and I've only been able to find one.

r? compiler-errors
Diffstat (limited to 'compiler/rustc_span/src')
-rw-r--r--compiler/rustc_span/src/symbol.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_span/src/symbol.rs b/compiler/rustc_span/src/symbol.rs
index 2b30ca8a894..6d58c4877cb 100644
--- a/compiler/rustc_span/src/symbol.rs
+++ b/compiler/rustc_span/src/symbol.rs
@@ -557,6 +557,7 @@ symbols! {
         clobber_abi,
         clone,
         clone_closures,
+        clone_fn,
         clone_from,
         closure,
         closure_lifetime_binder,