about summary refs log tree commit diff
path: root/compiler/rustc_llvm/src
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-07-14 14:27:57 -0400
committerMichael Goulet <michael@errs.io>2024-07-16 00:02:44 -0400
commit28503d69ac204ff208d115aea30dc09d6fca8728 (patch)
tree10c775d65355d7a0a32200978a90fbbc20ad5ca4 /compiler/rustc_llvm/src
parent71eb49c318c3e7c25a6306414298d78accd164df (diff)
downloadrust-28503d69ac204ff208d115aea30dc09d6fca8728.tar.gz
rust-28503d69ac204ff208d115aea30dc09d6fca8728.zip
Fix unsafe_op_in_unsafe_fn in compiler
Diffstat (limited to 'compiler/rustc_llvm/src')
-rw-r--r--compiler/rustc_llvm/src/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_llvm/src/lib.rs b/compiler/rustc_llvm/src/lib.rs
index e5366c9b518..1365afbce1c 100644
--- a/compiler/rustc_llvm/src/lib.rs
+++ b/compiler/rustc_llvm/src/lib.rs
@@ -33,7 +33,7 @@ pub unsafe extern "C" fn LLVMRustStringWriteImpl(
     ptr: *const c_char,
     size: size_t,
 ) {
-    let slice = slice::from_raw_parts(ptr as *const u8, size);
+    let slice = unsafe { slice::from_raw_parts(ptr as *const u8, size) };
 
     sr.bytes.borrow_mut().extend_from_slice(slice);
 }