summaryrefslogtreecommitdiffstats
path: root/test cases/rust/5 polyglot static/clib.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--test cases/rust/5 polyglot static/clib.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/test cases/rust/5 polyglot static/clib.c b/test cases/rust/5 polyglot static/clib.c
new file mode 100644
index 0000000..366dbe5
--- /dev/null
+++ b/test cases/rust/5 polyglot static/clib.c
@@ -0,0 +1,12 @@
+#include <stdio.h>
+
+void hello_from_rust(void);
+
+static void hello_from_c(void) {
+ printf("Hello from C!\n");
+}
+
+void hello_from_both(void) {
+ hello_from_c();
+ hello_from_rust();
+}