Fix ICE when casting `&[T]` to `*const [T]`

Closes #16947
auto merge of #16953 : nick29581/rust/dst-bug-7, r=pcwalton

Closes #16947 

r?