summaryrefslogtreecommitdiffstats
path: root/tests/rust/alias.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/rust/alias.rs')
-rw-r--r--tests/rust/alias.rs32
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/rust/alias.rs b/tests/rust/alias.rs
new file mode 100644
index 0000000..86e3e00
--- /dev/null
+++ b/tests/rust/alias.rs
@@ -0,0 +1,32 @@
+#[repr(C)]
+struct Dep {
+ a: i32,
+ b: f32,
+}
+
+#[repr(C)]
+struct Foo<X> {
+ a: X,
+ b: X,
+ c: Dep,
+}
+
+#[repr(u32)]
+enum Status {
+ Ok,
+ Err,
+}
+
+type IntFoo = Foo<i32>;
+type DoubleFoo = Foo<f64>;
+
+type Unit = i32;
+type SpecialStatus = Status;
+
+#[no_mangle]
+pub extern "C" fn root(
+ x: IntFoo,
+ y: DoubleFoo,
+ z: Unit,
+ w: SpecialStatus
+) { }