Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The test is copied from `src/test/ui/crate-loading/crateresolve1.rs` and its auxiliary tests. I added it to the `compile_fail` code example check exemption list since it's hard if not impossible to reproduce this error in a standalone code example.
- Loading branch information
Showing
11 changed files
with
57 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
The compiler found multiple library files with the requested crate name. | ||
|
||
This error can occur in several different cases -- for example, when using | ||
`extern crate` or passing `--extern` options without crate paths. It can also be | ||
caused by caching issues with the build directory, in which case `cargo clean` | ||
may help. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// aux-build:crateresolve1-1.rs | ||
// aux-build:crateresolve1-2.rs | ||
// aux-build:crateresolve1-3.rs | ||
|
||
// normalize-stderr-test: "\.nll/" -> "/" | ||
// normalize-stderr-test: "\\\?\\" -> "" | ||
// normalize-stderr-test: "libcrateresolve1-([123])\.[a-z]+" -> "libcrateresolve1-$1.somelib" | ||
|
||
// NOTE: This test is duplicated from `src/test/ui/crate-loading/crateresolve1.rs`. | ||
|
||
extern crate crateresolve1; | ||
//~^ ERROR multiple matching crates for `crateresolve1` | ||
|
||
fn main() { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
error[E0464]: multiple matching crates for `crateresolve1` | ||
--> $DIR/E0464.rs:11:1 | ||
| | ||
LL | extern crate crateresolve1; | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: candidates: | ||
crate `crateresolve1`: $TEST_BUILD_DIR/error-codes/E0464/auxiliary/libcrateresolve1-1.somelib | ||
crate `crateresolve1`: $TEST_BUILD_DIR/error-codes/E0464/auxiliary/libcrateresolve1-2.somelib | ||
crate `crateresolve1`: $TEST_BUILD_DIR/error-codes/E0464/auxiliary/libcrateresolve1-3.somelib | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0464`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// compile-flags:-C extra-filename=-1 | ||
#![crate_name = "crateresolve1"] | ||
#![crate_type = "lib"] | ||
|
||
pub fn f() -> isize { 10 } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// compile-flags:-C extra-filename=-2 | ||
#![crate_name = "crateresolve1"] | ||
#![crate_type = "lib"] | ||
|
||
pub fn f() -> isize { 20 } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// compile-flags:-C extra-filename=-3 | ||
#![crate_name = "crateresolve1"] | ||
#![crate_type = "lib"] | ||
|
||
pub fn f() -> isize { 30 } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters