about summary refs log tree commit diff
path: root/library/std/src/io/cursor.rs
diff options
context:
space:
mode:
Diffstat (limited to 'library/std/src/io/cursor.rs')
-rw-r--r--library/std/src/io/cursor.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/std/src/io/cursor.rs b/library/std/src/io/cursor.rs
index a1a8b2a3505..2ed64a40495 100644
--- a/library/std/src/io/cursor.rs
+++ b/library/std/src/io/cursor.rs
@@ -482,7 +482,7 @@ where
     A: Allocator,
 {
     debug_assert!(vec.capacity() >= pos + buf.len());
-    vec.as_mut_ptr().add(pos).copy_from(buf.as_ptr(), buf.len());
+    unsafe { vec.as_mut_ptr().add(pos).copy_from(buf.as_ptr(), buf.len()) };
     pos + buf.len()
 }