Description
Location
https://doc.rust-lang.org/std/slice/trait.SliceIndex.html#tymethod.get_unchecked
https://doc.rust-lang.org/std/slice/trait.SliceIndex.html#tymethod.get_unchecked_mut
Summary
The documentation for these methods state respectively:
Returns a shared reference to the output at this location
Returns a mutable reference to the output at this location
However these clearly return pointers rather than references.
Later on they state the following restrictions, which make sense for references but it isn't clear to me that this restriction is necessary for pointers.
Calling this method with an out-of-bounds index or a dangling slice pointer is undefined behavior even if the resulting reference is not used.
At the very least the s/reference/pointer/
change needs to be made there too.