about summary refs log tree commit diff
path: root/library/std/src/sys/os_str/bytes.rs
diff options
context:
space:
mode:
authorZachary S <zasample18+github@gmail.com>2024-11-01 00:07:59 -0500
committerZachary S <zasample18+github@gmail.com>2024-11-12 15:08:41 -0600
commite0c1c8bc5058cd3f8831b235c5963ab89840b33b (patch)
treef94b56c98e276e94c3d8c5b77773fb9d0a0d059b /library/std/src/sys/os_str/bytes.rs
parent6503543d11583d1686d4989847b2afbec8d9fdba (diff)
downloadrust-e0c1c8bc5058cd3f8831b235c5963ab89840b33b.tar.gz
rust-e0c1c8bc5058cd3f8831b235c5963ab89840b33b.zip
Make `CloneToUninit` dyn-compatible
Diffstat (limited to 'library/std/src/sys/os_str/bytes.rs')
-rw-r--r--library/std/src/sys/os_str/bytes.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/library/std/src/sys/os_str/bytes.rs b/library/std/src/sys/os_str/bytes.rs
index 8e0609fe48c..5b65d862be1 100644
--- a/library/std/src/sys/os_str/bytes.rs
+++ b/library/std/src/sys/os_str/bytes.rs
@@ -352,8 +352,8 @@ impl Slice {
 unsafe impl CloneToUninit for Slice {
     #[inline]
     #[cfg_attr(debug_assertions, track_caller)]
-    unsafe fn clone_to_uninit(&self, dst: *mut Self) {
-        // SAFETY: we're just a wrapper around [u8]
-        unsafe { self.inner.clone_to_uninit(&raw mut (*dst).inner) }
+    unsafe fn clone_to_uninit(&self, dst: *mut u8) {
+        // SAFETY: we're just a transparent wrapper around [u8]
+        unsafe { self.inner.clone_to_uninit(dst) }
     }
 }