File tree Expand file tree Collapse file tree 3 files changed +6
-1
lines changed
Expand file tree Collapse file tree 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 {
14891489 }
14901490 TypeKind :: Function ( ref fs) => {
14911491 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>)
14931494 }
14941495 TypeKind :: Array ( item, len) => {
14951496 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() {
2020impl Clone for foo {
2121 fn clone ( & self ) -> Self { * self }
2222}
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 {
44 int a , b ;
55 void * bar ;
66};
7+
8+ typedef void (* fooFunction )(int bar );
You can’t perform that action at this time.
0 commit comments