]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_builtin_macros/src/alloc_error_handler.rs
Auto merge of #106449 - GuillaumeGomez:rustdoc-gui-retry-mechanism, r=Mark-Simulacrum
[rust.git] / compiler / rustc_builtin_macros / src / alloc_error_handler.rs
index 95e38e4b053f496604f25079b22722e2fbf3dc4b..dcf500ddbd3c8d9fc576d6eb8de1261a05f129b8 100644 (file)
@@ -32,7 +32,7 @@ pub fn expand(
             (item, true, ecx.with_def_site_ctxt(fn_kind.sig.span))
         } else {
             ecx.sess.parse_sess.span_diagnostic.span_err(item.span(), "alloc_error_handler must be a function");
-            return vec![orig_item.clone()];
+            return vec![orig_item];
         };
 
     // Generate a bunch of new items using the AllocFnFactory