File tree 2 files changed +34
-1
lines changed
compiler/rustc_error_codes/src
2 files changed +34
-1
lines changed Original file line number Diff line number Diff line change @@ -276,6 +276,7 @@ E0509: include_str!("./error_codes/E0509.md"),
276
276
E0510 : include_str!( "./error_codes/E0510.md" ) ,
277
277
E0511 : include_str!( "./error_codes/E0511.md" ) ,
278
278
E0512 : include_str!( "./error_codes/E0512.md" ) ,
279
+ E0514 : include_str!( "./error_codes/E0514.md" ) ,
279
280
E0515 : include_str!( "./error_codes/E0515.md" ) ,
280
281
E0516 : include_str!( "./error_codes/E0516.md" ) ,
281
282
E0517 : include_str!( "./error_codes/E0517.md" ) ,
@@ -616,7 +617,6 @@ E0791: include_str!("./error_codes/E0791.md"),
616
617
// E0488, // lifetime of variable does not enclose its declaration
617
618
// E0489, // type/lifetime parameter not in scope here
618
619
E0490 , // a value of type `..` is borrowed for too long
619
- E0514 , // metadata version mismatch
620
620
E0523 , // two dependencies have same (crate-name, disambiguator) but different SVH
621
621
// E0526, // shuffle indices are not constant
622
622
// E0540, // multiple rustc_deprecated attributes
Original file line number Diff line number Diff line change
1
+ Dependency compiled with different version of ` rustc ` .
2
+
3
+ Example of erroneous code:
4
+
5
+ ` a.rs `
6
+ ``` ignore (cannot-link-with-other-tests)
7
+ // compiled with stable `rustc`
8
+
9
+ #[crate_type = "lib"]
10
+ ```
11
+
12
+ ` b.rs `
13
+ ``` ignore (cannot-link-with-other-tests)
14
+ // compiled with nightly `rustc`
15
+
16
+ #[crate_type = "lib"]
17
+
18
+ extern crate a; // error: found crate `a` compiled by an incompatible version
19
+ // of rustc
20
+ ```
21
+
22
+ This error is caused when the version of ` rustc ` used to compile a crate, as
23
+ stored in the binary's metadata, differs from the version of one of its
24
+ dependencies. Many parts of Rust binaries are considered unstable. For
25
+ instance, the Rust ABI is not stable between compiler versions. This means that
26
+ the compiler cannot be sure about * how* to call a function between compiler
27
+ versions, and therefore this error occurs.
28
+
29
+ This error can be fixed by:
30
+ * Using [ Cargo] ( ../cargo/index.html ) , the Rust package manager and
31
+ [ Rustup] ( https://rust-lang.github.io/rustup/ ) , the Rust toolchain installer,
32
+ automatically fixing this issue.
33
+ * Recompiling the crates with a uniform ` rustc ` version.
You can’t perform that action at this time.
0 commit comments