From 5e49a4165e0846af6e8ee0aa4a27d434363d4ae5 Mon Sep 17 00:00:00 2001 From: Elichai Turkel Date: Thu, 2 Nov 2023 10:43:59 +0200 Subject: [PATCH] Add track_caller to transmute_copy --- library/core/src/mem/mod.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/library/core/src/mem/mod.rs b/library/core/src/mem/mod.rs index 8792134cdc862..199a4e8ee4530 100644 --- a/library/core/src/mem/mod.rs +++ b/library/core/src/mem/mod.rs @@ -1054,6 +1054,7 @@ pub const fn copy(x: &T) -> T { /// ``` #[inline] #[must_use] +#[track_caller] #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_stable(feature = "const_transmute_copy", since = "1.74.0")] pub const unsafe fn transmute_copy(src: &Src) -> Dst {