From 92c0ad77d5d68ba9be3685399245d693fc80fcc1 Mon Sep 17 00:00:00 2001 From: Ben Kimock Date: Wed, 24 Jul 2024 19:12:50 -0400 Subject: [PATCH] Let InstCombine remove Clone shims inside Clone shims Co-authored-by: scottmcm --- rtstartup/rsbegin.rs | 2 ++ rtstartup/rsend.rs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/rtstartup/rsbegin.rs b/rtstartup/rsbegin.rs index 14bce2bbeee2..9a3d95bd8ddf 100644 --- a/rtstartup/rsbegin.rs +++ b/rtstartup/rsbegin.rs @@ -29,6 +29,8 @@ trait Copy {} #[lang = "freeze"] auto trait Freeze {} +impl Copy for *mut T {} + #[lang = "drop_in_place"] #[inline] #[allow(unconditional_recursion)] diff --git a/rtstartup/rsend.rs b/rtstartup/rsend.rs index 714643c83866..2514eb003440 100644 --- a/rtstartup/rsend.rs +++ b/rtstartup/rsend.rs @@ -17,6 +17,8 @@ trait Copy {} #[lang = "freeze"] auto trait Freeze {} +impl Copy for *mut T {} + #[lang = "drop_in_place"] #[inline] #[allow(unconditional_recursion)]