summaryrefslogtreecommitdiffstats
path: root/tests/rust/mangle.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/rust/mangle.rs')
-rw-r--r--tests/rust/mangle.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/rust/mangle.rs b/tests/rust/mangle.rs
new file mode 100644
index 0000000..1ac7e13
--- /dev/null
+++ b/tests/rust/mangle.rs
@@ -0,0 +1,19 @@
+#[repr(C)]
+pub struct Foo<T> {
+ a: T,
+}
+
+pub type Boo = Foo<u8>;
+
+/// cbindgen:prefix-with-name=true
+#[repr(C)]
+pub enum Bar {
+ Some,
+ Thing,
+}
+
+#[no_mangle]
+pub extern "C" fn root(
+ x: Boo,
+ y: Bar,
+) { }