]> git.lizzy.rs Git - rust.git/blob - tests/run-make-fulldeps/extern-fn-generic/testcrate.rs
Rollup merge of #106670 - albertlarsan68:check-docs-in-pr-ci, r=Mark-Simulacrum
[rust.git] / tests / run-make-fulldeps / extern-fn-generic / testcrate.rs
1 #![crate_type = "lib"]
2
3 #[repr(C)]
4 pub struct TestStruct<T> {
5     pub x: u8,
6     pub y: T,
7 }
8
9 pub extern "C" fn foo<T>(ts: TestStruct<T>) -> T {
10     ts.y
11 }
12
13 #[link(name = "test", kind = "static")]
14 extern "C" {
15     pub fn call(c: extern "C" fn(TestStruct<i32>) -> i32) -> i32;
16 }