-
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 lintsA-resolveArea: Name/path resolution done by `rustc_resolve` specificallyArea: Name/path resolution done by `rustc_resolve` specificallyC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
A newbie Rustacean was trying to use the gba
crate and they forgot to put #![no_std]
in the lib.rs
of their downstream project. The GBA uses a Tier 3 target with build-std
, and so they landed on this error:
error[E0463]: can't find crate for `std`
|
= note: the `thumbv4t-none-eabi` target may not be installed
error: aborting due to previous error
For more information about this error, try `rustc --explain E0463`.
error: could not compile `gba-rust`
This is a poor experience. It's pretty vague about what went wrong, and has no suggestion of what the person can do to try and fix it.
Ideally, the error message should say something like:
std
is required bycratenamehere
because it does not declare#![no_std]
And then the user can have at least an idea of what to investigate.
PatchMixolydic, diondokter, jonas-schievink, Hpmason, workingjubilee and 2 more
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-resolveArea: Name/path resolution done by `rustc_resolve` specificallyArea: Name/path resolution done by `rustc_resolve` specificallyC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.