Open
Description
Location
rust/compiler/rustc_error_codes/src/error_codes/E0460.md
Lines 61 to 67 in 5ecac8e
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?