diff options
Diffstat (limited to 'tests/expectations/func_ptr_in_struct.rs')
-rw-r--r-- | tests/expectations/func_ptr_in_struct.rs | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/tests/expectations/func_ptr_in_struct.rs b/tests/expectations/func_ptr_in_struct.rs index 3d7b5f68..0d4ccdbf 100644 --- a/tests/expectations/func_ptr_in_struct.rs +++ b/tests/expectations/func_ptr_in_struct.rs @@ -4,23 +4,18 @@ #![allow(non_snake_case)] -#[repr(i32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum Enum_baz { _BindgenOpaqueEnum = 0, } +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum baz { } #[repr(C)] #[derive(Debug, Copy)] -pub struct Struct_Foo { - pub bar: ::std::option::Option<unsafe extern "C" fn(x: - ::std::os::raw::c_int, - y: - ::std::os::raw::c_int) - -> Enum_baz>, -} -impl ::std::clone::Clone for Struct_Foo { - fn clone(&self) -> Self { *self } +pub struct Foo { + pub bar: *mut ::std::option::Option<unsafe extern "C" fn() -> baz>, } #[test] -fn bindgen_test_layout_Struct_Foo() { - assert_eq!(::std::mem::size_of::<Struct_Foo>() , 8usize); - assert_eq!(::std::mem::align_of::<Struct_Foo>() , 8usize); +fn bindgen_test_layout_Foo() { + assert_eq!(::std::mem::size_of::<Foo>() , 8usize); + assert_eq!(::std::mem::align_of::<Foo>() , 8usize); +} +impl Clone for Foo { + fn clone(&self) -> Self { *self } } |