.cargo/vendor/cbindgen/tests/rust/monomorph_1.rs
raw| 1 | #[repr(C)] |
| 2 | struct Foo<T> { |
| 3 | data: *const T |
| 4 | } |
| 5 | |
| 6 | struct Bar<T> { |
| 7 | data: *const T |
| 8 | } |
| 9 | |
| 10 | #[repr(C)] |
| 11 | struct Tuple<T, E> { |
| 12 | a: *const T, |
| 13 | b: *const E, |
| 14 | } |
| 15 | |
| 16 | type Indirection<T> = Tuple<T, f32>; |
| 17 | |
| 18 | #[no_mangle] |
| 19 | pub extern "C" fn root( |
| 20 | a: Foo<i32>, |
| 21 | b: Foo<f32>, |
| 22 | c: Bar<f32>, |
| 23 | d: Foo<Bar<f32>>, |
| 24 | e: Bar<Foo<f32>>, |
| 25 | f: Bar<Bar<f32>>, |
| 26 | g: Tuple<Foo<f32>, f32>, |
| 27 | h: Indirection<f32> |
| 28 | ) { } |