summaryrefslogtreecommitdiffstats
path: root/tests/run-make/c-dynamic-rlib/foo.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/run-make/c-dynamic-rlib/foo.rs')
-rw-r--r--tests/run-make/c-dynamic-rlib/foo.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/run-make/c-dynamic-rlib/foo.rs b/tests/run-make/c-dynamic-rlib/foo.rs
new file mode 100644
index 000000000..3dd376f1f
--- /dev/null
+++ b/tests/run-make/c-dynamic-rlib/foo.rs
@@ -0,0 +1,10 @@
+#![crate_type = "rlib"]
+
+#[link(name = "cfoo")]
+extern "C" {
+ fn foo();
+}
+
+pub fn rsfoo() {
+ unsafe { foo() }
+}