-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Open
Labels
A-cratesArea: Crates and their interactions (like crate loading)Area: Crates and their interactions (like crate loading)A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsD-confusingDiagnostics: Confusing error or lint that should be reworked.Diagnostics: Confusing error or lint that should be reworked.D-newcomer-roadblockDiagnostics: Confusing error or lint; hard to understand for new users.Diagnostics: Confusing error or lint; hard to understand for new users.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
Using a crate like rand
without adding it to dependencies produces a long message:
error[E0658]: use of unstable library feature 'rustc_private': this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via 'Cargo.toml' instead? (see issue #27812)
etc.
This is pretty incomprehensible for a Rust beginner, compared to the normal error when failing to add a dependency:
error[E0463]: can't find crate for `nom`
--> src/main.rs:1:1
|
1 | extern crate nom;
| ^^^^^^^^^^^^^^^^^ can't find crate
Meta
rustc --version --verbose
:
% rustc --version --verbose
rustc 1.27.0-nightly (79252ff4e 2018-04-29)
binary: rustc
commit-hash: 79252ff4e25d82f9fe856cb66f127b79cdace163
commit-date: 2018-04-29
host: x86_64-apple-darwin
release: 1.27.0-nightly
LLVM version: 6.0
ami-GS, kevlarr, waynepiekarski, talbergs, zoechi and 5 more
Metadata
Metadata
Assignees
Labels
A-cratesArea: Crates and their interactions (like crate loading)Area: Crates and their interactions (like crate loading)A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsD-confusingDiagnostics: Confusing error or lint that should be reworked.Diagnostics: Confusing error or lint that should be reworked.D-newcomer-roadblockDiagnostics: Confusing error or lint; hard to understand for new users.Diagnostics: Confusing error or lint; hard to understand for new users.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.