summaryrefslogtreecommitdiffstats
path: root/tests/ui/rfcs/rfc-1717-dllimport/1717-dllimport/library-override.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/rfcs/rfc-1717-dllimport/1717-dllimport/library-override.rs')
-rw-r--r--tests/ui/rfcs/rfc-1717-dllimport/1717-dllimport/library-override.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/ui/rfcs/rfc-1717-dllimport/1717-dllimport/library-override.rs b/tests/ui/rfcs/rfc-1717-dllimport/1717-dllimport/library-override.rs
new file mode 100644
index 000000000..014ccac31
--- /dev/null
+++ b/tests/ui/rfcs/rfc-1717-dllimport/1717-dllimport/library-override.rs
@@ -0,0 +1,14 @@
+// run-pass
+// ignore-wasm32-bare no libc to test ffi with
+// compile-flags: -lstatic=wronglibrary:rust_test_helpers
+
+#[link(name = "wronglibrary", kind = "dylib")]
+extern "C" {
+ pub fn rust_dbg_extern_identity_u32(x: u32) -> u32;
+}
+
+fn main() {
+ unsafe {
+ rust_dbg_extern_identity_u32(42);
+ }
+}