4 ms·
For reference, the proper way to get a *const T from a &[T] is the .as_ptr() method. The way &[T] (and any other type not marked with #[repr(C)]) is laid out is
by FreeFull 9y ago
For reference, the proper way to get a *const T from a &[T] is the .as_ptr() method. The way &[T] (and any other type not marked with #[repr(C)]) is laid out is implementation-defined, so accessing its internals isn't recommended.