Open
Description
[example]
let layout = Layout::array::<u8>(10).unwrap();
let ptr = alloc(layout);
slice::from_raw_parts_mut(ptr, 10);
dealloc(ptr, layout);
This would have prevented an actual issue I had where I accidentally used slice::from_raw_parts
instead of ptr::slice_from_raw_parts
from a version-aware import.
More generally, this is the "create reference to uninitialized memory" catch, but since these two methods have now-stable sound alternatives, it'd be nice for miri to catch incorrect usage and point at the correct raw pointer version.