Closed
Description
I just discovered an UB whilst testing another project with miri. Primitive::from_slice
andPrimitive::from_slice_mut
perform an invalid unsafe cast, which is detected by miri.
EDIT: #1358 showed that it is just a matter of a wrong as_ptr
fn, therefore Primitive::from_slice
is likely to be unaffected.
Expected
cargo +nightly miri test
should not raise any problem.
Actual behaviour
test buffer_::test::mut_iter
triggers UB.
Reproduction steps
Just run miri on tests