librustc: Take in account mutability when casting array to raw ptr.

Fixes #14845.
On Fri, Jun 13, 2014 at 12:15:04PM -0700, Luqman Aden wrote:
> Currently, we allow `&mut T` to `*mut T` but not `&mut [T]` to `*mut T`. This change just disallows something like `&[T]` to `*mut T`.

ok, hmm, I must have misread the patch.