We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ff016a5 commit 7e66d45Copy full SHA for 7e66d45
compiler/rustc_error_codes/src/error_codes.rs
@@ -241,6 +241,7 @@ E0454: include_str!("./error_codes/E0454.md"),
241
E0455: include_str!("./error_codes/E0455.md"),
242
E0458: include_str!("./error_codes/E0458.md"),
243
E0459: include_str!("./error_codes/E0459.md"),
244
+E0460: include_str!("./error_codes/E0460.md"),
245
E0463: include_str!("./error_codes/E0463.md"),
246
E0464: include_str!("./error_codes/E0464.md"),
247
E0466: include_str!("./error_codes/E0466.md"),
@@ -593,7 +594,6 @@ E0791: include_str!("./error_codes/E0791.md"),
593
594
// E0427, // merged into 530
595
// E0456, // plugin `..` is not available for triple `..`
596
E0457, // plugin `..` only found in rlib format, but must be available...
- E0460, // found possibly newer version of crate `..`
597
E0461, // couldn't find crate `..` with expected target triple ..
598
E0462, // found staticlib `..` instead of rlib or dylib
599
E0465, // multiple .. candidates for `..` found
compiler/rustc_error_codes/src/error_codes/E0460.md
@@ -0,0 +1,71 @@
1
+Found possibly newer version of crate `..` which `..` depends on.
2
+
3
+Consider these erroneous files:
4
5
+`a1.rs`
6
+```ignore (needs-linkage-with-other-tests)
7
+#![crate_name = "a"]
8
9
+pub fn foo<T>() {}
10
+```
11
12
+`a2.rs`
13
14
15
16
+pub fn foo<T>() {
17
+ println!("foo<T>()");
18
+}
19
20
21
+`b.rs`
22
23
+#![crate_name = "b"]
24
25
+extern crate a; // linked with `a1.rs`
26
27
+pub fn foo() {
28
+ a::foo::<isize>();
29
30
31
32
+`main.rs`
33
34
+extern crate a; // linked with `a2.rs`
35
+extern crate b; // error: found possibly newer version of crate `a` which `b`
36
+ // depends on
37
38
+fn main() {}
39
40
41
+The dependency graph of this program can be represented as follows:
42
+```text
43
+ crate `main`
44
+ |
45
+ +-------------+
46
+ | |
47
+ | v
48
+depends: | crate `b`
49
+ `a` v1 | |
50
+ | | depends:
51
+ | | `a` v2
52
+ v |
53
+ crate `a` <------+
54
55
56
+Crate `main` depends on crate `a` (version 1) and crate `b` which in turn
57
+depends on crate `a` (version 2); this discrepancy in versions cannot be
58
+reconciled. This difference in versions typically occurs when one crate is
59
+compiled and linked, then updated and linked to another crate. The crate
60
+"version" is a SVH (Strict Version Hash) of the crate in an
61
+implementation-specific way. Note that this error can *only* occur when
62
+directly compiling and linking with `rustc`; [Cargo] automatically resolves
63
+dependencies, without using the compiler's own dependency management that
64
+causes this issue.
65
66
+This error can be fixed by:
67
+* Using [Cargo], the Rust package manager, automatically fixing this issue.
68
+* Recompiling crate `a` so that both crate `b` and `main` have a uniform
69
+version to depend on.
70
71
+[Cargo]: ../cargo/index.html
src/test/ui/svh/changing-crates.stderr
@@ -11,3 +11,4 @@ LL | extern crate b;
error: aborting due to previous error
+For more information about this error, try `rustc --explain E0460`.
src/test/ui/svh/svh-change-lit.stderr
src/test/ui/svh/svh-change-significant-cfg.stderr
src/test/ui/svh/svh-change-trait-bound.stderr
src/test/ui/svh/svh-change-type-arg.stderr
src/test/ui/svh/svh-change-type-ret.stderr
src/test/ui/svh/svh-change-type-static.stderr
src/test/ui/svh/svh-use-trait.stderr
@@ -11,3 +11,4 @@ LL | extern crate utb;
0 commit comments