We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
i32
std::os::raw
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
template <typename> class a { enum {}; }; template <typename> class b {}; namespace octave { class c { b<a<char>> d; }; }
~/rust-bindgen/target/debug/bindgen \ --output __bindgen.rs \ --enable-cxx-namespaces \ --use-core \ __bindgen.ii \ -- -v -x c++ -std=c++11
How do I pretty print this on multiple lines like it used to?
/* automatically generated by rust-bindgen */ # [ allow ( non_snake_case , non_camel_case_types , non_upper_case_globals ) ] pub mod root { # [ allow ( unused_imports ) ] use self :: super :: root ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct a { pub _address : u8 , } pub type a__bindgen_ty_1 = :: std :: os :: raw :: i32 ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct b { pub _address : u8 , } pub mod octave { # [ allow ( unused_imports ) ] use self :: super :: super :: root ; # [ repr ( C ) ] # [ derive ( Debug , Copy ) ] pub struct c { pub d : root :: b , } # [ test ] fn bindgen_test_layout_c ( ) { assert_eq ! ( :: core :: mem :: size_of :: < c > ( ) , 1usize , concat ! ( "Size of: " , stringify ! ( c ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < c > ( ) , 1usize , concat ! ( "Alignment of " , stringify ! ( c ) ) ) ; assert_eq ! ( unsafe { & ( * ( 0 as * const c ) ) . d as * const _ as usize } , 0usize , concat ! ( "Alignment of field: " , stringify ! ( c ) , "::" , stringify ! ( d ) ) ) ; } impl Clone for c { fn clone ( & self ) -> Self { * self } } } # [ test ] fn __bindgen_test_layout_b_open0_a_open1_char_close1_close0_instantiation ( ) { assert_eq ! ( :: core :: mem :: size_of :: < root :: b > ( ) , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( root :: b ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < root :: b > ( ) , 1usize , concat ! ( "Alignment of template specialization: " , stringify ! ( root :: b ) ) ) ; } }
Instead of
pub type a__bindgen_ty_1 = :: std :: os :: raw :: i32 ;
It would be
pub type a__bindgen_ty_1 = i32 ;
or
pub type a__bindgen_ty_1 = :: std :: os :: raw :: c_int ;
The text was updated successfully, but these errors were encountered:
This is a regression from 0df8441, astonishing that we hadn't found it before. Thanks a lot for the report!
Sorry, something went wrong.
Auto merge of #1030 - emilio:repr, r=fitzgen
40a3c07
codegen: Avoid generating wrong type for enums with unknown representation Fixes #1025
8f3c575
emilio
No branches or pull requests
Input C/C++ Header
Bindgen Invocation
~/rust-bindgen/target/debug/bindgen \ --output __bindgen.rs \ --enable-cxx-namespaces \ --use-core \ __bindgen.ii \ -- -v -x c++ -std=c++11
Actual Results
How do I pretty print this on multiple lines like it used to?Expected Results
Instead of
It would be
or
The text was updated successfully, but these errors were encountered: