summaryrefslogtreecommitdiffstats
path: root/tests/rust/reserved.rs
blob: df9d9a5ac22eee08434c6a57e76eb98c0ee6c607 (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
#[repr(C)]
struct A {
    namespace: i32,
    float: f32,
}

/// cbindgen:field-names=[namespace, float]
#[repr(C)]
struct B(i32, f32);

#[repr(C, u8)]
enum C {
    D { namespace: i32, float: f32 },
}

#[repr(C, u8)]
enum E {
    Double(f64),
    Float(f32),
}

#[repr(C, u8)]
enum F {
    double(f64),
    float(f32),
}

#[no_mangle]
pub extern "C" fn root(
    a: A,
    b: B,
    c: C,
    e: E,
    f: F,
    namespace: i32,
    float: f32,
) { }