Function slice_get_unchecked

unsafe const fn slice_get_unchecked<ItemPtr: bounds::ChangePointee<[T], Pointee = T, Output = SlicePtr>, SlicePtr, T>(slice_ptr: SlicePtr, index: usize) -> ItemPtr

Projects to the index-th element of slice_ptr, as the same kind of pointer as the slice was provided -- so &mut [T] → &mut T, &[T] → &T, *mut [T] → *mut T, or *const [T] → *const T -- without a bounds check.

This is exposed via <usize as SliceIndex>::get(_unchecked)(_mut), and isn't intended to be used elsewhere.

Expands in MIR to {&, &mut, &raw const, &raw mut} (*slice_ptr)[index], depending on the types involved, so no backend support is needed.

Safety