librustc: Stop trying to make invalid slice with vec in statics.

Fixes #5917 by not trying to treat `&[T]` as a slice since it already is one.