-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsT-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
When using the rustc_private
feature without the components being installed and you use a compiler crate, you'll get an error like this:
can't find crate for `rustc_metadata`
which is not helpful.
Given the following code:
#![feature(rustc_private)]
extern crate rustc_metadata;
fn main() {
}
The current output is:
error[E0463]: can't find crate for `rustc_metadata`
--> src/main.rs:4:1
|
4 | extern crate rustc_metadata;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't find crate
For more information about this error, try `rustc --explain E0463`.
error: could not compile `metadata-reader` due to previous error
Ideally the output should look like:
error[E0463]: can't find crate for `rustc_metadata`
--> src/main.rs:4:1
|
4 | extern crate rustc_metadata;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't find crate
For more information about this error, try `rustc --explain E0463`.
error: could not compile `metadata-reader` due to previous error
help: maybe you need to install the following components: rust-src rustc-dev llvm-tools-preview
(the last line was added, specifying what could be done to fix the issue)
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsT-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.