diff options
author | cynecx <me@cynecx.net> | 2018-05-10 22:55:17 +0200 |
---|---|---|
committer | cynecx <me@cynecx.net> | 2018-05-10 22:55:17 +0200 |
commit | bd3fda1645fba5f15a3ed633d0bcdb3d71fbbede (patch) | |
tree | 93728beb5c00c146cc2a448600af4794ebadf5d2 | |
parent | 35d17c006de5ecce7c39dab960f3db840aceeea6 (diff) |
Adjust proper constness in tests
-rw-r--r-- | tests/expectations/tests/const_tparam.rs | 4 | ||||
-rw-r--r-- | tests/expectations/tests/derive-hash-struct-with-pointer.rs | 5 | ||||
-rw-r--r-- | 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<T> { pub foo: *const T, - pub bar: *mut T, + pub bar: *const T, pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell<T>>, } impl<T> Default for C<T> { 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<unsafe extern "C" fn(mp: *mu pub type rte_mempool_enqueue_t = ::std::option::Option< unsafe extern "C" fn( mp: *mut rte_mempool, - obj_table: *const *const ::std::os::raw::c_void, + obj_table: *const *mut ::std::os::raw::c_void, n: ::std::os::raw::c_uint, ) -> ::std::os::raw::c_int, >; |