Closed
Description
Today when you compile for a target that does not exist rustc gives the standard message for failing to find a crate, for std
. We can and should be more explicit about what this means. Actually what is almost certainly happening is that you don't have that target installed:
$ rustc --target=asmjs-unknown-emscripten hello.rs
error[E0463]: can't find crate for `std`
error: aborting due to previous error
It could instead say:
$ rustc --target=asmjs-unknown-emscripten hello.rs
error[E0463]: can't find crate for `std`
note: the `asmjs-unknown-emscripten` target is not installed
error: aborting due to previous error
A reasonable heuristic for printing this might be if the crate is named std
or core
and the sysroot is not overridden.