We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 42ebbd2 commit dfdc989Copy full SHA for dfdc989
library/std/src/sys/pal/sgx/abi/usercalls/alloc.rs
@@ -158,8 +158,7 @@ unsafe impl<T: UserSafeSized> UserSafe for [T] {
158
let elem_size = size_of::<T>();
159
assert_eq!(size % elem_size, 0);
160
let len = size / elem_size;
161
- // SAFETY: The caller must uphold the safety contract for `from_raw_sized_unchecked`
162
- unsafe { slice::from_raw_parts_mut(ptr as _, len) }
+ ptr::slice_from_raw_parts_mut(ptr as _, len)
163
}
164
165
0 commit comments