Debian Codegraph @

.cargo/vendor/cbindgen/tests/rust/alias.rs

raw
1 #[repr(C)]
2 struct Dep {
3 a: i32,
4 b: f32,
5 }
6
7 #[repr(C)]
8 struct Foo<X> {
9 a: X,
10 b: X,
11 c: Dep,
12 }
13
14 #[repr(u32)]
15 enum Status {
16 Ok,
17 Err,
18 }
19
20 type IntFoo = Foo<i32>;
21 type DoubleFoo = Foo<f64>;
22
23 type Unit = i32;
24 type SpecialStatus = Status;
25
26 #[no_mangle]
27 pub extern "C" fn root(
28 x: IntFoo,
29 y: DoubleFoo,
30 z: Unit,
31 w: SpecialStatus
32 ) { }