ptr
RS-S1012Conversion from a raw slice to ptr
results in undefined behavior.
Consider using the following conversion methods:
std::ptr::slice_from_raw_parts
to convert a ptr
and len
pair into a raw slicestd::slice::as_ptr
to convert a raw slice to a ptr
let x = &[10, 10, 20];
let foo = x as *const [i32] as *const i32;