File tree 3 files changed +38
-2
lines changed
3 files changed +38
-2
lines changed Original file line number Diff line number Diff line change @@ -111,8 +111,8 @@ pub fn builder_from_flags<I>
111
111
Arg :: with_name ( "generate" )
112
112
. long ( "generate" )
113
113
. help ( "Generate a given kind of items, split by commas. \
114
- Valid values are \" functions\" ,\" types\" , \" vars\" and \
115
- \" methods\" .")
114
+ Valid values are \" functions\" ,\" types\" , \" vars\" , \
115
+ \" methods\" and \" constructors \" .")
116
116
. takes_value ( true ) ,
117
117
Arg :: with_name ( "ignore-methods" )
118
118
. long ( "ignore-methods" )
@@ -268,6 +268,7 @@ pub fn builder_from_flags<I>
268
268
"types" => config. types = true ,
269
269
"vars" => config. vars = true ,
270
270
"methods" => config. methods = true ,
271
+ "constructors" => config. constructors = true ,
271
272
_ => {
272
273
return Err ( Error :: new ( ErrorKind :: Other ,
273
274
"Unknown generate item" ) ) ;
Original file line number Diff line number Diff line change
1
+ /* automatically generated by rust-bindgen */
2
+
3
+
4
+ #![ allow( non_snake_case) ]
5
+
6
+
7
+ #[ repr( C ) ]
8
+ #[ derive( Debug , Default , Copy ) ]
9
+ pub struct Foo {
10
+ pub _address : u8 ,
11
+ }
12
+ #[ test]
13
+ fn bindgen_test_layout_Foo ( ) {
14
+ assert_eq ! ( :: std:: mem:: size_of:: <Foo >( ) , 1usize , concat ! (
15
+ "Size of: " , stringify ! ( Foo ) ) ) ;
16
+ assert_eq ! ( :: std:: mem:: align_of:: <Foo >( ) , 1usize , concat ! (
17
+ "Alignment of " , stringify ! ( Foo ) ) ) ;
18
+ }
19
+ impl Clone for Foo {
20
+ fn clone ( & self ) -> Self { * self }
21
+ }
22
+ impl Foo {
23
+ #[ inline]
24
+ pub unsafe fn new ( a : :: std:: os:: raw:: c_int ) -> Self {
25
+ let mut __bindgen_tmp = :: std:: mem:: uninitialized ( ) ;
26
+ Foo_Foo ( & mut __bindgen_tmp, a) ;
27
+ __bindgen_tmp
28
+ }
29
+ }
Original file line number Diff line number Diff line change
1
+ // bindgen-flags: --generate types,constructors
2
+
3
+ class Foo {
4
+ public:
5
+ Foo (int a);
6
+ };
You can’t perform that action at this time.
0 commit comments