rustc: Improve error messages for resolve failures.