File tree 2 files changed +31
-1
lines changed
compiler/rustc_error_codes/src
2 files changed +31
-1
lines changed Original file line number Diff line number Diff line change @@ -244,6 +244,7 @@ E0457: include_str!("./error_codes/E0457.md"),
244
244
E0458 : include_str!( "./error_codes/E0458.md" ) ,
245
245
E0459 : include_str!( "./error_codes/E0459.md" ) ,
246
246
E0460 : include_str!( "./error_codes/E0460.md" ) ,
247
+ E0461 : include_str!( "./error_codes/E0461.md" ) ,
247
248
E0462 : include_str!( "./error_codes/E0462.md" ) ,
248
249
E0463 : include_str!( "./error_codes/E0463.md" ) ,
249
250
E0464 : include_str!( "./error_codes/E0464.md" ) ,
@@ -595,7 +596,6 @@ E0791: include_str!("./error_codes/E0791.md"),
595
596
// E0421, // merged into 531
596
597
// E0427, // merged into 530
597
598
// E0456, // plugin `..` is not available for triple `..`
598
- E0461 , // couldn't find crate `..` with expected target triple ..
599
599
E0465 , // multiple .. candidates for `..` found
600
600
// E0467, // removed
601
601
// E0470, // removed
Original file line number Diff line number Diff line change
1
+ Couldn't find crate ` .. ` with expected target triple ` .. ` .
2
+
3
+ Example of erroneous code:
4
+
5
+ ` a.rs `
6
+ ``` ignore (cannot-link-with-other-tests)
7
+ #![crate_type = "lib"]
8
+
9
+ fn foo() {}
10
+ ```
11
+
12
+ ` main.rs `
13
+ ``` ignore (cannot-link-with-other-tests)
14
+ extern crate a;
15
+
16
+ fn main() {
17
+ a::foo();
18
+ }
19
+ ```
20
+
21
+ ` a.rs ` is then compiled with ` --target powerpc-unknown-linux-gnu ` and ` b.rs `
22
+ with ` --target x86_64-unknown-linux-gnu ` . ` a.rs ` is compiled into a binary
23
+ format incompatible with ` b.rs ` ; PowerPC and x86 are totally different
24
+ architectures. This issue also extends to any difference in target triples, as
25
+ ` std ` is operating-system specific.
26
+
27
+ This error can be fixed by:
28
+ * Using [ Cargo] ( ../cargo/index.html ) , the Rust package manager, automatically
29
+ fixing this issue.
30
+ * Recompiling either crate so that they target a consistent target triple.
You can’t perform that action at this time.
0 commit comments