From bd3fda1645fba5f15a3ed633d0bcdb3d71fbbede Mon Sep 17 00:00:00 2001 From: cynecx Date: Thu, 10 May 2018 22:55:17 +0200 Subject: Adjust proper constness in tests --- tests/expectations/tests/const_tparam.rs | 4 +--- tests/expectations/tests/derive-hash-struct-with-pointer.rs | 5 +---- tests/expectations/tests/layout_array.rs | 2 +- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/tests/expectations/tests/const_tparam.rs b/tests/expectations/tests/const_tparam.rs index 218abbdb..c7863931 100644 --- a/tests/expectations/tests/const_tparam.rs +++ b/tests/expectations/tests/const_tparam.rs @@ -1,14 +1,12 @@ /* automatically generated by rust-bindgen */ - #![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct C { pub foo: *const T, - pub bar: *mut T, + pub bar: *const T, pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell>, } impl Default for C { diff --git a/tests/expectations/tests/derive-hash-struct-with-pointer.rs b/tests/expectations/tests/derive-hash-struct-with-pointer.rs index ee41c4f4..c69bcd7c 100644 --- a/tests/expectations/tests/derive-hash-struct-with-pointer.rs +++ b/tests/expectations/tests/derive-hash-struct-with-pointer.rs @@ -1,15 +1,12 @@ /* automatically generated by rust-bindgen */ - #![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - - /// Pointers can derive Hash/PartialOrd/Ord/PartialEq/Eq #[repr(C)] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct ConstPtrMutObj { - pub bar: *const ::std::os::raw::c_int, + pub bar: *mut ::std::os::raw::c_int, } #[test] fn bindgen_test_layout_ConstPtrMutObj() { diff --git a/tests/expectations/tests/layout_array.rs b/tests/expectations/tests/layout_array.rs index 7ca267dc..15fbfa42 100644 --- a/tests/expectations/tests/layout_array.rs +++ b/tests/expectations/tests/layout_array.rs @@ -27,7 +27,7 @@ pub type rte_mempool_free_t = ::std::option::Option ::std::os::raw::c_int, >; -- cgit v1.2.3