-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
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.
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.