File tree 3 files changed +6
-1
lines changed
3 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -1489,7 +1489,8 @@ impl ToRustTy for Type {
1489
1489
}
1490
1490
TypeKind :: Function ( ref fs) => {
1491
1491
let ty = fs. to_rust_ty ( ctx, item) ;
1492
- aster:: AstBuilder :: new ( ) . ty ( ) . option ( ) . build ( ty)
1492
+ let prefix = ctx. trait_prefix ( ) ;
1493
+ quote_ty ! ( ctx. ext_cx( ) , :: $prefix:: option:: Option <$ty>)
1493
1494
}
1494
1495
TypeKind :: Array ( item, len) => {
1495
1496
let inner = item. to_rust_ty ( ctx) ;
Original file line number Diff line number Diff line change @@ -20,3 +20,5 @@ fn bindgen_test_layout_foo() {
20
20
impl Clone for foo {
21
21
fn clone ( & self ) -> Self { * self }
22
22
}
23
+ pub type fooFunction =
24
+ :: core:: option:: Option < unsafe extern "C" fn ( bar : :: std:: os:: raw:: c_int ) > ;
Original file line number Diff line number Diff line change @@ -4,3 +4,5 @@ struct foo {
4
4
int a , b ;
5
5
void * bar ;
6
6
};
7
+
8
+ typedef void (* fooFunction )(int bar );
You can’t perform that action at this time.
0 commit comments