about summary refs log tree commit diff
path: root/tests/ui/crate-loading/invalid-rlib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/crate-loading/invalid-rlib.rs')
-rw-r--r--tests/ui/crate-loading/invalid-rlib.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/ui/crate-loading/invalid-rlib.rs b/tests/ui/crate-loading/invalid-rlib.rs
new file mode 100644
index 00000000000..aea861e3261
--- /dev/null
+++ b/tests/ui/crate-loading/invalid-rlib.rs
@@ -0,0 +1,10 @@
+// compile-flags: --crate-type lib --extern foo={{src-base}}/crate-loading/auxiliary/libfoo.rlib
+// normalize-stderr-test: "failed to mmap file '.*auxiliary/libfoo.rlib':.*" -> "failed to mmap file 'auxiliary/libfoo.rlib'"
+// don't emit warn logging, it's basically the same as the errors and it's annoying to normalize
+// rustc-env:RUSTC_LOG=error
+// edition:2018
+#![no_std]
+use ::foo; //~ ERROR invalid metadata files for crate `foo`
+//~| NOTE failed to mmap file
+//~^^ ERROR invalid metadata files for crate `foo`
+//~| NOTE failed to mmap file