Add test for showing rmeta candidates in error
This commit is contained in:
parent
642a43a9cd
commit
ad49cb6e0c
5 changed files with 39 additions and 0 deletions
5
src/test/ui/crate-loading/auxiliary/crateresolve2-1.rs
Normal file
5
src/test/ui/crate-loading/auxiliary/crateresolve2-1.rs
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
// compile-flags:-C extra-filename=-1 --emit=metadata
|
||||||
|
#![crate_name = "crateresolve2"]
|
||||||
|
#![crate_type = "lib"]
|
||||||
|
|
||||||
|
pub fn f() -> isize { 10 }
|
5
src/test/ui/crate-loading/auxiliary/crateresolve2-2.rs
Normal file
5
src/test/ui/crate-loading/auxiliary/crateresolve2-2.rs
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
// compile-flags:-C extra-filename=-2 --emit=metadata
|
||||||
|
#![crate_name = "crateresolve2"]
|
||||||
|
#![crate_type = "lib"]
|
||||||
|
|
||||||
|
pub fn f() -> isize { 20 }
|
5
src/test/ui/crate-loading/auxiliary/crateresolve2-3.rs
Normal file
5
src/test/ui/crate-loading/auxiliary/crateresolve2-3.rs
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
// compile-flags:-C extra-filename=-3 --emit=metadata
|
||||||
|
#![crate_name = "crateresolve2"]
|
||||||
|
#![crate_type = "lib"]
|
||||||
|
|
||||||
|
pub fn f() -> isize { 30 }
|
14
src/test/ui/crate-loading/crateresolve2.rs
Normal file
14
src/test/ui/crate-loading/crateresolve2.rs
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
// check-fail
|
||||||
|
|
||||||
|
// aux-build:crateresolve2-1.rs
|
||||||
|
// aux-build:crateresolve2-2.rs
|
||||||
|
// aux-build:crateresolve2-3.rs
|
||||||
|
|
||||||
|
// normalize-stderr-test: "\.nll/" -> "/"
|
||||||
|
// normalize-stderr-test: "\\\?\\" -> ""
|
||||||
|
|
||||||
|
extern crate crateresolve2;
|
||||||
|
//~^ ERROR multiple matching crates for `crateresolve2`
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
}
|
10
src/test/ui/crate-loading/crateresolve2.stderr
Normal file
10
src/test/ui/crate-loading/crateresolve2.stderr
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
error[E0464]: multiple matching crates for `crateresolve2`
|
||||||
|
--> $DIR/crateresolve2.rs:10:1
|
||||||
|
|
|
||||||
|
LL | extern crate crateresolve2;
|
||||||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
|
||||||
|
= note: candidates:
|
||||||
|
|
||||||
|
error: aborting due to previous error
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue