Fix an ICE when dereferencing types which cannot be dereferenced
auto merge of #5963 : alexcrichton/rust/fix-ice, r=pcwalton

I ran across this when working on some other changes, and it looked like it wasn't too hard to "fix". I'm not very familiar with this code, but it looks like if an error was already generated there's no need to generate and ICE as well when parts of the program can just be ignored for more incorrectness.