diff options
-rw-r--r-- | tests/expectations/tests/derive-hash-struct-with-pointer.rs | 10 | ||||
-rw-r--r-- | tests/headers/derive-hash-struct-with-pointer.h | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/tests/expectations/tests/derive-hash-struct-with-pointer.rs b/tests/expectations/tests/derive-hash-struct-with-pointer.rs index 007fd2f9..a11d738f 100644 --- a/tests/expectations/tests/derive-hash-struct-with-pointer.rs +++ b/tests/expectations/tests/derive-hash-struct-with-pointer.rs @@ -4,9 +4,9 @@ #![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] -/// Pointers can derive hash +/// Pointers can derive hash/PartialEq #[repr(C)] -#[derive(Debug, Copy, Hash)] +#[derive(Debug, Copy, Hash, PartialEq)] pub struct ConstPtrMutObj { pub bar: *const ::std::os::raw::c_int, } @@ -29,7 +29,7 @@ impl Default for ConstPtrMutObj { fn default() -> Self { unsafe { ::std::mem::zeroed() } } } #[repr(C)] -#[derive(Debug, Copy, Hash)] +#[derive(Debug, Copy, Hash, PartialEq)] pub struct MutPtrMutObj { pub bar: *mut ::std::os::raw::c_int, } @@ -52,7 +52,7 @@ impl Default for MutPtrMutObj { fn default() -> Self { unsafe { ::std::mem::zeroed() } } } #[repr(C)] -#[derive(Debug, Copy, Hash)] +#[derive(Debug, Copy, Hash, PartialEq)] pub struct MutPtrConstObj { pub bar: *const ::std::os::raw::c_int, } @@ -75,7 +75,7 @@ impl Default for MutPtrConstObj { fn default() -> Self { unsafe { ::std::mem::zeroed() } } } #[repr(C)] -#[derive(Debug, Copy, Hash)] +#[derive(Debug, Copy, Hash, PartialEq)] pub struct ConstPtrConstObj { pub bar: *const ::std::os::raw::c_int, } diff --git a/tests/headers/derive-hash-struct-with-pointer.h b/tests/headers/derive-hash-struct-with-pointer.h index 262b6fb4..ed5199d4 100644 --- a/tests/headers/derive-hash-struct-with-pointer.h +++ b/tests/headers/derive-hash-struct-with-pointer.h @@ -1,6 +1,6 @@ -// bindgen-flags: --with-derive-hash +// bindgen-flags: --with-derive-hash --with-derive-partialeq // -/// Pointers can derive hash +/// Pointers can derive hash/PartialEq struct ConstPtrMutObj { int* const bar; }; |