File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Expand file tree Collapse file tree 2 files changed +28
-0
lines changed 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+ #![ no_std]
7+ mod libc { pub type c_int = i32 ; pub enum c_void { } }
8+
9+ #[ repr( C ) ]
10+ #[ derive( Debug , Copy ) ]
11+ pub struct foo {
12+ pub a : libc:: c_int ,
13+ pub b : libc:: c_int ,
14+ pub bar : * mut libc:: c_void ,
15+ }
16+ #[ test]
17+ fn bindgen_test_layout_foo ( ) {
18+ assert_eq ! ( :: core:: mem:: size_of:: <foo>( ) , 16usize ) ;
19+ assert_eq ! ( :: core:: mem:: align_of:: <foo>( ) , 8usize ) ;
20+ }
21+ impl Clone for foo {
22+ fn clone ( & self ) -> Self { * self }
23+ }
Original file line number Diff line number Diff line change 1+ // bindgen-flags: --ctypes-prefix "libc" --use-core --raw-line "#![no_std]" --raw-line "mod libc { pub type c_int = i32; pub enum c_void {} }"
2+ struct foo {
3+ int a , b ;
4+ void * bar ;
5+ };
You can’t perform that action at this time.
0 commit comments