about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-12-18 18:57:03 +0100
committerGitHub <noreply@github.com>2022-12-18 18:57:03 +0100
commit08ecb91db526227ac5bf0af8d4d3dd3bf4828266 (patch)
treed23429850da87eb80a65b119bde85bb752502069
parentc16b969f1d4ae9882181e4af2155e57fc061f6f8 (diff)
parent1ade25491e8849d521fdb655c40102b1ffa15ae6 (diff)
downloadrust-08ecb91db526227ac5bf0af8d4d3dd3bf4828266.tar.gz
rust-08ecb91db526227ac5bf0af8d4d3dd3bf4828266.zip
Rollup merge of #105854 - matthiaskrgr:rmclone, r=compiler-errors
remove redundant clone
-rw-r--r--compiler/rustc_builtin_macros/src/global_allocator.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_builtin_macros/src/global_allocator.rs b/compiler/rustc_builtin_macros/src/global_allocator.rs
index 41531580c19..f8761653bf5 100644
--- a/compiler/rustc_builtin_macros/src/global_allocator.rs
+++ b/compiler/rustc_builtin_macros/src/global_allocator.rs
@@ -35,7 +35,7 @@ pub fn expand(
             (item, true, ecx.with_def_site_ctxt(ty.span))
         } else {
             ecx.sess.parse_sess.span_diagnostic.span_err(item.span(), "allocators must be statics");
-            return vec![orig_item.clone()]
+            return vec![orig_item];
         };
 
     // Generate a bunch of new items using the AllocFnFactory