summaryrefslogtreecommitdiffstats
path: root/tests/rust/body.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/rust/body.rs')
-rw-r--r--tests/rust/body.rs55
1 files changed, 55 insertions, 0 deletions
diff --git a/tests/rust/body.rs b/tests/rust/body.rs
new file mode 100644
index 0000000..fb275f9
--- /dev/null
+++ b/tests/rust/body.rs
@@ -0,0 +1,55 @@
+
+#[repr(C)]
+pub struct MyFancyStruct {
+ i: i32,
+}
+
+#[repr(C)]
+pub enum MyFancyEnum {
+ Foo,
+ Bar(i32),
+ Baz(i32),
+}
+
+#[repr(C)]
+pub enum MyCLikeEnum {
+ Foo1,
+ Bar1,
+ Baz1,
+}
+
+#[repr(C)]
+pub union MyUnion {
+ pub f: f32,
+ pub u: u32,
+}
+
+
+#[repr(C)]
+pub struct MyFancyStruct_Prepended {
+ i: i32,
+}
+
+#[repr(C)]
+pub enum MyFancyEnum_Prepended {
+ Foo_Prepended,
+ Bar_Prepended(i32),
+ Baz_Prepended(i32),
+}
+
+#[repr(C)]
+pub enum MyCLikeEnum_Prepended {
+ Foo1_Prepended,
+ Bar1_Prepended,
+ Baz1_Prepended,
+}
+
+#[repr(C)]
+pub union MyUnion_Prepended {
+ pub f: f32,
+ pub u: u32,
+}
+
+
+#[no_mangle]
+pub extern "C" fn root(s: MyFancyStruct, e: MyFancyEnum, c: MyCLikeEnum, u: MyUnion, sp: MyFancyStruct_Prepended, ep: MyFancyEnum_Prepended, cp: MyCLikeEnum_Prepended, up: MyUnion_Prepended) {}