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.
cast_slice_from_raw_parts
1 parent 7817b8a commit 3c848f7Copy full SHA for 3c848f7
crates/libs/core/src/array.rs
@@ -97,7 +97,7 @@ impl<T: Type<T>> Array<T> {
97
unsafe {
98
// Call the destructors of all the elements of the old array
99
// SAFETY: the slice cannot be used after the call to `drop_in_place`
100
- core::ptr::drop_in_place(core::slice::from_raw_parts_mut(data, len as usize));
+ core::ptr::drop_in_place(core::ptr::slice_from_raw_parts_mut(data, len as usize));
101
// Free the data memory where the elements were
102
// SAFETY: we have unique access to the data pointer at this point
103
// so freeing it is the right thing to do
0 commit comments