-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and toolsA-error-codesArea: Explanation of an error code (--explain)Area: Explanation of an error code (--explain)T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Description
Location
rust/compiler/rustc_error_codes/src/error_codes/E0460.md
Lines 61 to 67 in 5ecac8e
implementation-specific way. Note that this error can *only* occur when | |
directly compiling and linking with `rustc`; [Cargo] automatically resolves | |
dependencies, without using the compiler's own dependency management that | |
causes this issue. | |
This error can be fixed by: | |
* Using [Cargo], the Rust package manager, automatically fixing this issue. |
Summary
This makes the claim "using cargo will automatically fix your problem". This is unfortunately not true. Consider the following error found while working on #81930:
error[E0460]: found possibly newer version of crate `core` which `itoa` depends on
--> /home/jyn/.local/lib/cargo/registry/src/github.com-1ecc6299db9ec823/serde_json-1.0.85/src/number.rs:295:49
|
295 | N::PosInt(u) => formatter.write_str(itoa::Buffer::new().format(u)),
| ^^^^
|
= note: perhaps that crate needs to be recompiled?
= note: the following crate versions were found:
crate `core`: /home/jyn/src/rust2/build/x86_64-unknown-linux-gnu/stage0-sysroot/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-5670a3f7cd4c9169.rmeta
crate `itoa`: /home/jyn/src/rust2/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps/libitoa-c25ddfbc66feadac.rmeta
All the dependencies involved here were compiled by cargo, but the error still appears. I am currently trying to figure out why; I think it's related to rebuilding the sysroot, but cargo not noticing that it needs to recompile a crate that depends on core
? Maybe rustc needs to add a dependency edge to the .d
files it emits?
Metadata
Metadata
Assignees
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and toolsA-error-codesArea: Explanation of an error code (--explain)Area: Explanation of an error code (--explain)T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)