summaryrefslogtreecommitdiffstats
path: root/tests/rust/body.rs
blob: fb275f9f4575497fe82c772fb91ff17622195aa3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
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) {}