forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#84450 - jyn514:missing-std, r=petrochenkov
Give a better error when `std` or `core` are missing - Suggest using `rustup target add` if `RUSTUP_HOME` is set. I don't know if there's any precedent for doing this, but it seems harmless enough and it will be a big help. - On nightly, suggest using `cargo build -Z build-std` if `CARGO` is set - Add a note about `#![no_std]` if `std` is missing but not core - Add a note that std may be unsupported if `std` is missing but not core Fixes rust-lang#84418. r? `@petrochenkov`
- Loading branch information
Showing
4 changed files
with
63 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// compile-flags: --target x86_64-unknown-uefi | ||
// rustc-env:CARGO=/usr/bin/cargo | ||
// rustc-env:RUSTUP_HOME=/home/bors/.rustup | ||
#![no_core] | ||
extern crate core; | ||
//~^ ERROR can't find crate for `core` | ||
//~| NOTE can't find crate | ||
//~| NOTE target may not be installed | ||
//~| HELP consider building the standard library from source with `cargo build -Zbuild-std` | ||
//~| HELP consider downloading the target with `rustup target add x86_64-unknown-uefi` | ||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
error[E0463]: can't find crate for `core` | ||
--> $DIR/missing-std.rs:5:1 | ||
| | ||
LL | extern crate core; | ||
| ^^^^^^^^^^^^^^^^^^ can't find crate | ||
| | ||
= note: the `x86_64-unknown-uefi` target may not be installed | ||
= help: consider downloading the target with `rustup target add x86_64-unknown-uefi` | ||
= help: consider building the standard library from source with `cargo build -Zbuild-std` | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0463`. |