summaryrefslogtreecommitdiffstats
path: root/tests/ui/crate-loading
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/ui/crate-loading/auxiliary/crateresolve1-1.rs6
-rw-r--r--tests/ui/crate-loading/auxiliary/crateresolve1-2.rs6
-rw-r--r--tests/ui/crate-loading/auxiliary/crateresolve1-3.rs6
-rw-r--r--tests/ui/crate-loading/auxiliary/crateresolve2-1.rs (renamed from src/test/ui/crate-loading/auxiliary/crateresolve2-1.rs)0
-rw-r--r--tests/ui/crate-loading/auxiliary/crateresolve2-2.rs (renamed from src/test/ui/crate-loading/auxiliary/crateresolve2-2.rs)0
-rw-r--r--tests/ui/crate-loading/auxiliary/crateresolve2-3.rs (renamed from src/test/ui/crate-loading/auxiliary/crateresolve2-3.rs)0
-rw-r--r--tests/ui/crate-loading/auxiliary/libfoo.rlib (renamed from src/test/ui/crate-loading/auxiliary/libfoo.rlib)0
-rw-r--r--tests/ui/crate-loading/auxiliary/proc-macro.rs (renamed from src/test/ui/crate-loading/auxiliary/proc-macro.rs)0
-rw-r--r--tests/ui/crate-loading/crateresolve1.rs14
-rw-r--r--tests/ui/crate-loading/crateresolve1.stderr13
-rw-r--r--tests/ui/crate-loading/crateresolve2.rs13
-rw-r--r--tests/ui/crate-loading/crateresolve2.stderr13
-rw-r--r--tests/ui/crate-loading/cross-compiled-proc-macro.rs (renamed from src/test/ui/crate-loading/cross-compiled-proc-macro.rs)0
-rw-r--r--tests/ui/crate-loading/invalid-rlib.rs (renamed from src/test/ui/crate-loading/invalid-rlib.rs)0
-rw-r--r--tests/ui/crate-loading/invalid-rlib.stderr (renamed from src/test/ui/crate-loading/invalid-rlib.stderr)0
-rw-r--r--tests/ui/crate-loading/missing-std.rs (renamed from src/test/ui/crate-loading/missing-std.rs)0
-rw-r--r--tests/ui/crate-loading/missing-std.stderr (renamed from src/test/ui/crate-loading/missing-std.stderr)0
17 files changed, 71 insertions, 0 deletions
diff --git a/tests/ui/crate-loading/auxiliary/crateresolve1-1.rs b/tests/ui/crate-loading/auxiliary/crateresolve1-1.rs
new file mode 100644
index 000000000..bd9c8483e
--- /dev/null
+++ b/tests/ui/crate-loading/auxiliary/crateresolve1-1.rs
@@ -0,0 +1,6 @@
+// compile-flags:-C extra-filename=-1
+// no-prefer-dynamic
+#![crate_name = "crateresolve1"]
+#![crate_type = "lib"]
+
+pub fn f() -> isize { 10 }
diff --git a/tests/ui/crate-loading/auxiliary/crateresolve1-2.rs b/tests/ui/crate-loading/auxiliary/crateresolve1-2.rs
new file mode 100644
index 000000000..bd0f08f45
--- /dev/null
+++ b/tests/ui/crate-loading/auxiliary/crateresolve1-2.rs
@@ -0,0 +1,6 @@
+// compile-flags:-C extra-filename=-2
+// no-prefer-dynamic
+#![crate_name = "crateresolve1"]
+#![crate_type = "lib"]
+
+pub fn f() -> isize { 20 }
diff --git a/tests/ui/crate-loading/auxiliary/crateresolve1-3.rs b/tests/ui/crate-loading/auxiliary/crateresolve1-3.rs
new file mode 100644
index 000000000..1226c2fbb
--- /dev/null
+++ b/tests/ui/crate-loading/auxiliary/crateresolve1-3.rs
@@ -0,0 +1,6 @@
+// compile-flags:-C extra-filename=-3
+// no-prefer-dynamic
+#![crate_name = "crateresolve1"]
+#![crate_type = "lib"]
+
+pub fn f() -> isize { 30 }
diff --git a/src/test/ui/crate-loading/auxiliary/crateresolve2-1.rs b/tests/ui/crate-loading/auxiliary/crateresolve2-1.rs
index e9459ed07..e9459ed07 100644
--- a/src/test/ui/crate-loading/auxiliary/crateresolve2-1.rs
+++ b/tests/ui/crate-loading/auxiliary/crateresolve2-1.rs
diff --git a/src/test/ui/crate-loading/auxiliary/crateresolve2-2.rs b/tests/ui/crate-loading/auxiliary/crateresolve2-2.rs
index c45416827..c45416827 100644
--- a/src/test/ui/crate-loading/auxiliary/crateresolve2-2.rs
+++ b/tests/ui/crate-loading/auxiliary/crateresolve2-2.rs
diff --git a/src/test/ui/crate-loading/auxiliary/crateresolve2-3.rs b/tests/ui/crate-loading/auxiliary/crateresolve2-3.rs
index b356db4b6..b356db4b6 100644
--- a/src/test/ui/crate-loading/auxiliary/crateresolve2-3.rs
+++ b/tests/ui/crate-loading/auxiliary/crateresolve2-3.rs
diff --git a/src/test/ui/crate-loading/auxiliary/libfoo.rlib b/tests/ui/crate-loading/auxiliary/libfoo.rlib
index e69de29bb..e69de29bb 100644
--- a/src/test/ui/crate-loading/auxiliary/libfoo.rlib
+++ b/tests/ui/crate-loading/auxiliary/libfoo.rlib
diff --git a/src/test/ui/crate-loading/auxiliary/proc-macro.rs b/tests/ui/crate-loading/auxiliary/proc-macro.rs
index 52631de57..52631de57 100644
--- a/src/test/ui/crate-loading/auxiliary/proc-macro.rs
+++ b/tests/ui/crate-loading/auxiliary/proc-macro.rs
diff --git a/tests/ui/crate-loading/crateresolve1.rs b/tests/ui/crate-loading/crateresolve1.rs
new file mode 100644
index 000000000..61a1ee263
--- /dev/null
+++ b/tests/ui/crate-loading/crateresolve1.rs
@@ -0,0 +1,14 @@
+// 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: "(lib)?crateresolve1-([123])\.[a-z]+" -> "libcrateresolve1-$2.somelib"
+
+// NOTE: This test is duplicated at `tests/ui/error-codes/E0464.rs`.
+
+extern crate crateresolve1;
+//~^ ERROR multiple candidates for `rlib` dependency `crateresolve1` found
+
+fn main() {}
diff --git a/tests/ui/crate-loading/crateresolve1.stderr b/tests/ui/crate-loading/crateresolve1.stderr
new file mode 100644
index 000000000..7b840b526
--- /dev/null
+++ b/tests/ui/crate-loading/crateresolve1.stderr
@@ -0,0 +1,13 @@
+error[E0464]: multiple candidates for `rlib` dependency `crateresolve1` found
+ --> $DIR/crateresolve1.rs:11:1
+ |
+LL | extern crate crateresolve1;
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: candidate #1: $TEST_BUILD_DIR/crate-loading/crateresolve1/auxiliary/libcrateresolve1-1.somelib
+ = note: candidate #2: $TEST_BUILD_DIR/crate-loading/crateresolve1/auxiliary/libcrateresolve1-2.somelib
+ = note: candidate #3: $TEST_BUILD_DIR/crate-loading/crateresolve1/auxiliary/libcrateresolve1-3.somelib
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0464`.
diff --git a/tests/ui/crate-loading/crateresolve2.rs b/tests/ui/crate-loading/crateresolve2.rs
new file mode 100644
index 000000000..0774c0dfd
--- /dev/null
+++ b/tests/ui/crate-loading/crateresolve2.rs
@@ -0,0 +1,13 @@
+// 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 candidates for `rmeta` dependency `crateresolve2` found
+
+fn main() {}
diff --git a/tests/ui/crate-loading/crateresolve2.stderr b/tests/ui/crate-loading/crateresolve2.stderr
new file mode 100644
index 000000000..a36f4f022
--- /dev/null
+++ b/tests/ui/crate-loading/crateresolve2.stderr
@@ -0,0 +1,13 @@
+error[E0464]: multiple candidates for `rmeta` dependency `crateresolve2` found
+ --> $DIR/crateresolve2.rs:10:1
+ |
+LL | extern crate crateresolve2;
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: candidate #1: $TEST_BUILD_DIR/crate-loading/crateresolve2/auxiliary/libcrateresolve2-1.rmeta
+ = note: candidate #2: $TEST_BUILD_DIR/crate-loading/crateresolve2/auxiliary/libcrateresolve2-2.rmeta
+ = note: candidate #3: $TEST_BUILD_DIR/crate-loading/crateresolve2/auxiliary/libcrateresolve2-3.rmeta
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0464`.
diff --git a/src/test/ui/crate-loading/cross-compiled-proc-macro.rs b/tests/ui/crate-loading/cross-compiled-proc-macro.rs
index c1f433143..c1f433143 100644
--- a/src/test/ui/crate-loading/cross-compiled-proc-macro.rs
+++ b/tests/ui/crate-loading/cross-compiled-proc-macro.rs
diff --git a/src/test/ui/crate-loading/invalid-rlib.rs b/tests/ui/crate-loading/invalid-rlib.rs
index aea861e32..aea861e32 100644
--- a/src/test/ui/crate-loading/invalid-rlib.rs
+++ b/tests/ui/crate-loading/invalid-rlib.rs
diff --git a/src/test/ui/crate-loading/invalid-rlib.stderr b/tests/ui/crate-loading/invalid-rlib.stderr
index 3c0d23bf7..3c0d23bf7 100644
--- a/src/test/ui/crate-loading/invalid-rlib.stderr
+++ b/tests/ui/crate-loading/invalid-rlib.stderr
diff --git a/src/test/ui/crate-loading/missing-std.rs b/tests/ui/crate-loading/missing-std.rs
index 400d9f6e0..400d9f6e0 100644
--- a/src/test/ui/crate-loading/missing-std.rs
+++ b/tests/ui/crate-loading/missing-std.rs
diff --git a/src/test/ui/crate-loading/missing-std.stderr b/tests/ui/crate-loading/missing-std.stderr
index 70bcae1e0..70bcae1e0 100644
--- a/src/test/ui/crate-loading/missing-std.stderr
+++ b/tests/ui/crate-loading/missing-std.stderr