Open
Description
Given a crate that depends on bytes 1.1.0
, trying to cargo build --target target_that_is_not_installed
results in
error[E0463]: can't find crate for `core`
|
= note: the `x86_64-unknown-redox` target may not be installed
= help: consider downloading the target with `rustup target add x86_64-unknown-redox`
error[E0463]: can't find crate for `compiler_builtins`
error[E0463]: can't find crate for `alloc`
--> /home/jplatte/.cargo/registry/src/github.com-1ecc6299db9ec823/bytes-1.1.0/src/lib.rs:78:1
|
78 | extern crate alloc;
| ^^^^^^^^^^^^^^^^^^^ can't find crate
error[E0463]: can't find crate for `std`
--> /home/jplatte/.cargo/registry/src/github.com-1ecc6299db9ec823/bytes-1.1.0/src/lib.rs:81:1
|
81 | extern crate std;
| ^^^^^^^^^^^^^^^^^ can't find crate
|
= note: the `x86_64-unknown-redox` target may not be installed
= help: consider downloading the target with `rustup target add x86_64-unknown-redox`
error[E0463]: can't find crate for `core`
--> /home/jplatte/.cargo/registry/src/github.com-1ecc6299db9ec823/bytes-1.1.0/src/buf/buf_impl.rs:5:5
|
5 | use core::{cmp, mem, ptr};
| ^^^^ can't find crate
|
= note: the `x86_64-unknown-redox` target may not be installed
= help: consider downloading the target with `rustup target add x86_64-unknown-redox`
followed by a few more can't find crate for `core`
errors, followed by around 500 additional errors about individual items from the standard library not being found. The first of these appear very fast, so it's inconvenient (and sometimes impossible due to scrollback limitations) to actually find the relevant errors at the start.
I think at least one of two things should happen here:
- Failing to find a critical crate like
core
orstd
should abort compilation immediately - If an external crate (or a module?) can't be resolved, don't report errors about symbols not being found that were meant to be imported from there