Hello, I think there is a unsoundness problem in the following code.
pub fn to_bytes<T>(t: &T) -> &[u8] {
unsafe {
let len = core::intrinsics::size_of_val(t);
let ptr: *const u8 = core::intrinsics::transmute(t);
core::slice::from_raw_parts(ptr, len)
}
}
Hello, I think there is a unsoundness problem in the following code.