diff --git a/ndk-sys/src/ffi_aarch64.rs b/ndk-sys/src/ffi_aarch64.rs index b9d33b19..23259ba0 100644 --- a/ndk-sys/src/ffi_aarch64.rs +++ b/ndk-sys/src/ffi_aarch64.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.69.4 */ +/* automatically generated by rust-bindgen 0.70.1 */ #[repr(C)] #[derive(Default)] @@ -1415,41 +1415,15 @@ pub struct max_align_t { pub __bindgen_padding_0: u64, pub __clang_max_align_nonce2: u128, } -#[test] -fn bindgen_test_layout_max_align_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(max_align_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 16usize, - concat!("Alignment of ", stringify!(max_align_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__clang_max_align_nonce1) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(max_align_t), - "::", - stringify!(__clang_max_align_nonce1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__clang_max_align_nonce2) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(max_align_t), - "::", - stringify!(__clang_max_align_nonce2) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of max_align_t"][::std::mem::size_of::() - 32usize]; + ["Alignment of max_align_t"][::std::mem::align_of::() - 16usize]; + ["Offset of field: max_align_t::__clang_max_align_nonce1"] + [::std::mem::offset_of!(max_align_t, __clang_max_align_nonce1) - 0usize]; + ["Offset of field: max_align_t::__clang_max_align_nonce2"] + [::std::mem::offset_of!(max_align_t, __clang_max_align_nonce2) - 16usize]; +}; pub type __int8_t = ::std::os::raw::c_schar; pub type __uint8_t = ::std::os::raw::c_uchar; pub type __int16_t = ::std::os::raw::c_short; @@ -1491,31 +1465,13 @@ pub type __u64 = ::std::os::raw::c_ulonglong; pub struct __kernel_fd_set { pub fds_bits: [::std::os::raw::c_ulong; 16usize], } -#[test] -fn bindgen_test_layout___kernel_fd_set() { - const UNINIT: ::std::mem::MaybeUninit<__kernel_fd_set> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__kernel_fd_set>(), - 128usize, - concat!("Size of: ", stringify!(__kernel_fd_set)) - ); - assert_eq!( - ::std::mem::align_of::<__kernel_fd_set>(), - 8usize, - concat!("Alignment of ", stringify!(__kernel_fd_set)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fds_bits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__kernel_fd_set), - "::", - stringify!(fds_bits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __kernel_fd_set"][::std::mem::size_of::<__kernel_fd_set>() - 128usize]; + ["Alignment of __kernel_fd_set"][::std::mem::align_of::<__kernel_fd_set>() - 8usize]; + ["Offset of field: __kernel_fd_set::fds_bits"] + [::std::mem::offset_of!(__kernel_fd_set, fds_bits) - 0usize]; +}; pub type __kernel_sighandler_t = ::std::option::Option; pub type __kernel_key_t = ::std::os::raw::c_int; @@ -1543,31 +1499,13 @@ pub type __kernel_ptrdiff_t = __kernel_long_t; pub struct __kernel_fsid_t { pub val: [::std::os::raw::c_int; 2usize], } -#[test] -fn bindgen_test_layout___kernel_fsid_t() { - const UNINIT: ::std::mem::MaybeUninit<__kernel_fsid_t> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__kernel_fsid_t>(), - 8usize, - concat!("Size of: ", stringify!(__kernel_fsid_t)) - ); - assert_eq!( - ::std::mem::align_of::<__kernel_fsid_t>(), - 4usize, - concat!("Alignment of ", stringify!(__kernel_fsid_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).val) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__kernel_fsid_t), - "::", - stringify!(val) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __kernel_fsid_t"][::std::mem::size_of::<__kernel_fsid_t>() - 8usize]; + ["Alignment of __kernel_fsid_t"][::std::mem::align_of::<__kernel_fsid_t>() - 4usize]; + ["Offset of field: __kernel_fsid_t::val"] + [::std::mem::offset_of!(__kernel_fsid_t, val) - 0usize]; +}; pub type __kernel_off_t = __kernel_long_t; pub type __kernel_loff_t = ::std::os::raw::c_longlong; pub type __kernel_old_time_t = __kernel_long_t; @@ -1601,152 +1539,50 @@ pub struct pthread_attr_t { pub sched_priority: i32, pub __reserved: [::std::os::raw::c_char; 16usize], } -#[test] -fn bindgen_test_layout_pthread_attr_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(pthread_attr_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(pthread_attr_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_attr_t), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).stack_base) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(pthread_attr_t), - "::", - stringify!(stack_base) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).stack_size) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(pthread_attr_t), - "::", - stringify!(stack_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).guard_size) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(pthread_attr_t), - "::", - stringify!(guard_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sched_policy) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(pthread_attr_t), - "::", - stringify!(sched_policy) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sched_priority) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(pthread_attr_t), - "::", - stringify!(sched_priority) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__reserved) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(pthread_attr_t), - "::", - stringify!(__reserved) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of pthread_attr_t"][::std::mem::size_of::() - 56usize]; + ["Alignment of pthread_attr_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: pthread_attr_t::flags"] + [::std::mem::offset_of!(pthread_attr_t, flags) - 0usize]; + ["Offset of field: pthread_attr_t::stack_base"] + [::std::mem::offset_of!(pthread_attr_t, stack_base) - 8usize]; + ["Offset of field: pthread_attr_t::stack_size"] + [::std::mem::offset_of!(pthread_attr_t, stack_size) - 16usize]; + ["Offset of field: pthread_attr_t::guard_size"] + [::std::mem::offset_of!(pthread_attr_t, guard_size) - 24usize]; + ["Offset of field: pthread_attr_t::sched_policy"] + [::std::mem::offset_of!(pthread_attr_t, sched_policy) - 32usize]; + ["Offset of field: pthread_attr_t::sched_priority"] + [::std::mem::offset_of!(pthread_attr_t, sched_priority) - 36usize]; + ["Offset of field: pthread_attr_t::__reserved"] + [::std::mem::offset_of!(pthread_attr_t, __reserved) - 40usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct pthread_barrier_t { pub __private: [i64; 4usize], } -#[test] -fn bindgen_test_layout_pthread_barrier_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(pthread_barrier_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(pthread_barrier_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__private) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_barrier_t), - "::", - stringify!(__private) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of pthread_barrier_t"][::std::mem::size_of::() - 32usize]; + ["Alignment of pthread_barrier_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: pthread_barrier_t::__private"] + [::std::mem::offset_of!(pthread_barrier_t, __private) - 0usize]; +}; pub type pthread_barrierattr_t = ::std::os::raw::c_int; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct pthread_cond_t { pub __private: [i32; 12usize], } -#[test] -fn bindgen_test_layout_pthread_cond_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(pthread_cond_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(pthread_cond_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__private) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_cond_t), - "::", - stringify!(__private) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of pthread_cond_t"][::std::mem::size_of::() - 48usize]; + ["Alignment of pthread_cond_t"][::std::mem::align_of::() - 4usize]; + ["Offset of field: pthread_cond_t::__private"] + [::std::mem::offset_of!(pthread_cond_t, __private) - 0usize]; +}; pub type pthread_condattr_t = ::std::os::raw::c_long; pub type pthread_key_t = ::std::os::raw::c_int; #[repr(C)] @@ -1754,31 +1590,13 @@ pub type pthread_key_t = ::std::os::raw::c_int; pub struct pthread_mutex_t { pub __private: [i32; 10usize], } -#[test] -fn bindgen_test_layout_pthread_mutex_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(pthread_mutex_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(pthread_mutex_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__private) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_mutex_t), - "::", - stringify!(__private) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of pthread_mutex_t"][::std::mem::size_of::() - 40usize]; + ["Alignment of pthread_mutex_t"][::std::mem::align_of::() - 4usize]; + ["Offset of field: pthread_mutex_t::__private"] + [::std::mem::offset_of!(pthread_mutex_t, __private) - 0usize]; +}; pub type pthread_mutexattr_t = ::std::os::raw::c_long; pub type pthread_once_t = ::std::os::raw::c_int; #[repr(C)] @@ -1786,62 +1604,26 @@ pub type pthread_once_t = ::std::os::raw::c_int; pub struct pthread_rwlock_t { pub __private: [i32; 14usize], } -#[test] -fn bindgen_test_layout_pthread_rwlock_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(pthread_rwlock_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(pthread_rwlock_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__private) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_rwlock_t), - "::", - stringify!(__private) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of pthread_rwlock_t"][::std::mem::size_of::() - 56usize]; + ["Alignment of pthread_rwlock_t"][::std::mem::align_of::() - 4usize]; + ["Offset of field: pthread_rwlock_t::__private"] + [::std::mem::offset_of!(pthread_rwlock_t, __private) - 0usize]; +}; pub type pthread_rwlockattr_t = ::std::os::raw::c_long; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct pthread_spinlock_t { pub __private: i64, } -#[test] -fn bindgen_test_layout_pthread_spinlock_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(pthread_spinlock_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(pthread_spinlock_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__private) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_spinlock_t), - "::", - stringify!(__private) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of pthread_spinlock_t"][::std::mem::size_of::() - 8usize]; + ["Alignment of pthread_spinlock_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: pthread_spinlock_t::__private"] + [::std::mem::offset_of!(pthread_spinlock_t, __private) - 0usize]; +}; pub type pthread_t = ::std::os::raw::c_long; pub type __gid_t = __kernel_gid32_t; pub type gid_t = __gid_t; @@ -1996,92 +1778,32 @@ pub struct JavaVMAttachArgs { pub name: *const ::std::os::raw::c_char, pub group: jobject, } -#[test] -fn bindgen_test_layout_JavaVMAttachArgs() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(JavaVMAttachArgs)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(JavaVMAttachArgs)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(JavaVMAttachArgs), - "::", - stringify!(version) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(JavaVMAttachArgs), - "::", - stringify!(name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).group) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(JavaVMAttachArgs), - "::", - stringify!(group) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of JavaVMAttachArgs"][::std::mem::size_of::() - 24usize]; + ["Alignment of JavaVMAttachArgs"][::std::mem::align_of::() - 8usize]; + ["Offset of field: JavaVMAttachArgs::version"] + [::std::mem::offset_of!(JavaVMAttachArgs, version) - 0usize]; + ["Offset of field: JavaVMAttachArgs::name"] + [::std::mem::offset_of!(JavaVMAttachArgs, name) - 8usize]; + ["Offset of field: JavaVMAttachArgs::group"] + [::std::mem::offset_of!(JavaVMAttachArgs, group) - 16usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct JavaVMOption { pub optionString: *const ::std::os::raw::c_char, pub extraInfo: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout_JavaVMOption() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(JavaVMOption)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(JavaVMOption)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).optionString) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(JavaVMOption), - "::", - stringify!(optionString) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).extraInfo) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(JavaVMOption), - "::", - stringify!(extraInfo) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of JavaVMOption"][::std::mem::size_of::() - 16usize]; + ["Alignment of JavaVMOption"][::std::mem::align_of::() - 8usize]; + ["Offset of field: JavaVMOption::optionString"] + [::std::mem::offset_of!(JavaVMOption, optionString) - 0usize]; + ["Offset of field: JavaVMOption::extraInfo"] + [::std::mem::offset_of!(JavaVMOption, extraInfo) - 8usize]; +}; #[repr(C)] pub struct JavaVMInitArgs { pub version: jint, @@ -2089,61 +1811,19 @@ pub struct JavaVMInitArgs { pub options: *mut JavaVMOption, pub ignoreUnrecognized: jboolean, } -#[test] -fn bindgen_test_layout_JavaVMInitArgs() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(JavaVMInitArgs)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(JavaVMInitArgs)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(JavaVMInitArgs), - "::", - stringify!(version) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nOptions) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(JavaVMInitArgs), - "::", - stringify!(nOptions) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).options) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(JavaVMInitArgs), - "::", - stringify!(options) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ignoreUnrecognized) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(JavaVMInitArgs), - "::", - stringify!(ignoreUnrecognized) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of JavaVMInitArgs"][::std::mem::size_of::() - 24usize]; + ["Alignment of JavaVMInitArgs"][::std::mem::align_of::() - 8usize]; + ["Offset of field: JavaVMInitArgs::version"] + [::std::mem::offset_of!(JavaVMInitArgs, version) - 0usize]; + ["Offset of field: JavaVMInitArgs::nOptions"] + [::std::mem::offset_of!(JavaVMInitArgs, nOptions) - 4usize]; + ["Offset of field: JavaVMInitArgs::options"] + [::std::mem::offset_of!(JavaVMInitArgs, options) - 8usize]; + ["Offset of field: JavaVMInitArgs::ignoreUnrecognized"] + [::std::mem::offset_of!(JavaVMInitArgs, ignoreUnrecognized) - 16usize]; +}; extern "C" { pub fn AAssetManager_fromJava(env: *mut JNIEnv, assetManager: jobject) -> *mut AAssetManager; } @@ -2193,71 +1873,21 @@ pub struct AndroidBitmapInfo { pub format: i32, pub flags: u32, } -#[test] -fn bindgen_test_layout_AndroidBitmapInfo() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 20usize, - concat!("Size of: ", stringify!(AndroidBitmapInfo)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AndroidBitmapInfo)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AndroidBitmapInfo), - "::", - stringify!(width) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AndroidBitmapInfo), - "::", - stringify!(height) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).stride) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AndroidBitmapInfo), - "::", - stringify!(stride) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).format) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(AndroidBitmapInfo), - "::", - stringify!(format) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AndroidBitmapInfo), - "::", - stringify!(flags) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AndroidBitmapInfo"][::std::mem::size_of::() - 20usize]; + ["Alignment of AndroidBitmapInfo"][::std::mem::align_of::() - 4usize]; + ["Offset of field: AndroidBitmapInfo::width"] + [::std::mem::offset_of!(AndroidBitmapInfo, width) - 0usize]; + ["Offset of field: AndroidBitmapInfo::height"] + [::std::mem::offset_of!(AndroidBitmapInfo, height) - 4usize]; + ["Offset of field: AndroidBitmapInfo::stride"] + [::std::mem::offset_of!(AndroidBitmapInfo, stride) - 8usize]; + ["Offset of field: AndroidBitmapInfo::format"] + [::std::mem::offset_of!(AndroidBitmapInfo, format) - 12usize]; + ["Offset of field: AndroidBitmapInfo::flags"] + [::std::mem::offset_of!(AndroidBitmapInfo, flags) - 16usize]; +}; extern "C" { pub fn AndroidBitmap_getInfo( env: *mut JNIEnv, @@ -2712,41 +2342,13 @@ pub struct imaxdiv_t { pub quot: intmax_t, pub rem: intmax_t, } -#[test] -fn bindgen_test_layout_imaxdiv_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(imaxdiv_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(imaxdiv_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).quot) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(imaxdiv_t), - "::", - stringify!(quot) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rem) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(imaxdiv_t), - "::", - stringify!(rem) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of imaxdiv_t"][::std::mem::size_of::() - 16usize]; + ["Alignment of imaxdiv_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: imaxdiv_t::quot"][::std::mem::offset_of!(imaxdiv_t, quot) - 0usize]; + ["Offset of field: imaxdiv_t::rem"][::std::mem::offset_of!(imaxdiv_t, rem) - 8usize]; +}; extern "C" { pub fn imaxabs(__i: intmax_t) -> intmax_t; } @@ -2952,91 +2554,25 @@ pub struct android_dlextinfo { pub library_fd_offset: off64_t, pub library_namespace: *mut android_namespace_t, } -#[test] -fn bindgen_test_layout_android_dlextinfo() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(android_dlextinfo)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(android_dlextinfo)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(android_dlextinfo), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved_addr) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(android_dlextinfo), - "::", - stringify!(reserved_addr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved_size) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(android_dlextinfo), - "::", - stringify!(reserved_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).relro_fd) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(android_dlextinfo), - "::", - stringify!(relro_fd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).library_fd) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(android_dlextinfo), - "::", - stringify!(library_fd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).library_fd_offset) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(android_dlextinfo), - "::", - stringify!(library_fd_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).library_namespace) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(android_dlextinfo), - "::", - stringify!(library_namespace) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of android_dlextinfo"][::std::mem::size_of::() - 48usize]; + ["Alignment of android_dlextinfo"][::std::mem::align_of::() - 8usize]; + ["Offset of field: android_dlextinfo::flags"] + [::std::mem::offset_of!(android_dlextinfo, flags) - 0usize]; + ["Offset of field: android_dlextinfo::reserved_addr"] + [::std::mem::offset_of!(android_dlextinfo, reserved_addr) - 8usize]; + ["Offset of field: android_dlextinfo::reserved_size"] + [::std::mem::offset_of!(android_dlextinfo, reserved_size) - 16usize]; + ["Offset of field: android_dlextinfo::relro_fd"] + [::std::mem::offset_of!(android_dlextinfo, relro_fd) - 24usize]; + ["Offset of field: android_dlextinfo::library_fd"] + [::std::mem::offset_of!(android_dlextinfo, library_fd) - 28usize]; + ["Offset of field: android_dlextinfo::library_fd_offset"] + [::std::mem::offset_of!(android_dlextinfo, library_fd_offset) - 32usize]; + ["Offset of field: android_dlextinfo::library_namespace"] + [::std::mem::offset_of!(android_dlextinfo, library_namespace) - 40usize]; +}; extern "C" { pub fn android_dlopen_ext( __filename: *const ::std::os::raw::c_char, @@ -3270,61 +2806,15 @@ pub struct ARect { pub right: i32, pub bottom: i32, } -#[test] -fn bindgen_test_layout_ARect() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(ARect)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(ARect)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).left) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ARect), - "::", - stringify!(left) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).top) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ARect), - "::", - stringify!(top) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).right) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ARect), - "::", - stringify!(right) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bottom) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(ARect), - "::", - stringify!(bottom) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ARect"][::std::mem::size_of::() - 16usize]; + ["Alignment of ARect"][::std::mem::align_of::() - 4usize]; + ["Offset of field: ARect::left"][::std::mem::offset_of!(ARect, left) - 0usize]; + ["Offset of field: ARect::top"][::std::mem::offset_of!(ARect, top) - 4usize]; + ["Offset of field: ARect::right"][::std::mem::offset_of!(ARect, right) - 8usize]; + ["Offset of field: ARect::bottom"][::std::mem::offset_of!(ARect, bottom) - 12usize]; +}; impl AHardwareBuffer_Format { pub const AHARDWAREBUFFER_FORMAT_R8G8B8A8_UNORM: AHardwareBuffer_Format = AHardwareBuffer_Format(1); @@ -3568,101 +3058,27 @@ pub struct AHardwareBuffer_Desc { pub rfu0: u32, pub rfu1: u64, } -#[test] -fn bindgen_test_layout_AHardwareBuffer_Desc() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(AHardwareBuffer_Desc)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AHardwareBuffer_Desc)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Desc), - "::", - stringify!(width) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Desc), - "::", - stringify!(height) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).layers) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Desc), - "::", - stringify!(layers) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).format) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Desc), - "::", - stringify!(format) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).usage) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Desc), - "::", - stringify!(usage) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).stride) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Desc), - "::", - stringify!(stride) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rfu0) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Desc), - "::", - stringify!(rfu0) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rfu1) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Desc), - "::", - stringify!(rfu1) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AHardwareBuffer_Desc"][::std::mem::size_of::() - 40usize]; + ["Alignment of AHardwareBuffer_Desc"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AHardwareBuffer_Desc::width"] + [::std::mem::offset_of!(AHardwareBuffer_Desc, width) - 0usize]; + ["Offset of field: AHardwareBuffer_Desc::height"] + [::std::mem::offset_of!(AHardwareBuffer_Desc, height) - 4usize]; + ["Offset of field: AHardwareBuffer_Desc::layers"] + [::std::mem::offset_of!(AHardwareBuffer_Desc, layers) - 8usize]; + ["Offset of field: AHardwareBuffer_Desc::format"] + [::std::mem::offset_of!(AHardwareBuffer_Desc, format) - 12usize]; + ["Offset of field: AHardwareBuffer_Desc::usage"] + [::std::mem::offset_of!(AHardwareBuffer_Desc, usage) - 16usize]; + ["Offset of field: AHardwareBuffer_Desc::stride"] + [::std::mem::offset_of!(AHardwareBuffer_Desc, stride) - 24usize]; + ["Offset of field: AHardwareBuffer_Desc::rfu0"] + [::std::mem::offset_of!(AHardwareBuffer_Desc, rfu0) - 28usize]; + ["Offset of field: AHardwareBuffer_Desc::rfu1"] + [::std::mem::offset_of!(AHardwareBuffer_Desc, rfu1) - 32usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct AHardwareBuffer_Plane { @@ -3670,94 +3086,34 @@ pub struct AHardwareBuffer_Plane { pub pixelStride: u32, pub rowStride: u32, } -#[test] -fn bindgen_test_layout_AHardwareBuffer_Plane() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(AHardwareBuffer_Plane)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AHardwareBuffer_Plane)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Plane), - "::", - stringify!(data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pixelStride) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Plane), - "::", - stringify!(pixelStride) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rowStride) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Plane), - "::", - stringify!(rowStride) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AHardwareBuffer_Plane"][::std::mem::size_of::() - 16usize]; + ["Alignment of AHardwareBuffer_Plane"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: AHardwareBuffer_Plane::data"] + [::std::mem::offset_of!(AHardwareBuffer_Plane, data) - 0usize]; + ["Offset of field: AHardwareBuffer_Plane::pixelStride"] + [::std::mem::offset_of!(AHardwareBuffer_Plane, pixelStride) - 8usize]; + ["Offset of field: AHardwareBuffer_Plane::rowStride"] + [::std::mem::offset_of!(AHardwareBuffer_Plane, rowStride) - 12usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct AHardwareBuffer_Planes { pub planeCount: u32, pub planes: [AHardwareBuffer_Plane; 4usize], } -#[test] -fn bindgen_test_layout_AHardwareBuffer_Planes() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!("Size of: ", stringify!(AHardwareBuffer_Planes)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AHardwareBuffer_Planes)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).planeCount) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Planes), - "::", - stringify!(planeCount) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).planes) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Planes), - "::", - stringify!(planes) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AHardwareBuffer_Planes"][::std::mem::size_of::() - 72usize]; + ["Alignment of AHardwareBuffer_Planes"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: AHardwareBuffer_Planes::planeCount"] + [::std::mem::offset_of!(AHardwareBuffer_Planes, planeCount) - 0usize]; + ["Offset of field: AHardwareBuffer_Planes::planes"] + [::std::mem::offset_of!(AHardwareBuffer_Planes, planes) - 8usize]; +}; extern "C" { pub fn AHardwareBuffer_allocate( desc: *const AHardwareBuffer_Desc, @@ -3862,41 +3218,13 @@ pub struct AColor_xy { pub x: f32, pub y: f32, } -#[test] -fn bindgen_test_layout_AColor_xy() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(AColor_xy)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AColor_xy)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AColor_xy), - "::", - stringify!(x) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AColor_xy), - "::", - stringify!(y) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AColor_xy"][::std::mem::size_of::() - 8usize]; + ["Alignment of AColor_xy"][::std::mem::align_of::() - 4usize]; + ["Offset of field: AColor_xy::x"][::std::mem::offset_of!(AColor_xy, x) - 0usize]; + ["Offset of field: AColor_xy::y"][::std::mem::offset_of!(AColor_xy, y) - 4usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct AHdrMetadata_smpte2086 { @@ -3907,124 +3235,40 @@ pub struct AHdrMetadata_smpte2086 { pub maxLuminance: f32, pub minLuminance: f32, } -#[test] -fn bindgen_test_layout_AHdrMetadata_smpte2086() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(AHdrMetadata_smpte2086)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AHdrMetadata_smpte2086)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).displayPrimaryRed) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AHdrMetadata_smpte2086), - "::", - stringify!(displayPrimaryRed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).displayPrimaryGreen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AHdrMetadata_smpte2086), - "::", - stringify!(displayPrimaryGreen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).displayPrimaryBlue) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AHdrMetadata_smpte2086), - "::", - stringify!(displayPrimaryBlue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).whitePoint) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(AHdrMetadata_smpte2086), - "::", - stringify!(whitePoint) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).maxLuminance) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(AHdrMetadata_smpte2086), - "::", - stringify!(maxLuminance) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).minLuminance) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(AHdrMetadata_smpte2086), - "::", - stringify!(minLuminance) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AHdrMetadata_smpte2086"][::std::mem::size_of::() - 40usize]; + ["Alignment of AHdrMetadata_smpte2086"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: AHdrMetadata_smpte2086::displayPrimaryRed"] + [::std::mem::offset_of!(AHdrMetadata_smpte2086, displayPrimaryRed) - 0usize]; + ["Offset of field: AHdrMetadata_smpte2086::displayPrimaryGreen"] + [::std::mem::offset_of!(AHdrMetadata_smpte2086, displayPrimaryGreen) - 8usize]; + ["Offset of field: AHdrMetadata_smpte2086::displayPrimaryBlue"] + [::std::mem::offset_of!(AHdrMetadata_smpte2086, displayPrimaryBlue) - 16usize]; + ["Offset of field: AHdrMetadata_smpte2086::whitePoint"] + [::std::mem::offset_of!(AHdrMetadata_smpte2086, whitePoint) - 24usize]; + ["Offset of field: AHdrMetadata_smpte2086::maxLuminance"] + [::std::mem::offset_of!(AHdrMetadata_smpte2086, maxLuminance) - 32usize]; + ["Offset of field: AHdrMetadata_smpte2086::minLuminance"] + [::std::mem::offset_of!(AHdrMetadata_smpte2086, minLuminance) - 36usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct AHdrMetadata_cta861_3 { pub maxContentLightLevel: f32, pub maxFrameAverageLightLevel: f32, } -#[test] -fn bindgen_test_layout_AHdrMetadata_cta861_3() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(AHdrMetadata_cta861_3)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AHdrMetadata_cta861_3)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).maxContentLightLevel) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AHdrMetadata_cta861_3), - "::", - stringify!(maxContentLightLevel) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).maxFrameAverageLightLevel) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AHdrMetadata_cta861_3), - "::", - stringify!(maxFrameAverageLightLevel) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AHdrMetadata_cta861_3"][::std::mem::size_of::() - 8usize]; + ["Alignment of AHdrMetadata_cta861_3"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: AHdrMetadata_cta861_3::maxContentLightLevel"] + [::std::mem::offset_of!(AHdrMetadata_cta861_3, maxContentLightLevel) - 0usize]; + ["Offset of field: AHdrMetadata_cta861_3::maxFrameAverageLightLevel"] + [::std::mem::offset_of!(AHdrMetadata_cta861_3, maxFrameAverageLightLevel) - 4usize]; +}; pub const ANDROID_IMAGE_DECODER_SUCCESS: _bindgen_ty_9 = 0; pub const ANDROID_IMAGE_DECODER_INCOMPLETE: _bindgen_ty_9 = -1; pub const ANDROID_IMAGE_DECODER_ERROR: _bindgen_ty_9 = -2; @@ -5209,92 +4453,26 @@ pub struct __android_log_message { pub line: u32, pub message: *const ::std::os::raw::c_char, } -#[test] -fn bindgen_test_layout___android_log_message() { - const UNINIT: ::std::mem::MaybeUninit<__android_log_message> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__android_log_message>(), - 48usize, - concat!("Size of: ", stringify!(__android_log_message)) - ); - assert_eq!( - ::std::mem::align_of::<__android_log_message>(), - 8usize, - concat!("Alignment of ", stringify!(__android_log_message)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).struct_size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__android_log_message), - "::", - stringify!(struct_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).buffer_id) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__android_log_message), - "::", - stringify!(buffer_id) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).priority) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(__android_log_message), - "::", - stringify!(priority) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tag) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__android_log_message), - "::", - stringify!(tag) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).file) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(__android_log_message), - "::", - stringify!(file) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).line) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(__android_log_message), - "::", - stringify!(line) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).message) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(__android_log_message), - "::", - stringify!(message) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __android_log_message"][::std::mem::size_of::<__android_log_message>() - 48usize]; + ["Alignment of __android_log_message"] + [::std::mem::align_of::<__android_log_message>() - 8usize]; + ["Offset of field: __android_log_message::struct_size"] + [::std::mem::offset_of!(__android_log_message, struct_size) - 0usize]; + ["Offset of field: __android_log_message::buffer_id"] + [::std::mem::offset_of!(__android_log_message, buffer_id) - 8usize]; + ["Offset of field: __android_log_message::priority"] + [::std::mem::offset_of!(__android_log_message, priority) - 12usize]; + ["Offset of field: __android_log_message::tag"] + [::std::mem::offset_of!(__android_log_message, tag) - 16usize]; + ["Offset of field: __android_log_message::file"] + [::std::mem::offset_of!(__android_log_message, file) - 24usize]; + ["Offset of field: __android_log_message::line"] + [::std::mem::offset_of!(__android_log_message, line) - 32usize]; + ["Offset of field: __android_log_message::message"] + [::std::mem::offset_of!(__android_log_message, message) - 40usize]; +}; pub type __android_logger_function = ::std::option::Option; pub type __android_aborter_function = @@ -5353,71 +4531,16 @@ pub struct flock { pub l_len: off64_t, pub l_pid: pid_t, } -#[test] -fn bindgen_test_layout_flock() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(flock)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(flock)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).l_type) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(flock), - "::", - stringify!(l_type) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).l_whence) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(flock), - "::", - stringify!(l_whence) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).l_start) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(flock), - "::", - stringify!(l_start) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).l_len) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(flock), - "::", - stringify!(l_len) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).l_pid) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(flock), - "::", - stringify!(l_pid) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of flock"][::std::mem::size_of::() - 32usize]; + ["Alignment of flock"][::std::mem::align_of::() - 8usize]; + ["Offset of field: flock::l_type"][::std::mem::offset_of!(flock, l_type) - 0usize]; + ["Offset of field: flock::l_whence"][::std::mem::offset_of!(flock, l_whence) - 2usize]; + ["Offset of field: flock::l_start"][::std::mem::offset_of!(flock, l_start) - 8usize]; + ["Offset of field: flock::l_len"][::std::mem::offset_of!(flock, l_len) - 16usize]; + ["Offset of field: flock::l_pid"][::std::mem::offset_of!(flock, l_pid) - 24usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct flock64 { @@ -5427,153 +4550,42 @@ pub struct flock64 { pub l_len: off64_t, pub l_pid: pid_t, } -#[test] -fn bindgen_test_layout_flock64() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(flock64)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(flock64)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).l_type) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(flock64), - "::", - stringify!(l_type) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).l_whence) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(flock64), - "::", - stringify!(l_whence) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).l_start) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(flock64), - "::", - stringify!(l_start) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).l_len) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(flock64), - "::", - stringify!(l_len) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).l_pid) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(flock64), - "::", - stringify!(l_pid) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of flock64"][::std::mem::size_of::() - 32usize]; + ["Alignment of flock64"][::std::mem::align_of::() - 8usize]; + ["Offset of field: flock64::l_type"][::std::mem::offset_of!(flock64, l_type) - 0usize]; + ["Offset of field: flock64::l_whence"][::std::mem::offset_of!(flock64, l_whence) - 2usize]; + ["Offset of field: flock64::l_start"][::std::mem::offset_of!(flock64, l_start) - 8usize]; + ["Offset of field: flock64::l_len"][::std::mem::offset_of!(flock64, l_len) - 16usize]; + ["Offset of field: flock64::l_pid"][::std::mem::offset_of!(flock64, l_pid) - 24usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct f_owner_ex { pub type_: ::std::os::raw::c_int, pub pid: __kernel_pid_t, } -#[test] -fn bindgen_test_layout_f_owner_ex() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(f_owner_ex)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(f_owner_ex)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(f_owner_ex), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pid) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(f_owner_ex), - "::", - stringify!(pid) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of f_owner_ex"][::std::mem::size_of::() - 8usize]; + ["Alignment of f_owner_ex"][::std::mem::align_of::() - 4usize]; + ["Offset of field: f_owner_ex::type_"][::std::mem::offset_of!(f_owner_ex, type_) - 0usize]; + ["Offset of field: f_owner_ex::pid"][::std::mem::offset_of!(f_owner_ex, pid) - 4usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct iovec { pub iov_base: *mut ::std::os::raw::c_void, pub iov_len: __kernel_size_t, } -#[test] -fn bindgen_test_layout_iovec() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(iovec)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(iovec)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iov_base) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(iovec), - "::", - stringify!(iov_base) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iov_len) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(iovec), - "::", - stringify!(iov_len) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of iovec"][::std::mem::size_of::() - 16usize]; + ["Alignment of iovec"][::std::mem::align_of::() - 8usize]; + ["Offset of field: iovec::iov_base"][::std::mem::offset_of!(iovec, iov_base) - 0usize]; + ["Offset of field: iovec::iov_len"][::std::mem::offset_of!(iovec, iov_len) - 8usize]; +}; pub type sa_family_t = ::std::os::raw::c_ushort; #[repr(C)] #[derive(Copy, Clone)] @@ -5592,87 +4604,31 @@ pub struct sockaddr_storage__bindgen_ty_1__bindgen_ty_1 { pub ss_family: sa_family_t, pub __data: [::std::os::raw::c_char; 126usize], } -#[test] -fn bindgen_test_layout_sockaddr_storage__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 128usize, - concat!( - "Size of: ", - stringify!(sockaddr_storage__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 2usize, - concat!( - "Alignment of ", - stringify!(sockaddr_storage__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ss_family) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sockaddr_storage__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(ss_family) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__data) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(sockaddr_storage__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(__data) - ) - ); -} -#[test] -fn bindgen_test_layout_sockaddr_storage__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 128usize, - concat!("Size of: ", stringify!(sockaddr_storage__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(sockaddr_storage__bindgen_ty_1)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__align) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sockaddr_storage__bindgen_ty_1), - "::", - stringify!(__align) - ) - ); -} -#[test] -fn bindgen_test_layout_sockaddr_storage() { - assert_eq!( - ::std::mem::size_of::(), - 128usize, - concat!("Size of: ", stringify!(sockaddr_storage)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(sockaddr_storage)) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sockaddr_storage__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::size_of::() - 128usize]; + ["Alignment of sockaddr_storage__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::align_of::() - 2usize]; + ["Offset of field: sockaddr_storage__bindgen_ty_1__bindgen_ty_1::ss_family"] + [::std::mem::offset_of!(sockaddr_storage__bindgen_ty_1__bindgen_ty_1, ss_family) - 0usize]; + ["Offset of field: sockaddr_storage__bindgen_ty_1__bindgen_ty_1::__data"] + [::std::mem::offset_of!(sockaddr_storage__bindgen_ty_1__bindgen_ty_1, __data) - 2usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sockaddr_storage__bindgen_ty_1"] + [::std::mem::size_of::() - 128usize]; + ["Alignment of sockaddr_storage__bindgen_ty_1"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: sockaddr_storage__bindgen_ty_1::__align"] + [::std::mem::offset_of!(sockaddr_storage__bindgen_ty_1, __align) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sockaddr_storage"][::std::mem::size_of::() - 128usize]; + ["Alignment of sockaddr_storage"][::std::mem::align_of::() - 8usize]; +}; pub const SHUT_RD: _bindgen_ty_32 = 0; pub const SHUT_WR: _bindgen_ty_32 = 1; pub const SHUT_RDWR: _bindgen_ty_32 = 2; @@ -5683,82 +4639,26 @@ pub struct sockaddr { pub sa_family: sa_family_t, pub sa_data: [::std::os::raw::c_char; 14usize], } -#[test] -fn bindgen_test_layout_sockaddr() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(sockaddr)) - ); - assert_eq!( - ::std::mem::align_of::(), - 2usize, - concat!("Alignment of ", stringify!(sockaddr)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sa_family) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sockaddr), - "::", - stringify!(sa_family) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sa_data) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(sockaddr), - "::", - stringify!(sa_data) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sockaddr"][::std::mem::size_of::() - 16usize]; + ["Alignment of sockaddr"][::std::mem::align_of::() - 2usize]; + ["Offset of field: sockaddr::sa_family"][::std::mem::offset_of!(sockaddr, sa_family) - 0usize]; + ["Offset of field: sockaddr::sa_data"][::std::mem::offset_of!(sockaddr, sa_data) - 2usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct linger { pub l_onoff: ::std::os::raw::c_int, pub l_linger: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_linger() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(linger)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(linger)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).l_onoff) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(linger), - "::", - stringify!(l_onoff) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).l_linger) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(linger), - "::", - stringify!(l_linger) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of linger"][::std::mem::size_of::() - 8usize]; + ["Alignment of linger"][::std::mem::align_of::() - 4usize]; + ["Offset of field: linger::l_onoff"][::std::mem::offset_of!(linger, l_onoff) - 0usize]; + ["Offset of field: linger::l_linger"][::std::mem::offset_of!(linger, l_linger) - 4usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct msghdr { @@ -5770,132 +4670,32 @@ pub struct msghdr { pub msg_controllen: usize, pub msg_flags: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_msghdr() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(msghdr)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(msghdr)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).msg_name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(msghdr), - "::", - stringify!(msg_name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).msg_namelen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(msghdr), - "::", - stringify!(msg_namelen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).msg_iov) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(msghdr), - "::", - stringify!(msg_iov) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).msg_iovlen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(msghdr), - "::", - stringify!(msg_iovlen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).msg_control) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(msghdr), - "::", - stringify!(msg_control) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).msg_controllen) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(msghdr), - "::", - stringify!(msg_controllen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).msg_flags) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(msghdr), - "::", - stringify!(msg_flags) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of msghdr"][::std::mem::size_of::() - 56usize]; + ["Alignment of msghdr"][::std::mem::align_of::() - 8usize]; + ["Offset of field: msghdr::msg_name"][::std::mem::offset_of!(msghdr, msg_name) - 0usize]; + ["Offset of field: msghdr::msg_namelen"][::std::mem::offset_of!(msghdr, msg_namelen) - 8usize]; + ["Offset of field: msghdr::msg_iov"][::std::mem::offset_of!(msghdr, msg_iov) - 16usize]; + ["Offset of field: msghdr::msg_iovlen"][::std::mem::offset_of!(msghdr, msg_iovlen) - 24usize]; + ["Offset of field: msghdr::msg_control"][::std::mem::offset_of!(msghdr, msg_control) - 32usize]; + ["Offset of field: msghdr::msg_controllen"] + [::std::mem::offset_of!(msghdr, msg_controllen) - 40usize]; + ["Offset of field: msghdr::msg_flags"][::std::mem::offset_of!(msghdr, msg_flags) - 48usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct mmsghdr { pub msg_hdr: msghdr, pub msg_len: ::std::os::raw::c_uint, } -#[test] -fn bindgen_test_layout_mmsghdr() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(mmsghdr)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(mmsghdr)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).msg_hdr) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(mmsghdr), - "::", - stringify!(msg_hdr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).msg_len) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(mmsghdr), - "::", - stringify!(msg_len) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of mmsghdr"][::std::mem::size_of::() - 64usize]; + ["Alignment of mmsghdr"][::std::mem::align_of::() - 8usize]; + ["Offset of field: mmsghdr::msg_hdr"][::std::mem::offset_of!(mmsghdr, msg_hdr) - 0usize]; + ["Offset of field: mmsghdr::msg_len"][::std::mem::offset_of!(mmsghdr, msg_len) - 56usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct cmsghdr { @@ -5903,51 +4703,14 @@ pub struct cmsghdr { pub cmsg_level: ::std::os::raw::c_int, pub cmsg_type: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_cmsghdr() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(cmsghdr)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(cmsghdr)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cmsg_len) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cmsghdr), - "::", - stringify!(cmsg_len) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cmsg_level) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cmsghdr), - "::", - stringify!(cmsg_level) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cmsg_type) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(cmsghdr), - "::", - stringify!(cmsg_type) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cmsghdr"][::std::mem::size_of::() - 16usize]; + ["Alignment of cmsghdr"][::std::mem::align_of::() - 8usize]; + ["Offset of field: cmsghdr::cmsg_len"][::std::mem::offset_of!(cmsghdr, cmsg_len) - 0usize]; + ["Offset of field: cmsghdr::cmsg_level"][::std::mem::offset_of!(cmsghdr, cmsg_level) - 8usize]; + ["Offset of field: cmsghdr::cmsg_type"][::std::mem::offset_of!(cmsghdr, cmsg_type) - 12usize]; +}; extern "C" { pub fn __cmsg_nxthdr(__msg: *mut msghdr, __cmsg: *mut cmsghdr) -> *mut cmsghdr; } @@ -5958,51 +4721,14 @@ pub struct ucred { pub uid: uid_t, pub gid: gid_t, } -#[test] -fn bindgen_test_layout_ucred() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(ucred)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(ucred)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pid) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ucred), - "::", - stringify!(pid) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uid) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ucred), - "::", - stringify!(uid) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gid) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ucred), - "::", - stringify!(gid) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ucred"][::std::mem::size_of::() - 12usize]; + ["Alignment of ucred"][::std::mem::align_of::() - 4usize]; + ["Offset of field: ucred::pid"][::std::mem::offset_of!(ucred, pid) - 0usize]; + ["Offset of field: ucred::uid"][::std::mem::offset_of!(ucred, uid) - 4usize]; + ["Offset of field: ucred::gid"][::std::mem::offset_of!(ucred, gid) - 8usize]; +}; extern "C" { pub fn accept( __fd: ::std::os::raw::c_int, @@ -6167,71 +4893,17 @@ pub struct hostent { pub h_length: ::std::os::raw::c_int, pub h_addr_list: *mut *mut ::std::os::raw::c_char, } -#[test] -fn bindgen_test_layout_hostent() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(hostent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(hostent)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).h_name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(hostent), - "::", - stringify!(h_name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).h_aliases) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(hostent), - "::", - stringify!(h_aliases) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).h_addrtype) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(hostent), - "::", - stringify!(h_addrtype) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).h_length) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(hostent), - "::", - stringify!(h_length) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).h_addr_list) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(hostent), - "::", - stringify!(h_addr_list) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of hostent"][::std::mem::size_of::() - 32usize]; + ["Alignment of hostent"][::std::mem::align_of::() - 8usize]; + ["Offset of field: hostent::h_name"][::std::mem::offset_of!(hostent, h_name) - 0usize]; + ["Offset of field: hostent::h_aliases"][::std::mem::offset_of!(hostent, h_aliases) - 8usize]; + ["Offset of field: hostent::h_addrtype"][::std::mem::offset_of!(hostent, h_addrtype) - 16usize]; + ["Offset of field: hostent::h_length"][::std::mem::offset_of!(hostent, h_length) - 20usize]; + ["Offset of field: hostent::h_addr_list"] + [::std::mem::offset_of!(hostent, h_addr_list) - 24usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct netent { @@ -6240,61 +4912,15 @@ pub struct netent { pub n_addrtype: ::std::os::raw::c_int, pub n_net: u32, } -#[test] -fn bindgen_test_layout_netent() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(netent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(netent)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).n_name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(netent), - "::", - stringify!(n_name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).n_aliases) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(netent), - "::", - stringify!(n_aliases) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).n_addrtype) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(netent), - "::", - stringify!(n_addrtype) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).n_net) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(netent), - "::", - stringify!(n_net) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of netent"][::std::mem::size_of::() - 24usize]; + ["Alignment of netent"][::std::mem::align_of::() - 8usize]; + ["Offset of field: netent::n_name"][::std::mem::offset_of!(netent, n_name) - 0usize]; + ["Offset of field: netent::n_aliases"][::std::mem::offset_of!(netent, n_aliases) - 8usize]; + ["Offset of field: netent::n_addrtype"][::std::mem::offset_of!(netent, n_addrtype) - 16usize]; + ["Offset of field: netent::n_net"][::std::mem::offset_of!(netent, n_net) - 20usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct servent { @@ -6303,61 +4929,15 @@ pub struct servent { pub s_port: ::std::os::raw::c_int, pub s_proto: *mut ::std::os::raw::c_char, } -#[test] -fn bindgen_test_layout_servent() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(servent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(servent)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).s_name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(servent), - "::", - stringify!(s_name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).s_aliases) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(servent), - "::", - stringify!(s_aliases) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).s_port) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(servent), - "::", - stringify!(s_port) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).s_proto) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(servent), - "::", - stringify!(s_proto) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of servent"][::std::mem::size_of::() - 32usize]; + ["Alignment of servent"][::std::mem::align_of::() - 8usize]; + ["Offset of field: servent::s_name"][::std::mem::offset_of!(servent, s_name) - 0usize]; + ["Offset of field: servent::s_aliases"][::std::mem::offset_of!(servent, s_aliases) - 8usize]; + ["Offset of field: servent::s_port"][::std::mem::offset_of!(servent, s_port) - 16usize]; + ["Offset of field: servent::s_proto"][::std::mem::offset_of!(servent, s_proto) - 24usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct protoent { @@ -6365,51 +4945,14 @@ pub struct protoent { pub p_aliases: *mut *mut ::std::os::raw::c_char, pub p_proto: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_protoent() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(protoent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(protoent)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).p_name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(protoent), - "::", - stringify!(p_name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).p_aliases) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(protoent), - "::", - stringify!(p_aliases) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).p_proto) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(protoent), - "::", - stringify!(p_proto) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of protoent"][::std::mem::size_of::() - 24usize]; + ["Alignment of protoent"][::std::mem::align_of::() - 8usize]; + ["Offset of field: protoent::p_name"][::std::mem::offset_of!(protoent, p_name) - 0usize]; + ["Offset of field: protoent::p_aliases"][::std::mem::offset_of!(protoent, p_aliases) - 8usize]; + ["Offset of field: protoent::p_proto"][::std::mem::offset_of!(protoent, p_proto) - 16usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct addrinfo { @@ -6422,101 +4965,23 @@ pub struct addrinfo { pub ai_addr: *mut sockaddr, pub ai_next: *mut addrinfo, } -#[test] -fn bindgen_test_layout_addrinfo() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(addrinfo)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(addrinfo)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ai_flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(addrinfo), - "::", - stringify!(ai_flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ai_family) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(addrinfo), - "::", - stringify!(ai_family) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ai_socktype) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(addrinfo), - "::", - stringify!(ai_socktype) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ai_protocol) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(addrinfo), - "::", - stringify!(ai_protocol) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ai_addrlen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(addrinfo), - "::", - stringify!(ai_addrlen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ai_canonname) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(addrinfo), - "::", - stringify!(ai_canonname) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ai_addr) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(addrinfo), - "::", - stringify!(ai_addr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ai_next) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(addrinfo), - "::", - stringify!(ai_next) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of addrinfo"][::std::mem::size_of::() - 48usize]; + ["Alignment of addrinfo"][::std::mem::align_of::() - 8usize]; + ["Offset of field: addrinfo::ai_flags"][::std::mem::offset_of!(addrinfo, ai_flags) - 0usize]; + ["Offset of field: addrinfo::ai_family"][::std::mem::offset_of!(addrinfo, ai_family) - 4usize]; + ["Offset of field: addrinfo::ai_socktype"] + [::std::mem::offset_of!(addrinfo, ai_socktype) - 8usize]; + ["Offset of field: addrinfo::ai_protocol"] + [::std::mem::offset_of!(addrinfo, ai_protocol) - 12usize]; + ["Offset of field: addrinfo::ai_addrlen"] + [::std::mem::offset_of!(addrinfo, ai_addrlen) - 16usize]; + ["Offset of field: addrinfo::ai_canonname"] + [::std::mem::offset_of!(addrinfo, ai_canonname) - 24usize]; + ["Offset of field: addrinfo::ai_addr"][::std::mem::offset_of!(addrinfo, ai_addr) - 32usize]; + ["Offset of field: addrinfo::ai_next"][::std::mem::offset_of!(addrinfo, ai_next) - 40usize]; +}; extern "C" { pub fn getaddrinfo( __node: *const ::std::os::raw::c_char, @@ -7120,121 +5585,21 @@ pub struct mallinfo { pub fordblks: usize, pub keepcost: usize, } -#[test] -fn bindgen_test_layout_mallinfo() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 80usize, - concat!("Size of: ", stringify!(mallinfo)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(mallinfo)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).arena) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(mallinfo), - "::", - stringify!(arena) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ordblks) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(mallinfo), - "::", - stringify!(ordblks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).smblks) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(mallinfo), - "::", - stringify!(smblks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hblks) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(mallinfo), - "::", - stringify!(hblks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hblkhd) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(mallinfo), - "::", - stringify!(hblkhd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).usmblks) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(mallinfo), - "::", - stringify!(usmblks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fsmblks) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(mallinfo), - "::", - stringify!(fsmblks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uordblks) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(mallinfo), - "::", - stringify!(uordblks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fordblks) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(mallinfo), - "::", - stringify!(fordblks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).keepcost) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(mallinfo), - "::", - stringify!(keepcost) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of mallinfo"][::std::mem::size_of::() - 80usize]; + ["Alignment of mallinfo"][::std::mem::align_of::() - 8usize]; + ["Offset of field: mallinfo::arena"][::std::mem::offset_of!(mallinfo, arena) - 0usize]; + ["Offset of field: mallinfo::ordblks"][::std::mem::offset_of!(mallinfo, ordblks) - 8usize]; + ["Offset of field: mallinfo::smblks"][::std::mem::offset_of!(mallinfo, smblks) - 16usize]; + ["Offset of field: mallinfo::hblks"][::std::mem::offset_of!(mallinfo, hblks) - 24usize]; + ["Offset of field: mallinfo::hblkhd"][::std::mem::offset_of!(mallinfo, hblkhd) - 32usize]; + ["Offset of field: mallinfo::usmblks"][::std::mem::offset_of!(mallinfo, usmblks) - 40usize]; + ["Offset of field: mallinfo::fsmblks"][::std::mem::offset_of!(mallinfo, fsmblks) - 48usize]; + ["Offset of field: mallinfo::uordblks"][::std::mem::offset_of!(mallinfo, uordblks) - 56usize]; + ["Offset of field: mallinfo::fordblks"][::std::mem::offset_of!(mallinfo, fordblks) - 64usize]; + ["Offset of field: mallinfo::keepcost"][::std::mem::offset_of!(mallinfo, keepcost) - 72usize]; +}; extern "C" { pub fn mallinfo() -> mallinfo; } @@ -7252,121 +5617,21 @@ pub struct mallinfo2 { pub fordblks: usize, pub keepcost: usize, } -#[test] -fn bindgen_test_layout_mallinfo2() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 80usize, - concat!("Size of: ", stringify!(mallinfo2)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(mallinfo2)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).arena) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(mallinfo2), - "::", - stringify!(arena) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ordblks) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(mallinfo2), - "::", - stringify!(ordblks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).smblks) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(mallinfo2), - "::", - stringify!(smblks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hblks) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(mallinfo2), - "::", - stringify!(hblks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hblkhd) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(mallinfo2), - "::", - stringify!(hblkhd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).usmblks) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(mallinfo2), - "::", - stringify!(usmblks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fsmblks) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(mallinfo2), - "::", - stringify!(fsmblks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uordblks) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(mallinfo2), - "::", - stringify!(uordblks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fordblks) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(mallinfo2), - "::", - stringify!(fordblks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).keepcost) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(mallinfo2), - "::", - stringify!(keepcost) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of mallinfo2"][::std::mem::size_of::() - 80usize]; + ["Alignment of mallinfo2"][::std::mem::align_of::() - 8usize]; + ["Offset of field: mallinfo2::arena"][::std::mem::offset_of!(mallinfo2, arena) - 0usize]; + ["Offset of field: mallinfo2::ordblks"][::std::mem::offset_of!(mallinfo2, ordblks) - 8usize]; + ["Offset of field: mallinfo2::smblks"][::std::mem::offset_of!(mallinfo2, smblks) - 16usize]; + ["Offset of field: mallinfo2::hblks"][::std::mem::offset_of!(mallinfo2, hblks) - 24usize]; + ["Offset of field: mallinfo2::hblkhd"][::std::mem::offset_of!(mallinfo2, hblkhd) - 32usize]; + ["Offset of field: mallinfo2::usmblks"][::std::mem::offset_of!(mallinfo2, usmblks) - 40usize]; + ["Offset of field: mallinfo2::fsmblks"][::std::mem::offset_of!(mallinfo2, fsmblks) - 48usize]; + ["Offset of field: mallinfo2::uordblks"][::std::mem::offset_of!(mallinfo2, uordblks) - 56usize]; + ["Offset of field: mallinfo2::fordblks"][::std::mem::offset_of!(mallinfo2, fordblks) - 64usize]; + ["Offset of field: mallinfo2::keepcost"][::std::mem::offset_of!(mallinfo2, keepcost) - 72usize]; +}; extern "C" { pub fn malloc_info( __must_be_zero: ::std::os::raw::c_int, @@ -7707,41 +5972,13 @@ pub struct div_t { pub quot: ::std::os::raw::c_int, pub rem: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_div_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(div_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(div_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).quot) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(div_t), - "::", - stringify!(quot) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rem) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(div_t), - "::", - stringify!(rem) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of div_t"][::std::mem::size_of::() - 8usize]; + ["Alignment of div_t"][::std::mem::align_of::() - 4usize]; + ["Offset of field: div_t::quot"][::std::mem::offset_of!(div_t, quot) - 0usize]; + ["Offset of field: div_t::rem"][::std::mem::offset_of!(div_t, rem) - 4usize]; +}; extern "C" { pub fn div(__numerator: ::std::os::raw::c_int, __denominator: ::std::os::raw::c_int) -> div_t; } @@ -7751,41 +5988,13 @@ pub struct ldiv_t { pub quot: ::std::os::raw::c_long, pub rem: ::std::os::raw::c_long, } -#[test] -fn bindgen_test_layout_ldiv_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(ldiv_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(ldiv_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).quot) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ldiv_t), - "::", - stringify!(quot) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rem) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ldiv_t), - "::", - stringify!(rem) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ldiv_t"][::std::mem::size_of::() - 16usize]; + ["Alignment of ldiv_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: ldiv_t::quot"][::std::mem::offset_of!(ldiv_t, quot) - 0usize]; + ["Offset of field: ldiv_t::rem"][::std::mem::offset_of!(ldiv_t, rem) - 8usize]; +}; extern "C" { pub fn ldiv( __numerator: ::std::os::raw::c_long, @@ -7798,41 +6007,13 @@ pub struct lldiv_t { pub quot: ::std::os::raw::c_longlong, pub rem: ::std::os::raw::c_longlong, } -#[test] -fn bindgen_test_layout_lldiv_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(lldiv_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(lldiv_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).quot) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(lldiv_t), - "::", - stringify!(quot) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rem) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(lldiv_t), - "::", - stringify!(rem) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of lldiv_t"][::std::mem::size_of::() - 16usize]; + ["Alignment of lldiv_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: lldiv_t::quot"][::std::mem::offset_of!(lldiv_t, quot) - 0usize]; + ["Offset of field: lldiv_t::rem"][::std::mem::offset_of!(lldiv_t, rem) - 8usize]; +}; extern "C" { pub fn lldiv( __numerator: ::std::os::raw::c_longlong, @@ -8083,81 +6264,23 @@ pub struct ANativeWindow_Buffer { pub bits: *mut ::std::os::raw::c_void, pub reserved: [u32; 6usize], } -#[test] -fn bindgen_test_layout_ANativeWindow_Buffer() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(ANativeWindow_Buffer)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(ANativeWindow_Buffer)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ANativeWindow_Buffer), - "::", - stringify!(width) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ANativeWindow_Buffer), - "::", - stringify!(height) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).stride) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ANativeWindow_Buffer), - "::", - stringify!(stride) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).format) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(ANativeWindow_Buffer), - "::", - stringify!(format) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bits) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(ANativeWindow_Buffer), - "::", - stringify!(bits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(ANativeWindow_Buffer), - "::", - stringify!(reserved) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ANativeWindow_Buffer"][::std::mem::size_of::() - 48usize]; + ["Alignment of ANativeWindow_Buffer"][::std::mem::align_of::() - 8usize]; + ["Offset of field: ANativeWindow_Buffer::width"] + [::std::mem::offset_of!(ANativeWindow_Buffer, width) - 0usize]; + ["Offset of field: ANativeWindow_Buffer::height"] + [::std::mem::offset_of!(ANativeWindow_Buffer, height) - 4usize]; + ["Offset of field: ANativeWindow_Buffer::stride"] + [::std::mem::offset_of!(ANativeWindow_Buffer, stride) - 8usize]; + ["Offset of field: ANativeWindow_Buffer::format"] + [::std::mem::offset_of!(ANativeWindow_Buffer, format) - 12usize]; + ["Offset of field: ANativeWindow_Buffer::bits"] + [::std::mem::offset_of!(ANativeWindow_Buffer, bits) - 16usize]; + ["Offset of field: ANativeWindow_Buffer::reserved"] + [::std::mem::offset_of!(ANativeWindow_Buffer, reserved) - 24usize]; +}; extern "C" { pub fn ANativeWindow_acquire(window: *mut ANativeWindow); } @@ -8256,121 +6379,30 @@ pub struct ANativeActivity { pub assetManager: *mut AAssetManager, pub obbPath: *const ::std::os::raw::c_char, } -#[test] -fn bindgen_test_layout_ANativeActivity() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 80usize, - concat!("Size of: ", stringify!(ANativeActivity)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(ANativeActivity)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).callbacks) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivity), - "::", - stringify!(callbacks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).vm) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivity), - "::", - stringify!(vm) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).env) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivity), - "::", - stringify!(env) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clazz) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivity), - "::", - stringify!(clazz) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).internalDataPath) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivity), - "::", - stringify!(internalDataPath) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).externalDataPath) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivity), - "::", - stringify!(externalDataPath) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sdkVersion) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivity), - "::", - stringify!(sdkVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).instance) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivity), - "::", - stringify!(instance) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).assetManager) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivity), - "::", - stringify!(assetManager) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).obbPath) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivity), - "::", - stringify!(obbPath) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ANativeActivity"][::std::mem::size_of::() - 80usize]; + ["Alignment of ANativeActivity"][::std::mem::align_of::() - 8usize]; + ["Offset of field: ANativeActivity::callbacks"] + [::std::mem::offset_of!(ANativeActivity, callbacks) - 0usize]; + ["Offset of field: ANativeActivity::vm"][::std::mem::offset_of!(ANativeActivity, vm) - 8usize]; + ["Offset of field: ANativeActivity::env"] + [::std::mem::offset_of!(ANativeActivity, env) - 16usize]; + ["Offset of field: ANativeActivity::clazz"] + [::std::mem::offset_of!(ANativeActivity, clazz) - 24usize]; + ["Offset of field: ANativeActivity::internalDataPath"] + [::std::mem::offset_of!(ANativeActivity, internalDataPath) - 32usize]; + ["Offset of field: ANativeActivity::externalDataPath"] + [::std::mem::offset_of!(ANativeActivity, externalDataPath) - 40usize]; + ["Offset of field: ANativeActivity::sdkVersion"] + [::std::mem::offset_of!(ANativeActivity, sdkVersion) - 48usize]; + ["Offset of field: ANativeActivity::instance"] + [::std::mem::offset_of!(ANativeActivity, instance) - 56usize]; + ["Offset of field: ANativeActivity::assetManager"] + [::std::mem::offset_of!(ANativeActivity, assetManager) - 64usize]; + ["Offset of field: ANativeActivity::obbPath"] + [::std::mem::offset_of!(ANativeActivity, obbPath) - 72usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ANativeActivityCallbacks { @@ -8413,182 +6445,45 @@ pub struct ANativeActivityCallbacks { ::std::option::Option, pub onLowMemory: ::std::option::Option, } -#[test] -fn bindgen_test_layout_ANativeActivityCallbacks() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 128usize, - concat!("Size of: ", stringify!(ANativeActivityCallbacks)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(ANativeActivityCallbacks)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onStart) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivityCallbacks), - "::", - stringify!(onStart) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onResume) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivityCallbacks), - "::", - stringify!(onResume) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onSaveInstanceState) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivityCallbacks), - "::", - stringify!(onSaveInstanceState) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onPause) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivityCallbacks), - "::", - stringify!(onPause) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onStop) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivityCallbacks), - "::", - stringify!(onStop) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onDestroy) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivityCallbacks), - "::", - stringify!(onDestroy) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onWindowFocusChanged) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivityCallbacks), - "::", - stringify!(onWindowFocusChanged) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onNativeWindowCreated) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivityCallbacks), - "::", - stringify!(onNativeWindowCreated) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onNativeWindowResized) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivityCallbacks), - "::", - stringify!(onNativeWindowResized) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onNativeWindowRedrawNeeded) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivityCallbacks), - "::", - stringify!(onNativeWindowRedrawNeeded) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onNativeWindowDestroyed) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivityCallbacks), - "::", - stringify!(onNativeWindowDestroyed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onInputQueueCreated) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivityCallbacks), - "::", - stringify!(onInputQueueCreated) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onInputQueueDestroyed) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivityCallbacks), - "::", - stringify!(onInputQueueDestroyed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onContentRectChanged) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivityCallbacks), - "::", - stringify!(onContentRectChanged) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onConfigurationChanged) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivityCallbacks), - "::", - stringify!(onConfigurationChanged) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onLowMemory) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivityCallbacks), - "::", - stringify!(onLowMemory) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ANativeActivityCallbacks"] + [::std::mem::size_of::() - 128usize]; + ["Alignment of ANativeActivityCallbacks"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: ANativeActivityCallbacks::onStart"] + [::std::mem::offset_of!(ANativeActivityCallbacks, onStart) - 0usize]; + ["Offset of field: ANativeActivityCallbacks::onResume"] + [::std::mem::offset_of!(ANativeActivityCallbacks, onResume) - 8usize]; + ["Offset of field: ANativeActivityCallbacks::onSaveInstanceState"] + [::std::mem::offset_of!(ANativeActivityCallbacks, onSaveInstanceState) - 16usize]; + ["Offset of field: ANativeActivityCallbacks::onPause"] + [::std::mem::offset_of!(ANativeActivityCallbacks, onPause) - 24usize]; + ["Offset of field: ANativeActivityCallbacks::onStop"] + [::std::mem::offset_of!(ANativeActivityCallbacks, onStop) - 32usize]; + ["Offset of field: ANativeActivityCallbacks::onDestroy"] + [::std::mem::offset_of!(ANativeActivityCallbacks, onDestroy) - 40usize]; + ["Offset of field: ANativeActivityCallbacks::onWindowFocusChanged"] + [::std::mem::offset_of!(ANativeActivityCallbacks, onWindowFocusChanged) - 48usize]; + ["Offset of field: ANativeActivityCallbacks::onNativeWindowCreated"] + [::std::mem::offset_of!(ANativeActivityCallbacks, onNativeWindowCreated) - 56usize]; + ["Offset of field: ANativeActivityCallbacks::onNativeWindowResized"] + [::std::mem::offset_of!(ANativeActivityCallbacks, onNativeWindowResized) - 64usize]; + ["Offset of field: ANativeActivityCallbacks::onNativeWindowRedrawNeeded"] + [::std::mem::offset_of!(ANativeActivityCallbacks, onNativeWindowRedrawNeeded) - 72usize]; + ["Offset of field: ANativeActivityCallbacks::onNativeWindowDestroyed"] + [::std::mem::offset_of!(ANativeActivityCallbacks, onNativeWindowDestroyed) - 80usize]; + ["Offset of field: ANativeActivityCallbacks::onInputQueueCreated"] + [::std::mem::offset_of!(ANativeActivityCallbacks, onInputQueueCreated) - 88usize]; + ["Offset of field: ANativeActivityCallbacks::onInputQueueDestroyed"] + [::std::mem::offset_of!(ANativeActivityCallbacks, onInputQueueDestroyed) - 96usize]; + ["Offset of field: ANativeActivityCallbacks::onContentRectChanged"] + [::std::mem::offset_of!(ANativeActivityCallbacks, onContentRectChanged) - 104usize]; + ["Offset of field: ANativeActivityCallbacks::onConfigurationChanged"] + [::std::mem::offset_of!(ANativeActivityCallbacks, onConfigurationChanged) - 112usize]; + ["Offset of field: ANativeActivityCallbacks::onLowMemory"] + [::std::mem::offset_of!(ANativeActivityCallbacks, onLowMemory) - 120usize]; +}; pub type ANativeActivity_createFunc = ::std::option::Option< unsafe extern "C" fn( activity: *mut ANativeActivity, @@ -9196,58 +7091,19 @@ pub struct ANeuralNetworksSymmPerChannelQuantParams { pub scaleCount: u32, pub scales: *const f32, } -#[test] -fn bindgen_test_layout_ANeuralNetworksSymmPerChannelQuantParams() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!( - "Size of: ", - stringify!(ANeuralNetworksSymmPerChannelQuantParams) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(ANeuralNetworksSymmPerChannelQuantParams) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).channelDim) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ANeuralNetworksSymmPerChannelQuantParams), - "::", - stringify!(channelDim) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).scaleCount) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ANeuralNetworksSymmPerChannelQuantParams), - "::", - stringify!(scaleCount) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).scales) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ANeuralNetworksSymmPerChannelQuantParams), - "::", - stringify!(scales) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ANeuralNetworksSymmPerChannelQuantParams"] + [::std::mem::size_of::() - 16usize]; + ["Alignment of ANeuralNetworksSymmPerChannelQuantParams"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: ANeuralNetworksSymmPerChannelQuantParams::channelDim"] + [::std::mem::offset_of!(ANeuralNetworksSymmPerChannelQuantParams, channelDim) - 0usize]; + ["Offset of field: ANeuralNetworksSymmPerChannelQuantParams::scaleCount"] + [::std::mem::offset_of!(ANeuralNetworksSymmPerChannelQuantParams, scaleCount) - 4usize]; + ["Offset of field: ANeuralNetworksSymmPerChannelQuantParams::scales"] + [::std::mem::offset_of!(ANeuralNetworksSymmPerChannelQuantParams, scales) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ANeuralNetworksBurst { @@ -9262,72 +7118,23 @@ pub struct ANeuralNetworksOperandType { pub scale: f32, pub zeroPoint: i32, } -#[test] -fn bindgen_test_layout_ANeuralNetworksOperandType() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(ANeuralNetworksOperandType)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(ANeuralNetworksOperandType)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ANeuralNetworksOperandType), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dimensionCount) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ANeuralNetworksOperandType), - "::", - stringify!(dimensionCount) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dimensions) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ANeuralNetworksOperandType), - "::", - stringify!(dimensions) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).scale) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(ANeuralNetworksOperandType), - "::", - stringify!(scale) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).zeroPoint) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(ANeuralNetworksOperandType), - "::", - stringify!(zeroPoint) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ANeuralNetworksOperandType"] + [::std::mem::size_of::() - 24usize]; + ["Alignment of ANeuralNetworksOperandType"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: ANeuralNetworksOperandType::type_"] + [::std::mem::offset_of!(ANeuralNetworksOperandType, type_) - 0usize]; + ["Offset of field: ANeuralNetworksOperandType::dimensionCount"] + [::std::mem::offset_of!(ANeuralNetworksOperandType, dimensionCount) - 4usize]; + ["Offset of field: ANeuralNetworksOperandType::dimensions"] + [::std::mem::offset_of!(ANeuralNetworksOperandType, dimensions) - 8usize]; + ["Offset of field: ANeuralNetworksOperandType::scale"] + [::std::mem::offset_of!(ANeuralNetworksOperandType, scale) - 16usize]; + ["Offset of field: ANeuralNetworksOperandType::zeroPoint"] + [::std::mem::offset_of!(ANeuralNetworksOperandType, zeroPoint) - 20usize]; +}; pub type ANeuralNetworksOperationType = i32; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -9792,371 +7599,132 @@ pub struct timespec { pub tv_sec: time_t, pub tv_nsec: ::std::os::raw::c_long, } -#[test] -fn bindgen_test_layout_timespec() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(timespec)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(timespec)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tv_sec) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(timespec), - "::", - stringify!(tv_sec) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tv_nsec) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(timespec), - "::", - stringify!(tv_nsec) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of timespec"][::std::mem::size_of::() - 16usize]; + ["Alignment of timespec"][::std::mem::align_of::() - 8usize]; + ["Offset of field: timespec::tv_sec"][::std::mem::offset_of!(timespec, tv_sec) - 0usize]; + ["Offset of field: timespec::tv_nsec"][::std::mem::offset_of!(timespec, tv_nsec) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __kernel_timespec { pub tv_sec: __kernel_time64_t, pub tv_nsec: ::std::os::raw::c_longlong, } -#[test] -fn bindgen_test_layout___kernel_timespec() { - const UNINIT: ::std::mem::MaybeUninit<__kernel_timespec> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__kernel_timespec>(), - 16usize, - concat!("Size of: ", stringify!(__kernel_timespec)) - ); - assert_eq!( - ::std::mem::align_of::<__kernel_timespec>(), - 8usize, - concat!("Alignment of ", stringify!(__kernel_timespec)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tv_sec) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__kernel_timespec), - "::", - stringify!(tv_sec) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tv_nsec) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__kernel_timespec), - "::", - stringify!(tv_nsec) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __kernel_timespec"][::std::mem::size_of::<__kernel_timespec>() - 16usize]; + ["Alignment of __kernel_timespec"][::std::mem::align_of::<__kernel_timespec>() - 8usize]; + ["Offset of field: __kernel_timespec::tv_sec"] + [::std::mem::offset_of!(__kernel_timespec, tv_sec) - 0usize]; + ["Offset of field: __kernel_timespec::tv_nsec"] + [::std::mem::offset_of!(__kernel_timespec, tv_nsec) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __kernel_itimerspec { pub it_interval: __kernel_timespec, pub it_value: __kernel_timespec, } -#[test] -fn bindgen_test_layout___kernel_itimerspec() { - const UNINIT: ::std::mem::MaybeUninit<__kernel_itimerspec> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__kernel_itimerspec>(), - 32usize, - concat!("Size of: ", stringify!(__kernel_itimerspec)) - ); - assert_eq!( - ::std::mem::align_of::<__kernel_itimerspec>(), - 8usize, - concat!("Alignment of ", stringify!(__kernel_itimerspec)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).it_interval) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__kernel_itimerspec), - "::", - stringify!(it_interval) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).it_value) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__kernel_itimerspec), - "::", - stringify!(it_value) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __kernel_itimerspec"][::std::mem::size_of::<__kernel_itimerspec>() - 32usize]; + ["Alignment of __kernel_itimerspec"][::std::mem::align_of::<__kernel_itimerspec>() - 8usize]; + ["Offset of field: __kernel_itimerspec::it_interval"] + [::std::mem::offset_of!(__kernel_itimerspec, it_interval) - 0usize]; + ["Offset of field: __kernel_itimerspec::it_value"] + [::std::mem::offset_of!(__kernel_itimerspec, it_value) - 16usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __kernel_old_timespec { pub tv_sec: __kernel_old_time_t, pub tv_nsec: ::std::os::raw::c_long, } -#[test] -fn bindgen_test_layout___kernel_old_timespec() { - const UNINIT: ::std::mem::MaybeUninit<__kernel_old_timespec> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__kernel_old_timespec>(), - 16usize, - concat!("Size of: ", stringify!(__kernel_old_timespec)) - ); - assert_eq!( - ::std::mem::align_of::<__kernel_old_timespec>(), - 8usize, - concat!("Alignment of ", stringify!(__kernel_old_timespec)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tv_sec) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__kernel_old_timespec), - "::", - stringify!(tv_sec) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tv_nsec) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__kernel_old_timespec), - "::", - stringify!(tv_nsec) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __kernel_old_timespec"][::std::mem::size_of::<__kernel_old_timespec>() - 16usize]; + ["Alignment of __kernel_old_timespec"] + [::std::mem::align_of::<__kernel_old_timespec>() - 8usize]; + ["Offset of field: __kernel_old_timespec::tv_sec"] + [::std::mem::offset_of!(__kernel_old_timespec, tv_sec) - 0usize]; + ["Offset of field: __kernel_old_timespec::tv_nsec"] + [::std::mem::offset_of!(__kernel_old_timespec, tv_nsec) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __kernel_sock_timeval { pub tv_sec: __s64, pub tv_usec: __s64, } -#[test] -fn bindgen_test_layout___kernel_sock_timeval() { - const UNINIT: ::std::mem::MaybeUninit<__kernel_sock_timeval> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__kernel_sock_timeval>(), - 16usize, - concat!("Size of: ", stringify!(__kernel_sock_timeval)) - ); - assert_eq!( - ::std::mem::align_of::<__kernel_sock_timeval>(), - 8usize, - concat!("Alignment of ", stringify!(__kernel_sock_timeval)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tv_sec) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__kernel_sock_timeval), - "::", - stringify!(tv_sec) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tv_usec) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__kernel_sock_timeval), - "::", - stringify!(tv_usec) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __kernel_sock_timeval"][::std::mem::size_of::<__kernel_sock_timeval>() - 16usize]; + ["Alignment of __kernel_sock_timeval"] + [::std::mem::align_of::<__kernel_sock_timeval>() - 8usize]; + ["Offset of field: __kernel_sock_timeval::tv_sec"] + [::std::mem::offset_of!(__kernel_sock_timeval, tv_sec) - 0usize]; + ["Offset of field: __kernel_sock_timeval::tv_usec"] + [::std::mem::offset_of!(__kernel_sock_timeval, tv_usec) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct timeval { pub tv_sec: __kernel_old_time_t, pub tv_usec: __kernel_suseconds_t, } -#[test] -fn bindgen_test_layout_timeval() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(timeval)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(timeval)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tv_sec) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(timeval), - "::", - stringify!(tv_sec) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tv_usec) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(timeval), - "::", - stringify!(tv_usec) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of timeval"][::std::mem::size_of::() - 16usize]; + ["Alignment of timeval"][::std::mem::align_of::() - 8usize]; + ["Offset of field: timeval::tv_sec"][::std::mem::offset_of!(timeval, tv_sec) - 0usize]; + ["Offset of field: timeval::tv_usec"][::std::mem::offset_of!(timeval, tv_usec) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct itimerspec { pub it_interval: timespec, pub it_value: timespec, } -#[test] -fn bindgen_test_layout_itimerspec() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(itimerspec)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(itimerspec)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).it_interval) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(itimerspec), - "::", - stringify!(it_interval) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).it_value) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(itimerspec), - "::", - stringify!(it_value) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of itimerspec"][::std::mem::size_of::() - 32usize]; + ["Alignment of itimerspec"][::std::mem::align_of::() - 8usize]; + ["Offset of field: itimerspec::it_interval"] + [::std::mem::offset_of!(itimerspec, it_interval) - 0usize]; + ["Offset of field: itimerspec::it_value"] + [::std::mem::offset_of!(itimerspec, it_value) - 16usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct itimerval { pub it_interval: timeval, pub it_value: timeval, } -#[test] -fn bindgen_test_layout_itimerval() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(itimerval)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(itimerval)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).it_interval) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(itimerval), - "::", - stringify!(it_interval) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).it_value) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(itimerval), - "::", - stringify!(it_value) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of itimerval"][::std::mem::size_of::() - 32usize]; + ["Alignment of itimerval"][::std::mem::align_of::() - 8usize]; + ["Offset of field: itimerval::it_interval"] + [::std::mem::offset_of!(itimerval, it_interval) - 0usize]; + ["Offset of field: itimerval::it_value"][::std::mem::offset_of!(itimerval, it_value) - 16usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct timezone { pub tz_minuteswest: ::std::os::raw::c_int, pub tz_dsttime: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_timezone() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(timezone)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(timezone)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tz_minuteswest) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(timezone), - "::", - stringify!(tz_minuteswest) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tz_dsttime) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(timezone), - "::", - stringify!(tz_dsttime) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of timezone"][::std::mem::size_of::() - 8usize]; + ["Alignment of timezone"][::std::mem::align_of::() - 4usize]; + ["Offset of field: timezone::tz_minuteswest"] + [::std::mem::offset_of!(timezone, tz_minuteswest) - 0usize]; + ["Offset of field: timezone::tz_dsttime"] + [::std::mem::offset_of!(timezone, tz_dsttime) - 4usize]; +}; #[repr(C)] #[repr(align(16))] #[derive(Debug, Copy, Clone)] @@ -10169,122 +7737,32 @@ pub struct sigcontext { pub __bindgen_padding_0: [u8; 8usize], pub __reserved: [__u8; 4096usize], } -#[test] -fn bindgen_test_layout_sigcontext() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 4384usize, - concat!("Size of: ", stringify!(sigcontext)) - ); - assert_eq!( - ::std::mem::align_of::(), - 16usize, - concat!("Alignment of ", stringify!(sigcontext)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fault_address) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(fault_address) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).regs) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(regs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sp) as usize - ptr as usize }, - 256usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(sp) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pc) as usize - ptr as usize }, - 264usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(pc) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pstate) as usize - ptr as usize }, - 272usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(pstate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__reserved) as usize - ptr as usize }, - 288usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(__reserved) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sigcontext"][::std::mem::size_of::() - 4384usize]; + ["Alignment of sigcontext"][::std::mem::align_of::() - 16usize]; + ["Offset of field: sigcontext::fault_address"] + [::std::mem::offset_of!(sigcontext, fault_address) - 0usize]; + ["Offset of field: sigcontext::regs"][::std::mem::offset_of!(sigcontext, regs) - 8usize]; + ["Offset of field: sigcontext::sp"][::std::mem::offset_of!(sigcontext, sp) - 256usize]; + ["Offset of field: sigcontext::pc"][::std::mem::offset_of!(sigcontext, pc) - 264usize]; + ["Offset of field: sigcontext::pstate"][::std::mem::offset_of!(sigcontext, pstate) - 272usize]; + ["Offset of field: sigcontext::__reserved"] + [::std::mem::offset_of!(sigcontext, __reserved) - 288usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _aarch64_ctx { pub magic: __u32, pub size: __u32, } -#[test] -fn bindgen_test_layout__aarch64_ctx() { - const UNINIT: ::std::mem::MaybeUninit<_aarch64_ctx> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_aarch64_ctx>(), - 8usize, - concat!("Size of: ", stringify!(_aarch64_ctx)) - ); - assert_eq!( - ::std::mem::align_of::<_aarch64_ctx>(), - 4usize, - concat!("Alignment of ", stringify!(_aarch64_ctx)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).magic) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_aarch64_ctx), - "::", - stringify!(magic) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_aarch64_ctx), - "::", - stringify!(size) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of _aarch64_ctx"][::std::mem::size_of::<_aarch64_ctx>() - 8usize]; + ["Alignment of _aarch64_ctx"][::std::mem::align_of::<_aarch64_ctx>() - 4usize]; + ["Offset of field: _aarch64_ctx::magic"][::std::mem::offset_of!(_aarch64_ctx, magic) - 0usize]; + ["Offset of field: _aarch64_ctx::size"][::std::mem::offset_of!(_aarch64_ctx, size) - 4usize]; +}; #[repr(C)] #[repr(align(16))] #[derive(Debug, Copy, Clone)] @@ -10294,102 +7772,32 @@ pub struct fpsimd_context { pub fpcr: __u32, pub vregs: [__uint128_t; 32usize], } -#[test] -fn bindgen_test_layout_fpsimd_context() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 528usize, - concat!("Size of: ", stringify!(fpsimd_context)) - ); - assert_eq!( - ::std::mem::align_of::(), - 16usize, - concat!("Alignment of ", stringify!(fpsimd_context)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).head) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(fpsimd_context), - "::", - stringify!(head) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fpsr) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(fpsimd_context), - "::", - stringify!(fpsr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fpcr) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(fpsimd_context), - "::", - stringify!(fpcr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).vregs) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(fpsimd_context), - "::", - stringify!(vregs) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of fpsimd_context"][::std::mem::size_of::() - 528usize]; + ["Alignment of fpsimd_context"][::std::mem::align_of::() - 16usize]; + ["Offset of field: fpsimd_context::head"] + [::std::mem::offset_of!(fpsimd_context, head) - 0usize]; + ["Offset of field: fpsimd_context::fpsr"] + [::std::mem::offset_of!(fpsimd_context, fpsr) - 8usize]; + ["Offset of field: fpsimd_context::fpcr"] + [::std::mem::offset_of!(fpsimd_context, fpcr) - 12usize]; + ["Offset of field: fpsimd_context::vregs"] + [::std::mem::offset_of!(fpsimd_context, vregs) - 16usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct esr_context { pub head: _aarch64_ctx, pub esr: __u64, } -#[test] -fn bindgen_test_layout_esr_context() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(esr_context)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(esr_context)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).head) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(esr_context), - "::", - stringify!(head) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).esr) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(esr_context), - "::", - stringify!(esr) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of esr_context"][::std::mem::size_of::() - 16usize]; + ["Alignment of esr_context"][::std::mem::align_of::() - 8usize]; + ["Offset of field: esr_context::head"][::std::mem::offset_of!(esr_context, head) - 0usize]; + ["Offset of field: esr_context::esr"][::std::mem::offset_of!(esr_context, esr) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct extra_context { @@ -10398,61 +7806,17 @@ pub struct extra_context { pub size: __u32, pub __reserved: [__u32; 3usize], } -#[test] -fn bindgen_test_layout_extra_context() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(extra_context)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(extra_context)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).head) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(extra_context), - "::", - stringify!(head) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).datap) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(extra_context), - "::", - stringify!(datap) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(extra_context), - "::", - stringify!(size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__reserved) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(extra_context), - "::", - stringify!(__reserved) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of extra_context"][::std::mem::size_of::() - 32usize]; + ["Alignment of extra_context"][::std::mem::align_of::() - 8usize]; + ["Offset of field: extra_context::head"][::std::mem::offset_of!(extra_context, head) - 0usize]; + ["Offset of field: extra_context::datap"] + [::std::mem::offset_of!(extra_context, datap) - 8usize]; + ["Offset of field: extra_context::size"][::std::mem::offset_of!(extra_context, size) - 16usize]; + ["Offset of field: extra_context::__reserved"] + [::std::mem::offset_of!(extra_context, __reserved) - 20usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct sve_context { @@ -10461,102 +7825,31 @@ pub struct sve_context { pub flags: __u16, pub __reserved: [__u16; 2usize], } -#[test] -fn bindgen_test_layout_sve_context() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(sve_context)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(sve_context)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).head) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sve_context), - "::", - stringify!(head) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).vl) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(sve_context), - "::", - stringify!(vl) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 10usize, - concat!( - "Offset of field: ", - stringify!(sve_context), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__reserved) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(sve_context), - "::", - stringify!(__reserved) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sve_context"][::std::mem::size_of::() - 16usize]; + ["Alignment of sve_context"][::std::mem::align_of::() - 4usize]; + ["Offset of field: sve_context::head"][::std::mem::offset_of!(sve_context, head) - 0usize]; + ["Offset of field: sve_context::vl"][::std::mem::offset_of!(sve_context, vl) - 8usize]; + ["Offset of field: sve_context::flags"][::std::mem::offset_of!(sve_context, flags) - 10usize]; + ["Offset of field: sve_context::__reserved"] + [::std::mem::offset_of!(sve_context, __reserved) - 12usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct tpidr2_context { pub head: _aarch64_ctx, pub tpidr2: __u64, } -#[test] -fn bindgen_test_layout_tpidr2_context() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(tpidr2_context)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(tpidr2_context)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).head) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(tpidr2_context), - "::", - stringify!(head) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tpidr2) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(tpidr2_context), - "::", - stringify!(tpidr2) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of tpidr2_context"][::std::mem::size_of::() - 16usize]; + ["Alignment of tpidr2_context"][::std::mem::align_of::() - 8usize]; + ["Offset of field: tpidr2_context::head"] + [::std::mem::offset_of!(tpidr2_context, head) - 0usize]; + ["Offset of field: tpidr2_context::tpidr2"] + [::std::mem::offset_of!(tpidr2_context, tpidr2) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct za_context { @@ -10564,51 +7857,15 @@ pub struct za_context { pub vl: __u16, pub __reserved: [__u16; 3usize], } -#[test] -fn bindgen_test_layout_za_context() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(za_context)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(za_context)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).head) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(za_context), - "::", - stringify!(head) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).vl) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(za_context), - "::", - stringify!(vl) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__reserved) as usize - ptr as usize }, - 10usize, - concat!( - "Offset of field: ", - stringify!(za_context), - "::", - stringify!(__reserved) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of za_context"][::std::mem::size_of::() - 16usize]; + ["Alignment of za_context"][::std::mem::align_of::() - 4usize]; + ["Offset of field: za_context::head"][::std::mem::offset_of!(za_context, head) - 0usize]; + ["Offset of field: za_context::vl"][::std::mem::offset_of!(za_context, vl) - 8usize]; + ["Offset of field: za_context::__reserved"] + [::std::mem::offset_of!(za_context, __reserved) - 10usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct zt_context { @@ -10616,81 +7873,26 @@ pub struct zt_context { pub nregs: __u16, pub __reserved: [__u16; 3usize], } -#[test] -fn bindgen_test_layout_zt_context() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(zt_context)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(zt_context)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).head) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(zt_context), - "::", - stringify!(head) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nregs) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(zt_context), - "::", - stringify!(nregs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__reserved) as usize - ptr as usize }, - 10usize, - concat!( - "Offset of field: ", - stringify!(zt_context), - "::", - stringify!(__reserved) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of zt_context"][::std::mem::size_of::() - 16usize]; + ["Alignment of zt_context"][::std::mem::align_of::() - 4usize]; + ["Offset of field: zt_context::head"][::std::mem::offset_of!(zt_context, head) - 0usize]; + ["Offset of field: zt_context::nregs"][::std::mem::offset_of!(zt_context, nregs) - 8usize]; + ["Offset of field: zt_context::__reserved"] + [::std::mem::offset_of!(zt_context, __reserved) - 10usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct sigset_t { pub sig: [::std::os::raw::c_ulong; 1usize], } -#[test] -fn bindgen_test_layout_sigset_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(sigset_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(sigset_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sig) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigset_t), - "::", - stringify!(sig) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sigset_t"][::std::mem::size_of::() - 8usize]; + ["Alignment of sigset_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: sigset_t::sig"][::std::mem::offset_of!(sigset_t, sig) - 0usize]; +}; pub type old_sigset_t = ::std::os::raw::c_ulong; pub type __signalfn_t = ::std::option::Option; pub type __sighandler_t = __signalfn_t; @@ -10704,61 +7906,19 @@ pub struct __kernel_sigaction { pub sa_restorer: __sigrestore_t, pub sa_mask: sigset_t, } -#[test] -fn bindgen_test_layout___kernel_sigaction() { - const UNINIT: ::std::mem::MaybeUninit<__kernel_sigaction> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__kernel_sigaction>(), - 32usize, - concat!("Size of: ", stringify!(__kernel_sigaction)) - ); - assert_eq!( - ::std::mem::align_of::<__kernel_sigaction>(), - 8usize, - concat!("Alignment of ", stringify!(__kernel_sigaction)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sa_handler) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__kernel_sigaction), - "::", - stringify!(sa_handler) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sa_flags) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__kernel_sigaction), - "::", - stringify!(sa_flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sa_restorer) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__kernel_sigaction), - "::", - stringify!(sa_restorer) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sa_mask) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(__kernel_sigaction), - "::", - stringify!(sa_mask) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __kernel_sigaction"][::std::mem::size_of::<__kernel_sigaction>() - 32usize]; + ["Alignment of __kernel_sigaction"][::std::mem::align_of::<__kernel_sigaction>() - 8usize]; + ["Offset of field: __kernel_sigaction::sa_handler"] + [::std::mem::offset_of!(__kernel_sigaction, sa_handler) - 0usize]; + ["Offset of field: __kernel_sigaction::sa_flags"] + [::std::mem::offset_of!(__kernel_sigaction, sa_flags) - 8usize]; + ["Offset of field: __kernel_sigaction::sa_restorer"] + [::std::mem::offset_of!(__kernel_sigaction, sa_restorer) - 16usize]; + ["Offset of field: __kernel_sigaction::sa_mask"] + [::std::mem::offset_of!(__kernel_sigaction, sa_mask) - 24usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct sigaltstack { @@ -10766,51 +7926,16 @@ pub struct sigaltstack { pub ss_flags: ::std::os::raw::c_int, pub ss_size: __kernel_size_t, } -#[test] -fn bindgen_test_layout_sigaltstack() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(sigaltstack)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(sigaltstack)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ss_sp) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigaltstack), - "::", - stringify!(ss_sp) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ss_flags) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(sigaltstack), - "::", - stringify!(ss_flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ss_size) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(sigaltstack), - "::", - stringify!(ss_size) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sigaltstack"][::std::mem::size_of::() - 24usize]; + ["Alignment of sigaltstack"][::std::mem::align_of::() - 8usize]; + ["Offset of field: sigaltstack::ss_sp"][::std::mem::offset_of!(sigaltstack, ss_sp) - 0usize]; + ["Offset of field: sigaltstack::ss_flags"] + [::std::mem::offset_of!(sigaltstack, ss_flags) - 8usize]; + ["Offset of field: sigaltstack::ss_size"] + [::std::mem::offset_of!(sigaltstack, ss_size) - 16usize]; +}; pub type stack_t = sigaltstack; #[repr(C)] #[derive(Copy, Clone)] @@ -10818,41 +7943,13 @@ pub union sigval { pub sival_int: ::std::os::raw::c_int, pub sival_ptr: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout_sigval() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(sigval)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(sigval)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sival_int) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigval), - "::", - stringify!(sival_int) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sival_ptr) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigval), - "::", - stringify!(sival_ptr) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sigval"][::std::mem::size_of::() - 8usize]; + ["Alignment of sigval"][::std::mem::align_of::() - 8usize]; + ["Offset of field: sigval::sival_int"][::std::mem::offset_of!(sigval, sival_int) - 0usize]; + ["Offset of field: sigval::sival_ptr"][::std::mem::offset_of!(sigval, sival_ptr) - 0usize]; +}; pub type sigval_t = sigval; #[repr(C)] #[derive(Copy, Clone)] @@ -10871,42 +7968,17 @@ pub struct __sifields__bindgen_ty_1 { pub _pid: __kernel_pid_t, pub _uid: __kernel_uid32_t, } -#[test] -fn bindgen_test_layout___sifields__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit<__sifields__bindgen_ty_1> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__sifields__bindgen_ty_1>(), - 8usize, - concat!("Size of: ", stringify!(__sifields__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::<__sifields__bindgen_ty_1>(), - 4usize, - concat!("Alignment of ", stringify!(__sifields__bindgen_ty_1)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._pid) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_1), - "::", - stringify!(_pid) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._uid) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_1), - "::", - stringify!(_uid) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __sifields__bindgen_ty_1"] + [::std::mem::size_of::<__sifields__bindgen_ty_1>() - 8usize]; + ["Alignment of __sifields__bindgen_ty_1"] + [::std::mem::align_of::<__sifields__bindgen_ty_1>() - 4usize]; + ["Offset of field: __sifields__bindgen_ty_1::_pid"] + [::std::mem::offset_of!(__sifields__bindgen_ty_1, _pid) - 0usize]; + ["Offset of field: __sifields__bindgen_ty_1::_uid"] + [::std::mem::offset_of!(__sifields__bindgen_ty_1, _uid) - 4usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub struct __sifields__bindgen_ty_2 { @@ -10915,62 +7987,21 @@ pub struct __sifields__bindgen_ty_2 { pub _sigval: sigval_t, pub _sys_private: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout___sifields__bindgen_ty_2() { - const UNINIT: ::std::mem::MaybeUninit<__sifields__bindgen_ty_2> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__sifields__bindgen_ty_2>(), - 24usize, - concat!("Size of: ", stringify!(__sifields__bindgen_ty_2)) - ); - assert_eq!( - ::std::mem::align_of::<__sifields__bindgen_ty_2>(), - 8usize, - concat!("Alignment of ", stringify!(__sifields__bindgen_ty_2)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._tid) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_2), - "::", - stringify!(_tid) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._overrun) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_2), - "::", - stringify!(_overrun) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._sigval) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_2), - "::", - stringify!(_sigval) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._sys_private) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_2), - "::", - stringify!(_sys_private) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __sifields__bindgen_ty_2"] + [::std::mem::size_of::<__sifields__bindgen_ty_2>() - 24usize]; + ["Alignment of __sifields__bindgen_ty_2"] + [::std::mem::align_of::<__sifields__bindgen_ty_2>() - 8usize]; + ["Offset of field: __sifields__bindgen_ty_2::_tid"] + [::std::mem::offset_of!(__sifields__bindgen_ty_2, _tid) - 0usize]; + ["Offset of field: __sifields__bindgen_ty_2::_overrun"] + [::std::mem::offset_of!(__sifields__bindgen_ty_2, _overrun) - 4usize]; + ["Offset of field: __sifields__bindgen_ty_2::_sigval"] + [::std::mem::offset_of!(__sifields__bindgen_ty_2, _sigval) - 8usize]; + ["Offset of field: __sifields__bindgen_ty_2::_sys_private"] + [::std::mem::offset_of!(__sifields__bindgen_ty_2, _sys_private) - 16usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub struct __sifields__bindgen_ty_3 { @@ -10978,52 +8009,19 @@ pub struct __sifields__bindgen_ty_3 { pub _uid: __kernel_uid32_t, pub _sigval: sigval_t, } -#[test] -fn bindgen_test_layout___sifields__bindgen_ty_3() { - const UNINIT: ::std::mem::MaybeUninit<__sifields__bindgen_ty_3> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__sifields__bindgen_ty_3>(), - 16usize, - concat!("Size of: ", stringify!(__sifields__bindgen_ty_3)) - ); - assert_eq!( - ::std::mem::align_of::<__sifields__bindgen_ty_3>(), - 8usize, - concat!("Alignment of ", stringify!(__sifields__bindgen_ty_3)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._pid) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_3), - "::", - stringify!(_pid) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._uid) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_3), - "::", - stringify!(_uid) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._sigval) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_3), - "::", - stringify!(_sigval) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __sifields__bindgen_ty_3"] + [::std::mem::size_of::<__sifields__bindgen_ty_3>() - 16usize]; + ["Alignment of __sifields__bindgen_ty_3"] + [::std::mem::align_of::<__sifields__bindgen_ty_3>() - 8usize]; + ["Offset of field: __sifields__bindgen_ty_3::_pid"] + [::std::mem::offset_of!(__sifields__bindgen_ty_3, _pid) - 0usize]; + ["Offset of field: __sifields__bindgen_ty_3::_uid"] + [::std::mem::offset_of!(__sifields__bindgen_ty_3, _uid) - 4usize]; + ["Offset of field: __sifields__bindgen_ty_3::_sigval"] + [::std::mem::offset_of!(__sifields__bindgen_ty_3, _sigval) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __sifields__bindgen_ty_4 { @@ -11033,72 +8031,23 @@ pub struct __sifields__bindgen_ty_4 { pub _utime: __kernel_clock_t, pub _stime: __kernel_clock_t, } -#[test] -fn bindgen_test_layout___sifields__bindgen_ty_4() { - const UNINIT: ::std::mem::MaybeUninit<__sifields__bindgen_ty_4> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__sifields__bindgen_ty_4>(), - 32usize, - concat!("Size of: ", stringify!(__sifields__bindgen_ty_4)) - ); - assert_eq!( - ::std::mem::align_of::<__sifields__bindgen_ty_4>(), - 8usize, - concat!("Alignment of ", stringify!(__sifields__bindgen_ty_4)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._pid) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_4), - "::", - stringify!(_pid) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._uid) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_4), - "::", - stringify!(_uid) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._status) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_4), - "::", - stringify!(_status) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._utime) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_4), - "::", - stringify!(_utime) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._stime) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_4), - "::", - stringify!(_stime) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __sifields__bindgen_ty_4"] + [::std::mem::size_of::<__sifields__bindgen_ty_4>() - 32usize]; + ["Alignment of __sifields__bindgen_ty_4"] + [::std::mem::align_of::<__sifields__bindgen_ty_4>() - 8usize]; + ["Offset of field: __sifields__bindgen_ty_4::_pid"] + [::std::mem::offset_of!(__sifields__bindgen_ty_4, _pid) - 0usize]; + ["Offset of field: __sifields__bindgen_ty_4::_uid"] + [::std::mem::offset_of!(__sifields__bindgen_ty_4, _uid) - 4usize]; + ["Offset of field: __sifields__bindgen_ty_4::_status"] + [::std::mem::offset_of!(__sifields__bindgen_ty_4, _status) - 8usize]; + ["Offset of field: __sifields__bindgen_ty_4::_utime"] + [::std::mem::offset_of!(__sifields__bindgen_ty_4, _utime) - 16usize]; + ["Offset of field: __sifields__bindgen_ty_4::_stime"] + [::std::mem::offset_of!(__sifields__bindgen_ty_4, _stime) - 24usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub struct __sifields__bindgen_ty_5 { @@ -11121,106 +8070,48 @@ pub struct __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1 { pub _lower: *mut ::std::os::raw::c_void, pub _upper: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout___sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1>(), - 24usize, - concat!( - "Size of: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1>(), - 8usize, - concat!( - "Alignment of ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._dummy_bnd) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(_dummy_bnd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._lower) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(_lower) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._upper) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(_upper) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::size_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1>() - 24usize]; + ["Alignment of __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::align_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1>() - 8usize]; + ["Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1::_dummy_bnd"][::std::mem::offset_of!( + __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1, + _dummy_bnd + ) + - 0usize]; + ["Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1::_lower"][::std::mem::offset_of!( + __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1, + _lower + ) - 8usize]; + ["Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1::_upper"][::std::mem::offset_of!( + __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1, + _upper + ) - 16usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2 { pub _dummy_pkey: [::std::os::raw::c_char; 8usize], pub _pkey: __u32, } -#[test] -fn bindgen_test_layout___sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2() { - const UNINIT: ::std::mem::MaybeUninit<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2>(), - 12usize, - concat!( - "Size of: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2) - ) - ); - assert_eq!( - ::std::mem::align_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2>(), - 4usize, - concat!( - "Alignment of ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._dummy_pkey) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(_dummy_pkey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._pkey) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(_pkey) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2"] + [::std::mem::size_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2>() - 12usize]; + ["Alignment of __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2"] + [::std::mem::align_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2>() - 4usize]; + ["Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2::_dummy_pkey"][::std::mem::offset_of!( + __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2, + _dummy_pkey + ) + - 0usize]; + ["Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2::_pkey"][::std::mem::offset_of!( + __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2, + _pkey + ) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3 { @@ -11228,198 +8119,68 @@ pub struct __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3 { pub _type: __u32, pub _flags: __u32, } -#[test] -fn bindgen_test_layout___sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3() { - const UNINIT: ::std::mem::MaybeUninit<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3>(), - 16usize, - concat!( - "Size of: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3) - ) - ); - assert_eq!( - ::std::mem::align_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3>(), - 8usize, - concat!( - "Alignment of ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._data) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(_data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._type) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(_type) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._flags) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(_flags) - ) - ); -} -#[test] -fn bindgen_test_layout___sifields__bindgen_ty_5__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit<__sifields__bindgen_ty_5__bindgen_ty_1> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__sifields__bindgen_ty_5__bindgen_ty_1>(), - 24usize, - concat!( - "Size of: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::<__sifields__bindgen_ty_5__bindgen_ty_1>(), - 8usize, - concat!( - "Alignment of ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._trapno) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1), - "::", - stringify!(_trapno) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._addr_lsb) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1), - "::", - stringify!(_addr_lsb) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._addr_bnd) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1), - "::", - stringify!(_addr_bnd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._addr_pkey) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1), - "::", - stringify!(_addr_pkey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._perf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1), - "::", - stringify!(_perf) - ) - ); -} -#[test] -fn bindgen_test_layout___sifields__bindgen_ty_5() { - const UNINIT: ::std::mem::MaybeUninit<__sifields__bindgen_ty_5> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__sifields__bindgen_ty_5>(), - 32usize, - concat!("Size of: ", stringify!(__sifields__bindgen_ty_5)) - ); - assert_eq!( - ::std::mem::align_of::<__sifields__bindgen_ty_5>(), - 8usize, - concat!("Alignment of ", stringify!(__sifields__bindgen_ty_5)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._addr) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5), - "::", - stringify!(_addr) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3"] + [::std::mem::size_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3>() - 16usize]; + ["Alignment of __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3"] + [::std::mem::align_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3>() - 8usize]; + ["Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3::_data"][::std::mem::offset_of!( + __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3, + _data + ) - 0usize]; + ["Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3::_type"][::std::mem::offset_of!( + __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3, + _type + ) - 8usize]; + ["Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3::_flags"][::std::mem::offset_of!( + __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3, + _flags + ) - 12usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __sifields__bindgen_ty_5__bindgen_ty_1"] + [::std::mem::size_of::<__sifields__bindgen_ty_5__bindgen_ty_1>() - 24usize]; + ["Alignment of __sifields__bindgen_ty_5__bindgen_ty_1"] + [::std::mem::align_of::<__sifields__bindgen_ty_5__bindgen_ty_1>() - 8usize]; + ["Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1::_trapno"] + [::std::mem::offset_of!(__sifields__bindgen_ty_5__bindgen_ty_1, _trapno) - 0usize]; + ["Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1::_addr_lsb"] + [::std::mem::offset_of!(__sifields__bindgen_ty_5__bindgen_ty_1, _addr_lsb) - 0usize]; + ["Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1::_addr_bnd"] + [::std::mem::offset_of!(__sifields__bindgen_ty_5__bindgen_ty_1, _addr_bnd) - 0usize]; + ["Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1::_addr_pkey"] + [::std::mem::offset_of!(__sifields__bindgen_ty_5__bindgen_ty_1, _addr_pkey) - 0usize]; + ["Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1::_perf"] + [::std::mem::offset_of!(__sifields__bindgen_ty_5__bindgen_ty_1, _perf) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __sifields__bindgen_ty_5"] + [::std::mem::size_of::<__sifields__bindgen_ty_5>() - 32usize]; + ["Alignment of __sifields__bindgen_ty_5"] + [::std::mem::align_of::<__sifields__bindgen_ty_5>() - 8usize]; + ["Offset of field: __sifields__bindgen_ty_5::_addr"] + [::std::mem::offset_of!(__sifields__bindgen_ty_5, _addr) - 0usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __sifields__bindgen_ty_6 { pub _band: ::std::os::raw::c_long, pub _fd: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout___sifields__bindgen_ty_6() { - const UNINIT: ::std::mem::MaybeUninit<__sifields__bindgen_ty_6> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__sifields__bindgen_ty_6>(), - 16usize, - concat!("Size of: ", stringify!(__sifields__bindgen_ty_6)) - ); - assert_eq!( - ::std::mem::align_of::<__sifields__bindgen_ty_6>(), - 8usize, - concat!("Alignment of ", stringify!(__sifields__bindgen_ty_6)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._band) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_6), - "::", - stringify!(_band) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._fd) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_6), - "::", - stringify!(_fd) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __sifields__bindgen_ty_6"] + [::std::mem::size_of::<__sifields__bindgen_ty_6>() - 16usize]; + ["Alignment of __sifields__bindgen_ty_6"] + [::std::mem::align_of::<__sifields__bindgen_ty_6>() - 8usize]; + ["Offset of field: __sifields__bindgen_ty_6::_band"] + [::std::mem::offset_of!(__sifields__bindgen_ty_6, _band) - 0usize]; + ["Offset of field: __sifields__bindgen_ty_6::_fd"] + [::std::mem::offset_of!(__sifields__bindgen_ty_6, _fd) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __sifields__bindgen_ty_7 { @@ -11427,137 +8188,34 @@ pub struct __sifields__bindgen_ty_7 { pub _syscall: ::std::os::raw::c_int, pub _arch: ::std::os::raw::c_uint, } -#[test] -fn bindgen_test_layout___sifields__bindgen_ty_7() { - const UNINIT: ::std::mem::MaybeUninit<__sifields__bindgen_ty_7> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__sifields__bindgen_ty_7>(), - 16usize, - concat!("Size of: ", stringify!(__sifields__bindgen_ty_7)) - ); - assert_eq!( - ::std::mem::align_of::<__sifields__bindgen_ty_7>(), - 8usize, - concat!("Alignment of ", stringify!(__sifields__bindgen_ty_7)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._call_addr) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_7), - "::", - stringify!(_call_addr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._syscall) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_7), - "::", - stringify!(_syscall) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._arch) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_7), - "::", - stringify!(_arch) - ) - ); -} -#[test] -fn bindgen_test_layout___sifields() { - const UNINIT: ::std::mem::MaybeUninit<__sifields> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__sifields>(), - 32usize, - concat!("Size of: ", stringify!(__sifields)) - ); - assert_eq!( - ::std::mem::align_of::<__sifields>(), - 8usize, - concat!("Alignment of ", stringify!(__sifields)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._kill) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields), - "::", - stringify!(_kill) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._timer) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields), - "::", - stringify!(_timer) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._rt) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields), - "::", - stringify!(_rt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._sigchld) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields), - "::", - stringify!(_sigchld) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._sigfault) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields), - "::", - stringify!(_sigfault) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._sigpoll) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields), - "::", - stringify!(_sigpoll) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._sigsys) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields), - "::", - stringify!(_sigsys) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __sifields__bindgen_ty_7"] + [::std::mem::size_of::<__sifields__bindgen_ty_7>() - 16usize]; + ["Alignment of __sifields__bindgen_ty_7"] + [::std::mem::align_of::<__sifields__bindgen_ty_7>() - 8usize]; + ["Offset of field: __sifields__bindgen_ty_7::_call_addr"] + [::std::mem::offset_of!(__sifields__bindgen_ty_7, _call_addr) - 0usize]; + ["Offset of field: __sifields__bindgen_ty_7::_syscall"] + [::std::mem::offset_of!(__sifields__bindgen_ty_7, _syscall) - 8usize]; + ["Offset of field: __sifields__bindgen_ty_7::_arch"] + [::std::mem::offset_of!(__sifields__bindgen_ty_7, _arch) - 12usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __sifields"][::std::mem::size_of::<__sifields>() - 32usize]; + ["Alignment of __sifields"][::std::mem::align_of::<__sifields>() - 8usize]; + ["Offset of field: __sifields::_kill"][::std::mem::offset_of!(__sifields, _kill) - 0usize]; + ["Offset of field: __sifields::_timer"][::std::mem::offset_of!(__sifields, _timer) - 0usize]; + ["Offset of field: __sifields::_rt"][::std::mem::offset_of!(__sifields, _rt) - 0usize]; + ["Offset of field: __sifields::_sigchld"] + [::std::mem::offset_of!(__sifields, _sigchld) - 0usize]; + ["Offset of field: __sifields::_sigfault"] + [::std::mem::offset_of!(__sifields, _sigfault) - 0usize]; + ["Offset of field: __sifields::_sigpoll"] + [::std::mem::offset_of!(__sifields, _sigpoll) - 0usize]; + ["Offset of field: __sifields::_sigsys"][::std::mem::offset_of!(__sifields, _sigsys) - 0usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub struct siginfo { @@ -11577,104 +8235,34 @@ pub struct siginfo__bindgen_ty_1__bindgen_ty_1 { pub si_code: ::std::os::raw::c_int, pub _sifields: __sifields, } -#[test] -fn bindgen_test_layout_siginfo__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(siginfo__bindgen_ty_1__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(siginfo__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).si_signo) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(siginfo__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(si_signo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).si_errno) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(siginfo__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(si_errno) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).si_code) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(siginfo__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(si_code) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._sifields) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(siginfo__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(_sifields) - ) - ); -} -#[test] -fn bindgen_test_layout_siginfo__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 128usize, - concat!("Size of: ", stringify!(siginfo__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(siginfo__bindgen_ty_1)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._si_pad) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(siginfo__bindgen_ty_1), - "::", - stringify!(_si_pad) - ) - ); -} -#[test] -fn bindgen_test_layout_siginfo() { - assert_eq!( - ::std::mem::size_of::(), - 128usize, - concat!("Size of: ", stringify!(siginfo)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(siginfo)) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of siginfo__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::size_of::() - 48usize]; + ["Alignment of siginfo__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: siginfo__bindgen_ty_1__bindgen_ty_1::si_signo"] + [::std::mem::offset_of!(siginfo__bindgen_ty_1__bindgen_ty_1, si_signo) - 0usize]; + ["Offset of field: siginfo__bindgen_ty_1__bindgen_ty_1::si_errno"] + [::std::mem::offset_of!(siginfo__bindgen_ty_1__bindgen_ty_1, si_errno) - 4usize]; + ["Offset of field: siginfo__bindgen_ty_1__bindgen_ty_1::si_code"] + [::std::mem::offset_of!(siginfo__bindgen_ty_1__bindgen_ty_1, si_code) - 8usize]; + ["Offset of field: siginfo__bindgen_ty_1__bindgen_ty_1::_sifields"] + [::std::mem::offset_of!(siginfo__bindgen_ty_1__bindgen_ty_1, _sifields) - 16usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of siginfo__bindgen_ty_1"][::std::mem::size_of::() - 128usize]; + ["Alignment of siginfo__bindgen_ty_1"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: siginfo__bindgen_ty_1::_si_pad"] + [::std::mem::offset_of!(siginfo__bindgen_ty_1, _si_pad) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of siginfo"][::std::mem::size_of::() - 128usize]; + ["Alignment of siginfo"][::std::mem::align_of::() - 8usize]; +}; pub type siginfo_t = siginfo; #[repr(C)] #[derive(Copy, Clone)] @@ -11697,149 +8285,41 @@ pub struct sigevent__bindgen_ty_1__bindgen_ty_1 { pub _function: ::std::option::Option, pub _attribute: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout_sigevent__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!( - "Size of: ", - stringify!(sigevent__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(sigevent__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._function) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigevent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(_function) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._attribute) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(sigevent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(_attribute) - ) - ); -} -#[test] -fn bindgen_test_layout_sigevent__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(sigevent__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(sigevent__bindgen_ty_1)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._pad) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigevent__bindgen_ty_1), - "::", - stringify!(_pad) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._tid) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigevent__bindgen_ty_1), - "::", - stringify!(_tid) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._sigev_thread) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigevent__bindgen_ty_1), - "::", - stringify!(_sigev_thread) - ) - ); -} -#[test] -fn bindgen_test_layout_sigevent() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(sigevent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(sigevent)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sigev_value) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigevent), - "::", - stringify!(sigev_value) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sigev_signo) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(sigevent), - "::", - stringify!(sigev_signo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sigev_notify) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(sigevent), - "::", - stringify!(sigev_notify) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._sigev_un) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(sigevent), - "::", - stringify!(_sigev_un) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sigevent__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::size_of::() - 16usize]; + ["Alignment of sigevent__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: sigevent__bindgen_ty_1__bindgen_ty_1::_function"] + [::std::mem::offset_of!(sigevent__bindgen_ty_1__bindgen_ty_1, _function) - 0usize]; + ["Offset of field: sigevent__bindgen_ty_1__bindgen_ty_1::_attribute"] + [::std::mem::offset_of!(sigevent__bindgen_ty_1__bindgen_ty_1, _attribute) - 8usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sigevent__bindgen_ty_1"][::std::mem::size_of::() - 48usize]; + ["Alignment of sigevent__bindgen_ty_1"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: sigevent__bindgen_ty_1::_pad"] + [::std::mem::offset_of!(sigevent__bindgen_ty_1, _pad) - 0usize]; + ["Offset of field: sigevent__bindgen_ty_1::_tid"] + [::std::mem::offset_of!(sigevent__bindgen_ty_1, _tid) - 0usize]; + ["Offset of field: sigevent__bindgen_ty_1::_sigev_thread"] + [::std::mem::offset_of!(sigevent__bindgen_ty_1, _sigev_thread) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sigevent"][::std::mem::size_of::() - 64usize]; + ["Alignment of sigevent"][::std::mem::align_of::() - 8usize]; + ["Offset of field: sigevent::sigev_value"] + [::std::mem::offset_of!(sigevent, sigev_value) - 0usize]; + ["Offset of field: sigevent::sigev_signo"] + [::std::mem::offset_of!(sigevent, sigev_signo) - 8usize]; + ["Offset of field: sigevent::sigev_notify"] + [::std::mem::offset_of!(sigevent, sigev_notify) - 12usize]; + ["Offset of field: sigevent::_sigev_un"][::std::mem::offset_of!(sigevent, _sigev_un) - 16usize]; +}; pub type sigevent_t = sigevent; pub type sig_atomic_t = ::std::os::raw::c_int; pub type sig_t = __sighandler_t; @@ -11865,87 +8345,25 @@ pub union sigaction__bindgen_ty_1 { ), >, } -#[test] -fn bindgen_test_layout_sigaction__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(sigaction__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(sigaction__bindgen_ty_1)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sa_handler) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigaction__bindgen_ty_1), - "::", - stringify!(sa_handler) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sa_sigaction) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigaction__bindgen_ty_1), - "::", - stringify!(sa_sigaction) - ) - ); -} -#[test] -fn bindgen_test_layout_sigaction() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(sigaction)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(sigaction)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sa_flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigaction), - "::", - stringify!(sa_flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sa_mask) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(sigaction), - "::", - stringify!(sa_mask) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sa_restorer) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(sigaction), - "::", - stringify!(sa_restorer) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sigaction__bindgen_ty_1"][::std::mem::size_of::() - 8usize]; + ["Alignment of sigaction__bindgen_ty_1"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: sigaction__bindgen_ty_1::sa_handler"] + [::std::mem::offset_of!(sigaction__bindgen_ty_1, sa_handler) - 0usize]; + ["Offset of field: sigaction__bindgen_ty_1::sa_sigaction"] + [::std::mem::offset_of!(sigaction__bindgen_ty_1, sa_sigaction) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sigaction"][::std::mem::size_of::() - 32usize]; + ["Alignment of sigaction"][::std::mem::align_of::() - 8usize]; + ["Offset of field: sigaction::sa_flags"][::std::mem::offset_of!(sigaction, sa_flags) - 0usize]; + ["Offset of field: sigaction::sa_mask"][::std::mem::offset_of!(sigaction, sa_mask) - 16usize]; + ["Offset of field: sigaction::sa_restorer"] + [::std::mem::offset_of!(sigaction, sa_restorer) - 24usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub struct sigaction64 { @@ -11966,87 +8384,28 @@ pub union sigaction64__bindgen_ty_1 { ), >, } -#[test] -fn bindgen_test_layout_sigaction64__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(sigaction64__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(sigaction64__bindgen_ty_1)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sa_handler) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigaction64__bindgen_ty_1), - "::", - stringify!(sa_handler) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sa_sigaction) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigaction64__bindgen_ty_1), - "::", - stringify!(sa_sigaction) - ) - ); -} -#[test] -fn bindgen_test_layout_sigaction64() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(sigaction64)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(sigaction64)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sa_flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigaction64), - "::", - stringify!(sa_flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sa_mask) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(sigaction64), - "::", - stringify!(sa_mask) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sa_restorer) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(sigaction64), - "::", - stringify!(sa_restorer) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sigaction64__bindgen_ty_1"] + [::std::mem::size_of::() - 8usize]; + ["Alignment of sigaction64__bindgen_ty_1"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: sigaction64__bindgen_ty_1::sa_handler"] + [::std::mem::offset_of!(sigaction64__bindgen_ty_1, sa_handler) - 0usize]; + ["Offset of field: sigaction64__bindgen_ty_1::sa_sigaction"] + [::std::mem::offset_of!(sigaction64__bindgen_ty_1, sa_sigaction) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sigaction64"][::std::mem::size_of::() - 32usize]; + ["Alignment of sigaction64"][::std::mem::align_of::() - 8usize]; + ["Offset of field: sigaction64::sa_flags"] + [::std::mem::offset_of!(sigaction64, sa_flags) - 0usize]; + ["Offset of field: sigaction64::sa_mask"] + [::std::mem::offset_of!(sigaction64, sa_mask) - 16usize]; + ["Offset of field: sigaction64::sa_restorer"] + [::std::mem::offset_of!(sigaction64, sa_restorer) - 24usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct user_regs_struct { @@ -12055,61 +8414,19 @@ pub struct user_regs_struct { pub pc: u64, pub pstate: u64, } -#[test] -fn bindgen_test_layout_user_regs_struct() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 272usize, - concat!("Size of: ", stringify!(user_regs_struct)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(user_regs_struct)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).regs) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(regs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sp) as usize - ptr as usize }, - 248usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(sp) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pc) as usize - ptr as usize }, - 256usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(pc) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pstate) as usize - ptr as usize }, - 264usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(pstate) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of user_regs_struct"][::std::mem::size_of::() - 272usize]; + ["Alignment of user_regs_struct"][::std::mem::align_of::() - 8usize]; + ["Offset of field: user_regs_struct::regs"] + [::std::mem::offset_of!(user_regs_struct, regs) - 0usize]; + ["Offset of field: user_regs_struct::sp"] + [::std::mem::offset_of!(user_regs_struct, sp) - 248usize]; + ["Offset of field: user_regs_struct::pc"] + [::std::mem::offset_of!(user_regs_struct, pc) - 256usize]; + ["Offset of field: user_regs_struct::pstate"] + [::std::mem::offset_of!(user_regs_struct, pstate) - 264usize]; +}; #[repr(C)] #[repr(align(16))] #[derive(Debug, Copy, Clone)] @@ -12118,51 +8435,17 @@ pub struct user_fpsimd_struct { pub fpsr: u32, pub fpcr: u32, } -#[test] -fn bindgen_test_layout_user_fpsimd_struct() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 528usize, - concat!("Size of: ", stringify!(user_fpsimd_struct)) - ); - assert_eq!( - ::std::mem::align_of::(), - 16usize, - concat!("Alignment of ", stringify!(user_fpsimd_struct)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).vregs) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(user_fpsimd_struct), - "::", - stringify!(vregs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fpsr) as usize - ptr as usize }, - 512usize, - concat!( - "Offset of field: ", - stringify!(user_fpsimd_struct), - "::", - stringify!(fpsr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fpcr) as usize - ptr as usize }, - 516usize, - concat!( - "Offset of field: ", - stringify!(user_fpsimd_struct), - "::", - stringify!(fpcr) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of user_fpsimd_struct"][::std::mem::size_of::() - 528usize]; + ["Alignment of user_fpsimd_struct"][::std::mem::align_of::() - 16usize]; + ["Offset of field: user_fpsimd_struct::vregs"] + [::std::mem::offset_of!(user_fpsimd_struct, vregs) - 0usize]; + ["Offset of field: user_fpsimd_struct::fpsr"] + [::std::mem::offset_of!(user_fpsimd_struct, fpsr) - 512usize]; + ["Offset of field: user_fpsimd_struct::fpcr"] + [::std::mem::offset_of!(user_fpsimd_struct, fpcr) - 516usize]; +}; pub type greg_t = ::std::os::raw::c_ulong; pub type gregset_t = [greg_t; 34usize]; pub type fpregset_t = user_fpsimd_struct; @@ -12185,107 +8468,27 @@ pub union ucontext__bindgen_ty_1 { pub uc_sigmask: sigset_t, pub uc_sigmask64: sigset64_t, } -#[test] -fn bindgen_test_layout_ucontext__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(ucontext__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(ucontext__bindgen_ty_1)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uc_sigmask) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ucontext__bindgen_ty_1), - "::", - stringify!(uc_sigmask) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uc_sigmask64) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ucontext__bindgen_ty_1), - "::", - stringify!(uc_sigmask64) - ) - ); -} -#[test] -fn bindgen_test_layout_ucontext() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 4560usize, - concat!("Size of: ", stringify!(ucontext)) - ); - assert_eq!( - ::std::mem::align_of::(), - 16usize, - concat!("Alignment of ", stringify!(ucontext)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uc_flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ucontext), - "::", - stringify!(uc_flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uc_link) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ucontext), - "::", - stringify!(uc_link) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uc_stack) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(ucontext), - "::", - stringify!(uc_stack) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__padding) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(ucontext), - "::", - stringify!(__padding) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uc_mcontext) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(ucontext), - "::", - stringify!(uc_mcontext) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ucontext__bindgen_ty_1"][::std::mem::size_of::() - 8usize]; + ["Alignment of ucontext__bindgen_ty_1"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: ucontext__bindgen_ty_1::uc_sigmask"] + [::std::mem::offset_of!(ucontext__bindgen_ty_1, uc_sigmask) - 0usize]; + ["Offset of field: ucontext__bindgen_ty_1::uc_sigmask64"] + [::std::mem::offset_of!(ucontext__bindgen_ty_1, uc_sigmask64) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ucontext"][::std::mem::size_of::() - 4560usize]; + ["Alignment of ucontext"][::std::mem::align_of::() - 16usize]; + ["Offset of field: ucontext::uc_flags"][::std::mem::offset_of!(ucontext, uc_flags) - 0usize]; + ["Offset of field: ucontext::uc_link"][::std::mem::offset_of!(ucontext, uc_link) - 8usize]; + ["Offset of field: ucontext::uc_stack"][::std::mem::offset_of!(ucontext, uc_stack) - 16usize]; + ["Offset of field: ucontext::__padding"][::std::mem::offset_of!(ucontext, __padding) - 48usize]; + ["Offset of field: ucontext::uc_mcontext"] + [::std::mem::offset_of!(ucontext, uc_mcontext) - 176usize]; +}; pub type ucontext_t = ucontext; extern "C" { pub fn __libc_current_sigrtmin() -> ::std::os::raw::c_int; @@ -12508,31 +8711,12 @@ pub type fd_mask = ::std::os::raw::c_ulong; pub struct fd_set { pub fds_bits: [fd_mask; 16usize], } -#[test] -fn bindgen_test_layout_fd_set() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 128usize, - concat!("Size of: ", stringify!(fd_set)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(fd_set)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fds_bits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(fd_set), - "::", - stringify!(fds_bits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of fd_set"][::std::mem::size_of::() - 128usize]; + ["Alignment of fd_set"][::std::mem::align_of::() - 8usize]; + ["Offset of field: fd_set::fds_bits"][::std::mem::offset_of!(fd_set, fds_bits) - 0usize]; +}; extern "C" { pub fn __FD_CLR_chk(arg1: ::std::os::raw::c_int, arg2: *mut fd_set, arg3: usize); } @@ -13856,58 +10040,19 @@ pub struct ASensorVector__bindgen_ty_1__bindgen_ty_1 { pub y: f32, pub z: f32, } -#[test] -fn bindgen_test_layout_ASensorVector__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!( - "Size of: ", - stringify!(ASensorVector__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ASensorVector__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorVector__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(x) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ASensorVector__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(y) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).z) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ASensorVector__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(z) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASensorVector__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of ASensorVector__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ASensorVector__bindgen_ty_1__bindgen_ty_1::x"] + [::std::mem::offset_of!(ASensorVector__bindgen_ty_1__bindgen_ty_1, x) - 0usize]; + ["Offset of field: ASensorVector__bindgen_ty_1__bindgen_ty_1::y"] + [::std::mem::offset_of!(ASensorVector__bindgen_ty_1__bindgen_ty_1, y) - 4usize]; + ["Offset of field: ASensorVector__bindgen_ty_1__bindgen_ty_1::z"] + [::std::mem::offset_of!(ASensorVector__bindgen_ty_1__bindgen_ty_1, z) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ASensorVector__bindgen_ty_1__bindgen_ty_2 { @@ -13915,160 +10060,52 @@ pub struct ASensorVector__bindgen_ty_1__bindgen_ty_2 { pub pitch: f32, pub roll: f32, } -#[test] -fn bindgen_test_layout_ASensorVector__bindgen_ty_1__bindgen_ty_2() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!( - "Size of: ", - stringify!(ASensorVector__bindgen_ty_1__bindgen_ty_2) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ASensorVector__bindgen_ty_1__bindgen_ty_2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).azimuth) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorVector__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(azimuth) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pitch) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ASensorVector__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(pitch) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).roll) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ASensorVector__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(roll) - ) - ); -} -#[test] -fn bindgen_test_layout_ASensorVector__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(ASensorVector__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(ASensorVector__bindgen_ty_1)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).v) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorVector__bindgen_ty_1), - "::", - stringify!(v) - ) - ); -} -#[test] -fn bindgen_test_layout_ASensorVector() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(ASensorVector)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(ASensorVector)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).status) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(ASensorVector), - "::", - stringify!(status) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, - 13usize, - concat!( - "Offset of field: ", - stringify!(ASensorVector), - "::", - stringify!(reserved) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASensorVector__bindgen_ty_1__bindgen_ty_2"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of ASensorVector__bindgen_ty_1__bindgen_ty_2"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ASensorVector__bindgen_ty_1__bindgen_ty_2::azimuth"] + [::std::mem::offset_of!(ASensorVector__bindgen_ty_1__bindgen_ty_2, azimuth) - 0usize]; + ["Offset of field: ASensorVector__bindgen_ty_1__bindgen_ty_2::pitch"] + [::std::mem::offset_of!(ASensorVector__bindgen_ty_1__bindgen_ty_2, pitch) - 4usize]; + ["Offset of field: ASensorVector__bindgen_ty_1__bindgen_ty_2::roll"] + [::std::mem::offset_of!(ASensorVector__bindgen_ty_1__bindgen_ty_2, roll) - 8usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASensorVector__bindgen_ty_1"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of ASensorVector__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ASensorVector__bindgen_ty_1::v"] + [::std::mem::offset_of!(ASensorVector__bindgen_ty_1, v) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASensorVector"][::std::mem::size_of::() - 16usize]; + ["Alignment of ASensorVector"][::std::mem::align_of::() - 4usize]; + ["Offset of field: ASensorVector::status"] + [::std::mem::offset_of!(ASensorVector, status) - 12usize]; + ["Offset of field: ASensorVector::reserved"] + [::std::mem::offset_of!(ASensorVector, reserved) - 13usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct AMetaDataEvent { pub what: i32, pub sensor: i32, } -#[test] -fn bindgen_test_layout_AMetaDataEvent() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(AMetaDataEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AMetaDataEvent)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).what) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AMetaDataEvent), - "::", - stringify!(what) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sensor) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AMetaDataEvent), - "::", - stringify!(sensor) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AMetaDataEvent"][::std::mem::size_of::() - 8usize]; + ["Alignment of AMetaDataEvent"][::std::mem::align_of::() - 4usize]; + ["Offset of field: AMetaDataEvent::what"] + [::std::mem::offset_of!(AMetaDataEvent, what) - 0usize]; + ["Offset of field: AMetaDataEvent::sensor"] + [::std::mem::offset_of!(AMetaDataEvent, sensor) - 4usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub struct AUncalibratedEvent { @@ -14088,87 +10125,34 @@ pub struct AUncalibratedEvent__bindgen_ty_1__bindgen_ty_1 { pub y_uncalib: f32, pub z_uncalib: f32, } -#[test] -fn bindgen_test_layout_AUncalibratedEvent__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!( - "Size of: ", - stringify!(AUncalibratedEvent__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(AUncalibratedEvent__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).x_uncalib) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AUncalibratedEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(x_uncalib) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).y_uncalib) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AUncalibratedEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(y_uncalib) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).z_uncalib) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AUncalibratedEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(z_uncalib) - ) - ); -} -#[test] -fn bindgen_test_layout_AUncalibratedEvent__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(AUncalibratedEvent__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(AUncalibratedEvent__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uncalib) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AUncalibratedEvent__bindgen_ty_1), - "::", - stringify!(uncalib) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AUncalibratedEvent__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of AUncalibratedEvent__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: AUncalibratedEvent__bindgen_ty_1__bindgen_ty_1::x_uncalib"][::std::mem::offset_of!( + AUncalibratedEvent__bindgen_ty_1__bindgen_ty_1, + x_uncalib + ) - 0usize]; + ["Offset of field: AUncalibratedEvent__bindgen_ty_1__bindgen_ty_1::y_uncalib"][::std::mem::offset_of!( + AUncalibratedEvent__bindgen_ty_1__bindgen_ty_1, + y_uncalib + ) - 4usize]; + ["Offset of field: AUncalibratedEvent__bindgen_ty_1__bindgen_ty_1::z_uncalib"][::std::mem::offset_of!( + AUncalibratedEvent__bindgen_ty_1__bindgen_ty_1, + z_uncalib + ) - 8usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AUncalibratedEvent__bindgen_ty_1"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of AUncalibratedEvent__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: AUncalibratedEvent__bindgen_ty_1::uncalib"] + [::std::mem::offset_of!(AUncalibratedEvent__bindgen_ty_1, uncalib) - 0usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub union AUncalibratedEvent__bindgen_ty_2 { @@ -14182,182 +10166,63 @@ pub struct AUncalibratedEvent__bindgen_ty_2__bindgen_ty_1 { pub y_bias: f32, pub z_bias: f32, } -#[test] -fn bindgen_test_layout_AUncalibratedEvent__bindgen_ty_2__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!( - "Size of: ", - stringify!(AUncalibratedEvent__bindgen_ty_2__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(AUncalibratedEvent__bindgen_ty_2__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).x_bias) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AUncalibratedEvent__bindgen_ty_2__bindgen_ty_1), - "::", - stringify!(x_bias) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).y_bias) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AUncalibratedEvent__bindgen_ty_2__bindgen_ty_1), - "::", - stringify!(y_bias) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).z_bias) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AUncalibratedEvent__bindgen_ty_2__bindgen_ty_1), - "::", - stringify!(z_bias) - ) - ); -} -#[test] -fn bindgen_test_layout_AUncalibratedEvent__bindgen_ty_2() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(AUncalibratedEvent__bindgen_ty_2)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(AUncalibratedEvent__bindgen_ty_2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bias) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AUncalibratedEvent__bindgen_ty_2), - "::", - stringify!(bias) - ) - ); -} -#[test] -fn bindgen_test_layout_AUncalibratedEvent() { - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(AUncalibratedEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AUncalibratedEvent)) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AUncalibratedEvent__bindgen_ty_2__bindgen_ty_1"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of AUncalibratedEvent__bindgen_ty_2__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: AUncalibratedEvent__bindgen_ty_2__bindgen_ty_1::x_bias"] + [::std::mem::offset_of!(AUncalibratedEvent__bindgen_ty_2__bindgen_ty_1, x_bias) - 0usize]; + ["Offset of field: AUncalibratedEvent__bindgen_ty_2__bindgen_ty_1::y_bias"] + [::std::mem::offset_of!(AUncalibratedEvent__bindgen_ty_2__bindgen_ty_1, y_bias) - 4usize]; + ["Offset of field: AUncalibratedEvent__bindgen_ty_2__bindgen_ty_1::z_bias"] + [::std::mem::offset_of!(AUncalibratedEvent__bindgen_ty_2__bindgen_ty_1, z_bias) - 8usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AUncalibratedEvent__bindgen_ty_2"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of AUncalibratedEvent__bindgen_ty_2"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: AUncalibratedEvent__bindgen_ty_2::bias"] + [::std::mem::offset_of!(AUncalibratedEvent__bindgen_ty_2, bias) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AUncalibratedEvent"][::std::mem::size_of::() - 24usize]; + ["Alignment of AUncalibratedEvent"][::std::mem::align_of::() - 4usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct AHeartRateEvent { pub bpm: f32, pub status: i8, } -#[test] -fn bindgen_test_layout_AHeartRateEvent() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(AHeartRateEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AHeartRateEvent)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bpm) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AHeartRateEvent), - "::", - stringify!(bpm) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).status) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AHeartRateEvent), - "::", - stringify!(status) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AHeartRateEvent"][::std::mem::size_of::() - 8usize]; + ["Alignment of AHeartRateEvent"][::std::mem::align_of::() - 4usize]; + ["Offset of field: AHeartRateEvent::bpm"] + [::std::mem::offset_of!(AHeartRateEvent, bpm) - 0usize]; + ["Offset of field: AHeartRateEvent::status"] + [::std::mem::offset_of!(AHeartRateEvent, status) - 4usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ADynamicSensorEvent { pub connected: i32, pub handle: i32, } -#[test] -fn bindgen_test_layout_ADynamicSensorEvent() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(ADynamicSensorEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(ADynamicSensorEvent)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).connected) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ADynamicSensorEvent), - "::", - stringify!(connected) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).handle) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ADynamicSensorEvent), - "::", - stringify!(handle) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ADynamicSensorEvent"][::std::mem::size_of::() - 8usize]; + ["Alignment of ADynamicSensorEvent"][::std::mem::align_of::() - 4usize]; + ["Offset of field: ADynamicSensorEvent::connected"] + [::std::mem::offset_of!(ADynamicSensorEvent, connected) - 0usize]; + ["Offset of field: ADynamicSensorEvent::handle"] + [::std::mem::offset_of!(ADynamicSensorEvent, handle) - 4usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub struct AAdditionalInfoEvent { @@ -14371,80 +10236,26 @@ pub union AAdditionalInfoEvent__bindgen_ty_1 { pub data_int32: [i32; 14usize], pub data_float: [f32; 14usize], } -#[test] -fn bindgen_test_layout_AAdditionalInfoEvent__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(AAdditionalInfoEvent__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(AAdditionalInfoEvent__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data_int32) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AAdditionalInfoEvent__bindgen_ty_1), - "::", - stringify!(data_int32) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data_float) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AAdditionalInfoEvent__bindgen_ty_1), - "::", - stringify!(data_float) - ) - ); -} -#[test] -fn bindgen_test_layout_AAdditionalInfoEvent() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(AAdditionalInfoEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AAdditionalInfoEvent)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AAdditionalInfoEvent), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).serial) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AAdditionalInfoEvent), - "::", - stringify!(serial) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AAdditionalInfoEvent__bindgen_ty_1"] + [::std::mem::size_of::() - 56usize]; + ["Alignment of AAdditionalInfoEvent__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: AAdditionalInfoEvent__bindgen_ty_1::data_int32"] + [::std::mem::offset_of!(AAdditionalInfoEvent__bindgen_ty_1, data_int32) - 0usize]; + ["Offset of field: AAdditionalInfoEvent__bindgen_ty_1::data_float"] + [::std::mem::offset_of!(AAdditionalInfoEvent__bindgen_ty_1, data_float) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AAdditionalInfoEvent"][::std::mem::size_of::() - 64usize]; + ["Alignment of AAdditionalInfoEvent"][::std::mem::align_of::() - 4usize]; + ["Offset of field: AAdditionalInfoEvent::type_"] + [::std::mem::offset_of!(AAdditionalInfoEvent, type_) - 0usize]; + ["Offset of field: AAdditionalInfoEvent::serial"] + [::std::mem::offset_of!(AAdditionalInfoEvent, serial) - 4usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct AHeadTrackerEvent { @@ -14456,91 +10267,25 @@ pub struct AHeadTrackerEvent { pub vz: f32, pub discontinuity_count: i32, } -#[test] -fn bindgen_test_layout_AHeadTrackerEvent() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 28usize, - concat!("Size of: ", stringify!(AHeadTrackerEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AHeadTrackerEvent)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rx) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AHeadTrackerEvent), - "::", - stringify!(rx) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ry) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AHeadTrackerEvent), - "::", - stringify!(ry) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rz) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AHeadTrackerEvent), - "::", - stringify!(rz) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).vx) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(AHeadTrackerEvent), - "::", - stringify!(vx) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).vy) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AHeadTrackerEvent), - "::", - stringify!(vy) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).vz) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(AHeadTrackerEvent), - "::", - stringify!(vz) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).discontinuity_count) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(AHeadTrackerEvent), - "::", - stringify!(discontinuity_count) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AHeadTrackerEvent"][::std::mem::size_of::() - 28usize]; + ["Alignment of AHeadTrackerEvent"][::std::mem::align_of::() - 4usize]; + ["Offset of field: AHeadTrackerEvent::rx"] + [::std::mem::offset_of!(AHeadTrackerEvent, rx) - 0usize]; + ["Offset of field: AHeadTrackerEvent::ry"] + [::std::mem::offset_of!(AHeadTrackerEvent, ry) - 4usize]; + ["Offset of field: AHeadTrackerEvent::rz"] + [::std::mem::offset_of!(AHeadTrackerEvent, rz) - 8usize]; + ["Offset of field: AHeadTrackerEvent::vx"] + [::std::mem::offset_of!(AHeadTrackerEvent, vx) - 12usize]; + ["Offset of field: AHeadTrackerEvent::vy"] + [::std::mem::offset_of!(AHeadTrackerEvent, vy) - 16usize]; + ["Offset of field: AHeadTrackerEvent::vz"] + [::std::mem::offset_of!(AHeadTrackerEvent, vz) - 20usize]; + ["Offset of field: AHeadTrackerEvent::discontinuity_count"] + [::std::mem::offset_of!(AHeadTrackerEvent, discontinuity_count) - 24usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub struct ALimitedAxesImuEvent { @@ -14560,87 +10305,28 @@ pub struct ALimitedAxesImuEvent__bindgen_ty_1__bindgen_ty_1 { pub y: f32, pub z: f32, } -#[test] -fn bindgen_test_layout_ALimitedAxesImuEvent__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!( - "Size of: ", - stringify!(ALimitedAxesImuEvent__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ALimitedAxesImuEvent__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(x) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(y) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).z) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(z) - ) - ); -} -#[test] -fn bindgen_test_layout_ALimitedAxesImuEvent__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(ALimitedAxesImuEvent__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ALimitedAxesImuEvent__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).calib) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuEvent__bindgen_ty_1), - "::", - stringify!(calib) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ALimitedAxesImuEvent__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of ALimitedAxesImuEvent__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ALimitedAxesImuEvent__bindgen_ty_1__bindgen_ty_1::x"] + [::std::mem::offset_of!(ALimitedAxesImuEvent__bindgen_ty_1__bindgen_ty_1, x) - 0usize]; + ["Offset of field: ALimitedAxesImuEvent__bindgen_ty_1__bindgen_ty_1::y"] + [::std::mem::offset_of!(ALimitedAxesImuEvent__bindgen_ty_1__bindgen_ty_1, y) - 4usize]; + ["Offset of field: ALimitedAxesImuEvent__bindgen_ty_1__bindgen_ty_1::z"] + [::std::mem::offset_of!(ALimitedAxesImuEvent__bindgen_ty_1__bindgen_ty_1, z) - 8usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ALimitedAxesImuEvent__bindgen_ty_1"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of ALimitedAxesImuEvent__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ALimitedAxesImuEvent__bindgen_ty_1::calib"] + [::std::mem::offset_of!(ALimitedAxesImuEvent__bindgen_ty_1, calib) - 0usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub union ALimitedAxesImuEvent__bindgen_ty_2 { @@ -14654,100 +10340,39 @@ pub struct ALimitedAxesImuEvent__bindgen_ty_2__bindgen_ty_1 { pub y_supported: f32, pub z_supported: f32, } -#[test] -fn bindgen_test_layout_ALimitedAxesImuEvent__bindgen_ty_2__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!( - "Size of: ", - stringify!(ALimitedAxesImuEvent__bindgen_ty_2__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ALimitedAxesImuEvent__bindgen_ty_2__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).x_supported) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuEvent__bindgen_ty_2__bindgen_ty_1), - "::", - stringify!(x_supported) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).y_supported) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuEvent__bindgen_ty_2__bindgen_ty_1), - "::", - stringify!(y_supported) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).z_supported) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuEvent__bindgen_ty_2__bindgen_ty_1), - "::", - stringify!(z_supported) - ) - ); -} -#[test] -fn bindgen_test_layout_ALimitedAxesImuEvent__bindgen_ty_2() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(ALimitedAxesImuEvent__bindgen_ty_2)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ALimitedAxesImuEvent__bindgen_ty_2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).supported) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuEvent__bindgen_ty_2), - "::", - stringify!(supported) - ) - ); -} -#[test] -fn bindgen_test_layout_ALimitedAxesImuEvent() { - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(ALimitedAxesImuEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(ALimitedAxesImuEvent)) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ALimitedAxesImuEvent__bindgen_ty_2__bindgen_ty_1"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of ALimitedAxesImuEvent__bindgen_ty_2__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ALimitedAxesImuEvent__bindgen_ty_2__bindgen_ty_1::x_supported"][::std::mem::offset_of!( + ALimitedAxesImuEvent__bindgen_ty_2__bindgen_ty_1, + x_supported + ) - 0usize]; + ["Offset of field: ALimitedAxesImuEvent__bindgen_ty_2__bindgen_ty_1::y_supported"][::std::mem::offset_of!( + ALimitedAxesImuEvent__bindgen_ty_2__bindgen_ty_1, + y_supported + ) - 4usize]; + ["Offset of field: ALimitedAxesImuEvent__bindgen_ty_2__bindgen_ty_1::z_supported"][::std::mem::offset_of!( + ALimitedAxesImuEvent__bindgen_ty_2__bindgen_ty_1, + z_supported + ) - 8usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ALimitedAxesImuEvent__bindgen_ty_2"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of ALimitedAxesImuEvent__bindgen_ty_2"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ALimitedAxesImuEvent__bindgen_ty_2::supported"] + [::std::mem::offset_of!(ALimitedAxesImuEvent__bindgen_ty_2, supported) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ALimitedAxesImuEvent"][::std::mem::size_of::() - 24usize]; + ["Alignment of ALimitedAxesImuEvent"][::std::mem::align_of::() - 4usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub struct ALimitedAxesImuUncalibratedEvent { @@ -14768,91 +10393,39 @@ pub struct ALimitedAxesImuUncalibratedEvent__bindgen_ty_1__bindgen_ty_1 { pub y_uncalib: f32, pub z_uncalib: f32, } -#[test] -fn bindgen_test_layout_ALimitedAxesImuUncalibratedEvent__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit< +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ALimitedAxesImuUncalibratedEvent__bindgen_ty_1__bindgen_ty_1"][::std::mem::size_of::< ALimitedAxesImuUncalibratedEvent__bindgen_ty_1__bindgen_ty_1, - > = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!( - "Size of: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).x_uncalib) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(x_uncalib) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).y_uncalib) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(y_uncalib) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).z_uncalib) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(z_uncalib) - ) - ); -} -#[test] -fn bindgen_test_layout_ALimitedAxesImuUncalibratedEvent__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!( - "Size of: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uncalib) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_1), - "::", - stringify!(uncalib) - ) - ); -} + >() - 12usize]; + ["Alignment of ALimitedAxesImuUncalibratedEvent__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::align_of::() + - 4usize]; + ["Offset of field: ALimitedAxesImuUncalibratedEvent__bindgen_ty_1__bindgen_ty_1::x_uncalib"][::std::mem::offset_of!( + ALimitedAxesImuUncalibratedEvent__bindgen_ty_1__bindgen_ty_1, + x_uncalib + ) + - 0usize]; + ["Offset of field: ALimitedAxesImuUncalibratedEvent__bindgen_ty_1__bindgen_ty_1::y_uncalib"][::std::mem::offset_of!( + ALimitedAxesImuUncalibratedEvent__bindgen_ty_1__bindgen_ty_1, + y_uncalib + ) + - 4usize]; + ["Offset of field: ALimitedAxesImuUncalibratedEvent__bindgen_ty_1__bindgen_ty_1::z_uncalib"][::std::mem::offset_of!( + ALimitedAxesImuUncalibratedEvent__bindgen_ty_1__bindgen_ty_1, + z_uncalib + ) + - 8usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ALimitedAxesImuUncalibratedEvent__bindgen_ty_1"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of ALimitedAxesImuUncalibratedEvent__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ALimitedAxesImuUncalibratedEvent__bindgen_ty_1::uncalib"] + [::std::mem::offset_of!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_1, uncalib) - 0usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub union ALimitedAxesImuUncalibratedEvent__bindgen_ty_2 { @@ -14866,91 +10439,39 @@ pub struct ALimitedAxesImuUncalibratedEvent__bindgen_ty_2__bindgen_ty_1 { pub y_bias: f32, pub z_bias: f32, } -#[test] -fn bindgen_test_layout_ALimitedAxesImuUncalibratedEvent__bindgen_ty_2__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit< +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ALimitedAxesImuUncalibratedEvent__bindgen_ty_2__bindgen_ty_1"][::std::mem::size_of::< ALimitedAxesImuUncalibratedEvent__bindgen_ty_2__bindgen_ty_1, - > = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!( - "Size of: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_2__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_2__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).x_bias) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_2__bindgen_ty_1), - "::", - stringify!(x_bias) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).y_bias) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_2__bindgen_ty_1), - "::", - stringify!(y_bias) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).z_bias) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_2__bindgen_ty_1), - "::", - stringify!(z_bias) - ) - ); -} -#[test] -fn bindgen_test_layout_ALimitedAxesImuUncalibratedEvent__bindgen_ty_2() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!( - "Size of: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_2) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bias) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_2), - "::", - stringify!(bias) - ) - ); -} + >() - 12usize]; + ["Alignment of ALimitedAxesImuUncalibratedEvent__bindgen_ty_2__bindgen_ty_1"] + [::std::mem::align_of::() + - 4usize]; + ["Offset of field: ALimitedAxesImuUncalibratedEvent__bindgen_ty_2__bindgen_ty_1::x_bias"][::std::mem::offset_of!( + ALimitedAxesImuUncalibratedEvent__bindgen_ty_2__bindgen_ty_1, + x_bias + ) + - 0usize]; + ["Offset of field: ALimitedAxesImuUncalibratedEvent__bindgen_ty_2__bindgen_ty_1::y_bias"][::std::mem::offset_of!( + ALimitedAxesImuUncalibratedEvent__bindgen_ty_2__bindgen_ty_1, + y_bias + ) + - 4usize]; + ["Offset of field: ALimitedAxesImuUncalibratedEvent__bindgen_ty_2__bindgen_ty_1::z_bias"][::std::mem::offset_of!( + ALimitedAxesImuUncalibratedEvent__bindgen_ty_2__bindgen_ty_1, + z_bias + ) + - 8usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ALimitedAxesImuUncalibratedEvent__bindgen_ty_2"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of ALimitedAxesImuUncalibratedEvent__bindgen_ty_2"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ALimitedAxesImuUncalibratedEvent__bindgen_ty_2::bias"] + [::std::mem::offset_of!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_2, bias) - 0usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub union ALimitedAxesImuUncalibratedEvent__bindgen_ty_3 { @@ -14964,148 +10485,51 @@ pub struct ALimitedAxesImuUncalibratedEvent__bindgen_ty_3__bindgen_ty_1 { pub y_supported: f32, pub z_supported: f32, } -#[test] -fn bindgen_test_layout_ALimitedAxesImuUncalibratedEvent__bindgen_ty_3__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit< +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ALimitedAxesImuUncalibratedEvent__bindgen_ty_3__bindgen_ty_1"][::std::mem::size_of::< ALimitedAxesImuUncalibratedEvent__bindgen_ty_3__bindgen_ty_1, - > = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!( - "Size of: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_3__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_3__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).x_supported) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_3__bindgen_ty_1), - "::", - stringify!(x_supported) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).y_supported) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_3__bindgen_ty_1), - "::", - stringify!(y_supported) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).z_supported) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_3__bindgen_ty_1), - "::", - stringify!(z_supported) - ) - ); -} -#[test] -fn bindgen_test_layout_ALimitedAxesImuUncalibratedEvent__bindgen_ty_3() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!( - "Size of: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_3) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_3) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).supported) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_3), - "::", - stringify!(supported) - ) - ); -} -#[test] -fn bindgen_test_layout_ALimitedAxesImuUncalibratedEvent() { - assert_eq!( - ::std::mem::size_of::(), - 36usize, - concat!("Size of: ", stringify!(ALimitedAxesImuUncalibratedEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ALimitedAxesImuUncalibratedEvent) - ) - ); -} + >() - 12usize]; + ["Alignment of ALimitedAxesImuUncalibratedEvent__bindgen_ty_3__bindgen_ty_1"] + [::std::mem::align_of::() + - 4usize]; + ["Offset of field: ALimitedAxesImuUncalibratedEvent__bindgen_ty_3__bindgen_ty_1::x_supported"] [:: std :: mem :: offset_of ! (ALimitedAxesImuUncalibratedEvent__bindgen_ty_3__bindgen_ty_1 , x_supported) - 0usize] ; + ["Offset of field: ALimitedAxesImuUncalibratedEvent__bindgen_ty_3__bindgen_ty_1::y_supported"] [:: std :: mem :: offset_of ! (ALimitedAxesImuUncalibratedEvent__bindgen_ty_3__bindgen_ty_1 , y_supported) - 4usize] ; + ["Offset of field: ALimitedAxesImuUncalibratedEvent__bindgen_ty_3__bindgen_ty_1::z_supported"] [:: std :: mem :: offset_of ! (ALimitedAxesImuUncalibratedEvent__bindgen_ty_3__bindgen_ty_1 , z_supported) - 8usize] ; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ALimitedAxesImuUncalibratedEvent__bindgen_ty_3"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of ALimitedAxesImuUncalibratedEvent__bindgen_ty_3"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ALimitedAxesImuUncalibratedEvent__bindgen_ty_3::supported"][::std::mem::offset_of!( + ALimitedAxesImuUncalibratedEvent__bindgen_ty_3, + supported + ) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ALimitedAxesImuUncalibratedEvent"] + [::std::mem::size_of::() - 36usize]; + ["Alignment of ALimitedAxesImuUncalibratedEvent"] + [::std::mem::align_of::() - 4usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct AHeadingEvent { pub heading: f32, pub accuracy: f32, } -#[test] -fn bindgen_test_layout_AHeadingEvent() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(AHeadingEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AHeadingEvent)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).heading) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AHeadingEvent), - "::", - stringify!(heading) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).accuracy) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AHeadingEvent), - "::", - stringify!(accuracy) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AHeadingEvent"][::std::mem::size_of::() - 8usize]; + ["Alignment of AHeadingEvent"][::std::mem::align_of::() - 4usize]; + ["Offset of field: AHeadingEvent::heading"] + [::std::mem::offset_of!(AHeadingEvent, heading) - 0usize]; + ["Offset of field: AHeadingEvent::accuracy"] + [::std::mem::offset_of!(AHeadingEvent, accuracy) - 4usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub struct ASensorEvent { @@ -15143,405 +10567,123 @@ pub union ASensorEvent__bindgen_ty_1__bindgen_ty_1 { pub meta_data: AMetaDataEvent, pub heart_rate: AHeartRateEvent, pub dynamic_sensor_meta: ADynamicSensorEvent, - pub additional_info: AAdditionalInfoEvent, - pub head_tracker: AHeadTrackerEvent, - pub limited_axes_imu: ALimitedAxesImuEvent, - pub limited_axes_imu_uncalibrated: ALimitedAxesImuUncalibratedEvent, - pub heading: AHeadingEvent, -} -#[test] -fn bindgen_test_layout_ASensorEvent__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!( - "Size of: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).vector) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(vector) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).acceleration) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(acceleration) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gyro) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(gyro) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).magnetic) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(magnetic) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).temperature) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(temperature) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).distance) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(distance) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).light) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(light) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pressure) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(pressure) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).relative_humidity) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(relative_humidity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uncalibrated_acceleration) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(uncalibrated_acceleration) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uncalibrated_gyro) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(uncalibrated_gyro) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uncalibrated_magnetic) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(uncalibrated_magnetic) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).meta_data) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(meta_data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).heart_rate) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(heart_rate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dynamic_sensor_meta) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(dynamic_sensor_meta) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).additional_info) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(additional_info) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).head_tracker) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(head_tracker) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).limited_axes_imu) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(limited_axes_imu) - ) - ); - assert_eq!( - unsafe { - ::std::ptr::addr_of!((*ptr).limited_axes_imu_uncalibrated) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(limited_axes_imu_uncalibrated) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).heading) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(heading) - ) - ); + pub additional_info: AAdditionalInfoEvent, + pub head_tracker: AHeadTrackerEvent, + pub limited_axes_imu: ALimitedAxesImuEvent, + pub limited_axes_imu_uncalibrated: ALimitedAxesImuUncalibratedEvent, + pub heading: AHeadingEvent, } +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASensorEvent__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::size_of::() - 64usize]; + ["Alignment of ASensorEvent__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::data"] + [::std::mem::offset_of!(ASensorEvent__bindgen_ty_1__bindgen_ty_1, data) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::vector"] + [::std::mem::offset_of!(ASensorEvent__bindgen_ty_1__bindgen_ty_1, vector) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::acceleration"] + [::std::mem::offset_of!(ASensorEvent__bindgen_ty_1__bindgen_ty_1, acceleration) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::gyro"] + [::std::mem::offset_of!(ASensorEvent__bindgen_ty_1__bindgen_ty_1, gyro) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::magnetic"] + [::std::mem::offset_of!(ASensorEvent__bindgen_ty_1__bindgen_ty_1, magnetic) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::temperature"] + [::std::mem::offset_of!(ASensorEvent__bindgen_ty_1__bindgen_ty_1, temperature) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::distance"] + [::std::mem::offset_of!(ASensorEvent__bindgen_ty_1__bindgen_ty_1, distance) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::light"] + [::std::mem::offset_of!(ASensorEvent__bindgen_ty_1__bindgen_ty_1, light) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::pressure"] + [::std::mem::offset_of!(ASensorEvent__bindgen_ty_1__bindgen_ty_1, pressure) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::relative_humidity"][::std::mem::offset_of!( + ASensorEvent__bindgen_ty_1__bindgen_ty_1, + relative_humidity + ) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::uncalibrated_acceleration"][::std::mem::offset_of!( + ASensorEvent__bindgen_ty_1__bindgen_ty_1, + uncalibrated_acceleration + ) + - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::uncalibrated_gyro"][::std::mem::offset_of!( + ASensorEvent__bindgen_ty_1__bindgen_ty_1, + uncalibrated_gyro + ) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::uncalibrated_magnetic"][::std::mem::offset_of!( + ASensorEvent__bindgen_ty_1__bindgen_ty_1, + uncalibrated_magnetic + ) + - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::meta_data"] + [::std::mem::offset_of!(ASensorEvent__bindgen_ty_1__bindgen_ty_1, meta_data) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::heart_rate"] + [::std::mem::offset_of!(ASensorEvent__bindgen_ty_1__bindgen_ty_1, heart_rate) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::dynamic_sensor_meta"][::std::mem::offset_of!( + ASensorEvent__bindgen_ty_1__bindgen_ty_1, + dynamic_sensor_meta + ) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::additional_info"][::std::mem::offset_of!( + ASensorEvent__bindgen_ty_1__bindgen_ty_1, + additional_info + ) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::head_tracker"] + [::std::mem::offset_of!(ASensorEvent__bindgen_ty_1__bindgen_ty_1, head_tracker) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::limited_axes_imu"][::std::mem::offset_of!( + ASensorEvent__bindgen_ty_1__bindgen_ty_1, + limited_axes_imu + ) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::limited_axes_imu_uncalibrated"][::std::mem::offset_of!( + ASensorEvent__bindgen_ty_1__bindgen_ty_1, + limited_axes_imu_uncalibrated + ) + - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::heading"] + [::std::mem::offset_of!(ASensorEvent__bindgen_ty_1__bindgen_ty_1, heading) - 0usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub union ASensorEvent__bindgen_ty_1__bindgen_ty_2 { pub data: [u64; 8usize], pub step_counter: u64, } -#[test] -fn bindgen_test_layout_ASensorEvent__bindgen_ty_1__bindgen_ty_2() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!( - "Size of: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_2) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).step_counter) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(step_counter) - ) - ); -} -#[test] -fn bindgen_test_layout_ASensorEvent__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(ASensorEvent__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(ASensorEvent__bindgen_ty_1)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).u64_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1), - "::", - stringify!(u64_) - ) - ); -} -#[test] -fn bindgen_test_layout_ASensorEvent() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 104usize, - concat!("Size of: ", stringify!(ASensorEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(ASensorEvent)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent), - "::", - stringify!(version) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sensor) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent), - "::", - stringify!(sensor) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved0) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent), - "::", - stringify!(reserved0) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).timestamp) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent), - "::", - stringify!(timestamp) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved1) as usize - ptr as usize }, - 92usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent), - "::", - stringify!(reserved1) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASensorEvent__bindgen_ty_1__bindgen_ty_2"] + [::std::mem::size_of::() - 64usize]; + ["Alignment of ASensorEvent__bindgen_ty_1__bindgen_ty_2"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_2::data"] + [::std::mem::offset_of!(ASensorEvent__bindgen_ty_1__bindgen_ty_2, data) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_2::step_counter"] + [::std::mem::offset_of!(ASensorEvent__bindgen_ty_1__bindgen_ty_2, step_counter) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASensorEvent__bindgen_ty_1"] + [::std::mem::size_of::() - 64usize]; + ["Alignment of ASensorEvent__bindgen_ty_1"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1::u64_"] + [::std::mem::offset_of!(ASensorEvent__bindgen_ty_1, u64_) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASensorEvent"][::std::mem::size_of::() - 104usize]; + ["Alignment of ASensorEvent"][::std::mem::align_of::() - 8usize]; + ["Offset of field: ASensorEvent::version"] + [::std::mem::offset_of!(ASensorEvent, version) - 0usize]; + ["Offset of field: ASensorEvent::sensor"] + [::std::mem::offset_of!(ASensorEvent, sensor) - 4usize]; + ["Offset of field: ASensorEvent::type_"][::std::mem::offset_of!(ASensorEvent, type_) - 8usize]; + ["Offset of field: ASensorEvent::reserved0"] + [::std::mem::offset_of!(ASensorEvent, reserved0) - 12usize]; + ["Offset of field: ASensorEvent::timestamp"] + [::std::mem::offset_of!(ASensorEvent, timestamp) - 16usize]; + ["Offset of field: ASensorEvent::flags"][::std::mem::offset_of!(ASensorEvent, flags) - 88usize]; + ["Offset of field: ASensorEvent::reserved1"] + [::std::mem::offset_of!(ASensorEvent, reserved1) - 92usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ASensorManager { @@ -16150,71 +11292,21 @@ pub struct sync_merge_data { pub flags: __u32, pub pad: __u32, } -#[test] -fn bindgen_test_layout_sync_merge_data() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(sync_merge_data)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(sync_merge_data)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sync_merge_data), - "::", - stringify!(name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fd2) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(sync_merge_data), - "::", - stringify!(fd2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fence) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(sync_merge_data), - "::", - stringify!(fence) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(sync_merge_data), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(sync_merge_data), - "::", - stringify!(pad) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sync_merge_data"][::std::mem::size_of::() - 48usize]; + ["Alignment of sync_merge_data"][::std::mem::align_of::() - 4usize]; + ["Offset of field: sync_merge_data::name"] + [::std::mem::offset_of!(sync_merge_data, name) - 0usize]; + ["Offset of field: sync_merge_data::fd2"] + [::std::mem::offset_of!(sync_merge_data, fd2) - 32usize]; + ["Offset of field: sync_merge_data::fence"] + [::std::mem::offset_of!(sync_merge_data, fence) - 36usize]; + ["Offset of field: sync_merge_data::flags"] + [::std::mem::offset_of!(sync_merge_data, flags) - 40usize]; + ["Offset of field: sync_merge_data::pad"] + [::std::mem::offset_of!(sync_merge_data, pad) - 44usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct sync_fence_info { @@ -16224,71 +11316,21 @@ pub struct sync_fence_info { pub flags: __u32, pub timestamp_ns: __u64, } -#[test] -fn bindgen_test_layout_sync_fence_info() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 80usize, - concat!("Size of: ", stringify!(sync_fence_info)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(sync_fence_info)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).obj_name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sync_fence_info), - "::", - stringify!(obj_name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).driver_name) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(sync_fence_info), - "::", - stringify!(driver_name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).status) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(sync_fence_info), - "::", - stringify!(status) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 68usize, - concat!( - "Offset of field: ", - stringify!(sync_fence_info), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).timestamp_ns) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(sync_fence_info), - "::", - stringify!(timestamp_ns) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sync_fence_info"][::std::mem::size_of::() - 80usize]; + ["Alignment of sync_fence_info"][::std::mem::align_of::() - 8usize]; + ["Offset of field: sync_fence_info::obj_name"] + [::std::mem::offset_of!(sync_fence_info, obj_name) - 0usize]; + ["Offset of field: sync_fence_info::driver_name"] + [::std::mem::offset_of!(sync_fence_info, driver_name) - 32usize]; + ["Offset of field: sync_fence_info::status"] + [::std::mem::offset_of!(sync_fence_info, status) - 64usize]; + ["Offset of field: sync_fence_info::flags"] + [::std::mem::offset_of!(sync_fence_info, flags) - 68usize]; + ["Offset of field: sync_fence_info::timestamp_ns"] + [::std::mem::offset_of!(sync_fence_info, timestamp_ns) - 72usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct sync_file_info { @@ -16299,122 +11341,37 @@ pub struct sync_file_info { pub pad: __u32, pub sync_fence_info: __u64, } -#[test] -fn bindgen_test_layout_sync_file_info() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(sync_file_info)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(sync_file_info)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sync_file_info), - "::", - stringify!(name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).status) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(sync_file_info), - "::", - stringify!(status) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(sync_file_info), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).num_fences) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(sync_file_info), - "::", - stringify!(num_fences) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(sync_file_info), - "::", - stringify!(pad) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sync_fence_info) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(sync_file_info), - "::", - stringify!(sync_fence_info) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sync_file_info"][::std::mem::size_of::() - 56usize]; + ["Alignment of sync_file_info"][::std::mem::align_of::() - 8usize]; + ["Offset of field: sync_file_info::name"] + [::std::mem::offset_of!(sync_file_info, name) - 0usize]; + ["Offset of field: sync_file_info::status"] + [::std::mem::offset_of!(sync_file_info, status) - 32usize]; + ["Offset of field: sync_file_info::flags"] + [::std::mem::offset_of!(sync_file_info, flags) - 36usize]; + ["Offset of field: sync_file_info::num_fences"] + [::std::mem::offset_of!(sync_file_info, num_fences) - 40usize]; + ["Offset of field: sync_file_info::pad"][::std::mem::offset_of!(sync_file_info, pad) - 44usize]; + ["Offset of field: sync_file_info::sync_fence_info"] + [::std::mem::offset_of!(sync_file_info, sync_fence_info) - 48usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct sync_set_deadline { pub deadline_ns: __u64, pub pad: __u64, } -#[test] -fn bindgen_test_layout_sync_set_deadline() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(sync_set_deadline)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(sync_set_deadline)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).deadline_ns) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sync_set_deadline), - "::", - stringify!(deadline_ns) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(sync_set_deadline), - "::", - stringify!(pad) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sync_set_deadline"][::std::mem::size_of::() - 16usize]; + ["Alignment of sync_set_deadline"][::std::mem::align_of::() - 8usize]; + ["Offset of field: sync_set_deadline::deadline_ns"] + [::std::mem::offset_of!(sync_set_deadline, deadline_ns) - 0usize]; + ["Offset of field: sync_set_deadline::pad"] + [::std::mem::offset_of!(sync_set_deadline, pad) - 8usize]; +}; extern "C" { pub fn sync_merge(name: *const ::std::os::raw::c_char, fd1: i32, fd2: i32) -> i32; } @@ -16535,131 +11492,22 @@ pub struct tm { pub tm_gmtoff: ::std::os::raw::c_long, pub tm_zone: *const ::std::os::raw::c_char, } -#[test] -fn bindgen_test_layout_tm() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(tm)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(tm)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tm_sec) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_sec) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tm_min) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_min) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tm_hour) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_hour) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tm_mday) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_mday) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tm_mon) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_mon) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tm_year) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_year) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tm_wday) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_wday) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tm_yday) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_yday) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tm_isdst) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_isdst) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tm_gmtoff) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_gmtoff) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tm_zone) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_zone) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of tm"][::std::mem::size_of::() - 56usize]; + ["Alignment of tm"][::std::mem::align_of::() - 8usize]; + ["Offset of field: tm::tm_sec"][::std::mem::offset_of!(tm, tm_sec) - 0usize]; + ["Offset of field: tm::tm_min"][::std::mem::offset_of!(tm, tm_min) - 4usize]; + ["Offset of field: tm::tm_hour"][::std::mem::offset_of!(tm, tm_hour) - 8usize]; + ["Offset of field: tm::tm_mday"][::std::mem::offset_of!(tm, tm_mday) - 12usize]; + ["Offset of field: tm::tm_mon"][::std::mem::offset_of!(tm, tm_mon) - 16usize]; + ["Offset of field: tm::tm_year"][::std::mem::offset_of!(tm, tm_year) - 20usize]; + ["Offset of field: tm::tm_wday"][::std::mem::offset_of!(tm, tm_wday) - 24usize]; + ["Offset of field: tm::tm_yday"][::std::mem::offset_of!(tm, tm_yday) - 28usize]; + ["Offset of field: tm::tm_isdst"][::std::mem::offset_of!(tm, tm_isdst) - 32usize]; + ["Offset of field: tm::tm_gmtoff"][::std::mem::offset_of!(tm, tm_gmtoff) - 40usize]; + ["Offset of field: tm::tm_zone"][::std::mem::offset_of!(tm, tm_zone) - 48usize]; +}; extern "C" { pub fn time(__t: *mut time_t) -> time_t; } @@ -20850,42 +15698,17 @@ pub struct ACameraMetadata_rational { pub numerator: i32, pub denominator: i32, } -#[test] -fn bindgen_test_layout_ACameraMetadata_rational() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(ACameraMetadata_rational)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(ACameraMetadata_rational)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).numerator) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_rational), - "::", - stringify!(numerator) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).denominator) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_rational), - "::", - stringify!(denominator) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACameraMetadata_rational"] + [::std::mem::size_of::() - 8usize]; + ["Alignment of ACameraMetadata_rational"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ACameraMetadata_rational::numerator"] + [::std::mem::offset_of!(ACameraMetadata_rational, numerator) - 0usize]; + ["Offset of field: ACameraMetadata_rational::denominator"] + [::std::mem::offset_of!(ACameraMetadata_rational, denominator) - 4usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub struct ACameraMetadata_entry { @@ -20904,141 +15727,39 @@ pub union ACameraMetadata_entry__bindgen_ty_1 { pub d: *mut f64, pub r: *mut ACameraMetadata_rational, } -#[test] -fn bindgen_test_layout_ACameraMetadata_entry__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(ACameraMetadata_entry__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(ACameraMetadata_entry__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).u8_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_entry__bindgen_ty_1), - "::", - stringify!(u8_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).i32_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_entry__bindgen_ty_1), - "::", - stringify!(i32_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).f) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_entry__bindgen_ty_1), - "::", - stringify!(f) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).i64_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_entry__bindgen_ty_1), - "::", - stringify!(i64_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).d) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_entry__bindgen_ty_1), - "::", - stringify!(d) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).r) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_entry__bindgen_ty_1), - "::", - stringify!(r) - ) - ); -} -#[test] -fn bindgen_test_layout_ACameraMetadata_entry() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(ACameraMetadata_entry)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(ACameraMetadata_entry)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tag) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_entry), - "::", - stringify!(tag) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_entry), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_entry), - "::", - stringify!(count) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_entry), - "::", - stringify!(data) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACameraMetadata_entry__bindgen_ty_1"] + [::std::mem::size_of::() - 8usize]; + ["Alignment of ACameraMetadata_entry__bindgen_ty_1"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: ACameraMetadata_entry__bindgen_ty_1::u8_"] + [::std::mem::offset_of!(ACameraMetadata_entry__bindgen_ty_1, u8_) - 0usize]; + ["Offset of field: ACameraMetadata_entry__bindgen_ty_1::i32_"] + [::std::mem::offset_of!(ACameraMetadata_entry__bindgen_ty_1, i32_) - 0usize]; + ["Offset of field: ACameraMetadata_entry__bindgen_ty_1::f"] + [::std::mem::offset_of!(ACameraMetadata_entry__bindgen_ty_1, f) - 0usize]; + ["Offset of field: ACameraMetadata_entry__bindgen_ty_1::i64_"] + [::std::mem::offset_of!(ACameraMetadata_entry__bindgen_ty_1, i64_) - 0usize]; + ["Offset of field: ACameraMetadata_entry__bindgen_ty_1::d"] + [::std::mem::offset_of!(ACameraMetadata_entry__bindgen_ty_1, d) - 0usize]; + ["Offset of field: ACameraMetadata_entry__bindgen_ty_1::r"] + [::std::mem::offset_of!(ACameraMetadata_entry__bindgen_ty_1, r) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACameraMetadata_entry"][::std::mem::size_of::() - 24usize]; + ["Alignment of ACameraMetadata_entry"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: ACameraMetadata_entry::tag"] + [::std::mem::offset_of!(ACameraMetadata_entry, tag) - 0usize]; + ["Offset of field: ACameraMetadata_entry::type_"] + [::std::mem::offset_of!(ACameraMetadata_entry, type_) - 4usize]; + ["Offset of field: ACameraMetadata_entry::count"] + [::std::mem::offset_of!(ACameraMetadata_entry, count) - 8usize]; + ["Offset of field: ACameraMetadata_entry::data"] + [::std::mem::offset_of!(ACameraMetadata_entry, data) - 16usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub struct ACameraMetadata_const_entry { @@ -21057,144 +15778,40 @@ pub union ACameraMetadata_const_entry__bindgen_ty_1 { pub d: *const f64, pub r: *const ACameraMetadata_rational, } -#[test] -fn bindgen_test_layout_ACameraMetadata_const_entry__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!( - "Size of: ", - stringify!(ACameraMetadata_const_entry__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(ACameraMetadata_const_entry__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).u8_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_const_entry__bindgen_ty_1), - "::", - stringify!(u8_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).i32_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_const_entry__bindgen_ty_1), - "::", - stringify!(i32_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).f) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_const_entry__bindgen_ty_1), - "::", - stringify!(f) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).i64_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_const_entry__bindgen_ty_1), - "::", - stringify!(i64_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).d) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_const_entry__bindgen_ty_1), - "::", - stringify!(d) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).r) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_const_entry__bindgen_ty_1), - "::", - stringify!(r) - ) - ); -} -#[test] -fn bindgen_test_layout_ACameraMetadata_const_entry() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(ACameraMetadata_const_entry)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(ACameraMetadata_const_entry)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tag) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_const_entry), - "::", - stringify!(tag) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_const_entry), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_const_entry), - "::", - stringify!(count) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_const_entry), - "::", - stringify!(data) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACameraMetadata_const_entry__bindgen_ty_1"] + [::std::mem::size_of::() - 8usize]; + ["Alignment of ACameraMetadata_const_entry__bindgen_ty_1"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: ACameraMetadata_const_entry__bindgen_ty_1::u8_"] + [::std::mem::offset_of!(ACameraMetadata_const_entry__bindgen_ty_1, u8_) - 0usize]; + ["Offset of field: ACameraMetadata_const_entry__bindgen_ty_1::i32_"] + [::std::mem::offset_of!(ACameraMetadata_const_entry__bindgen_ty_1, i32_) - 0usize]; + ["Offset of field: ACameraMetadata_const_entry__bindgen_ty_1::f"] + [::std::mem::offset_of!(ACameraMetadata_const_entry__bindgen_ty_1, f) - 0usize]; + ["Offset of field: ACameraMetadata_const_entry__bindgen_ty_1::i64_"] + [::std::mem::offset_of!(ACameraMetadata_const_entry__bindgen_ty_1, i64_) - 0usize]; + ["Offset of field: ACameraMetadata_const_entry__bindgen_ty_1::d"] + [::std::mem::offset_of!(ACameraMetadata_const_entry__bindgen_ty_1, d) - 0usize]; + ["Offset of field: ACameraMetadata_const_entry__bindgen_ty_1::r"] + [::std::mem::offset_of!(ACameraMetadata_const_entry__bindgen_ty_1, r) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACameraMetadata_const_entry"] + [::std::mem::size_of::() - 24usize]; + ["Alignment of ACameraMetadata_const_entry"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: ACameraMetadata_const_entry::tag"] + [::std::mem::offset_of!(ACameraMetadata_const_entry, tag) - 0usize]; + ["Offset of field: ACameraMetadata_const_entry::type_"] + [::std::mem::offset_of!(ACameraMetadata_const_entry, type_) - 4usize]; + ["Offset of field: ACameraMetadata_const_entry::count"] + [::std::mem::offset_of!(ACameraMetadata_const_entry, count) - 8usize]; + ["Offset of field: ACameraMetadata_const_entry::data"] + [::std::mem::offset_of!(ACameraMetadata_const_entry, data) - 16usize]; +}; extern "C" { pub fn ACameraMetadata_getConstEntry( metadata: *const ACameraMetadata, @@ -21423,68 +16040,21 @@ pub struct ACameraCaptureSession_stateCallbacks { pub onReady: ACameraCaptureSession_stateCallback, pub onActive: ACameraCaptureSession_stateCallback, } -#[test] -fn bindgen_test_layout_ACameraCaptureSession_stateCallbacks() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!( - "Size of: ", - stringify!(ACameraCaptureSession_stateCallbacks) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(ACameraCaptureSession_stateCallbacks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).context) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_stateCallbacks), - "::", - stringify!(context) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onClosed) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_stateCallbacks), - "::", - stringify!(onClosed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onReady) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_stateCallbacks), - "::", - stringify!(onReady) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onActive) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_stateCallbacks), - "::", - stringify!(onActive) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACameraCaptureSession_stateCallbacks"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of ACameraCaptureSession_stateCallbacks"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: ACameraCaptureSession_stateCallbacks::context"] + [::std::mem::offset_of!(ACameraCaptureSession_stateCallbacks, context) - 0usize]; + ["Offset of field: ACameraCaptureSession_stateCallbacks::onClosed"] + [::std::mem::offset_of!(ACameraCaptureSession_stateCallbacks, onClosed) - 8usize]; + ["Offset of field: ACameraCaptureSession_stateCallbacks::onReady"] + [::std::mem::offset_of!(ACameraCaptureSession_stateCallbacks, onReady) - 16usize]; + ["Offset of field: ACameraCaptureSession_stateCallbacks::onActive"] + [::std::mem::offset_of!(ACameraCaptureSession_stateCallbacks, onActive) - 24usize]; +}; pub type ACameraCaptureSession_prepareCallback = ::std::option::Option< unsafe extern "C" fn( context: *mut ::std::os::raw::c_void, @@ -21503,62 +16073,20 @@ pub struct ACameraCaptureFailure { pub sequenceId: ::std::os::raw::c_int, pub wasImageCaptured: bool, } -#[test] -fn bindgen_test_layout_ACameraCaptureFailure() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(ACameraCaptureFailure)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(ACameraCaptureFailure)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).frameNumber) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureFailure), - "::", - stringify!(frameNumber) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reason) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureFailure), - "::", - stringify!(reason) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sequenceId) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureFailure), - "::", - stringify!(sequenceId) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).wasImageCaptured) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureFailure), - "::", - stringify!(wasImageCaptured) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACameraCaptureFailure"][::std::mem::size_of::() - 24usize]; + ["Alignment of ACameraCaptureFailure"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: ACameraCaptureFailure::frameNumber"] + [::std::mem::offset_of!(ACameraCaptureFailure, frameNumber) - 0usize]; + ["Offset of field: ACameraCaptureFailure::reason"] + [::std::mem::offset_of!(ACameraCaptureFailure, reason) - 8usize]; + ["Offset of field: ACameraCaptureFailure::sequenceId"] + [::std::mem::offset_of!(ACameraCaptureFailure, sequenceId) - 12usize]; + ["Offset of field: ACameraCaptureFailure::wasImageCaptured"] + [::std::mem::offset_of!(ACameraCaptureFailure, wasImageCaptured) - 16usize]; +}; pub type ACameraCaptureSession_captureCallback_start = ::std::option::Option< unsafe extern "C" fn( context: *mut ::std::os::raw::c_void, @@ -21619,108 +16147,41 @@ pub struct ACameraCaptureSession_captureCallbacks { pub onCaptureSequenceAborted: ACameraCaptureSession_captureCallback_sequenceAbort, pub onCaptureBufferLost: ACameraCaptureSession_captureCallback_bufferLost, } -#[test] -fn bindgen_test_layout_ACameraCaptureSession_captureCallbacks() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!( - "Size of: ", - stringify!(ACameraCaptureSession_captureCallbacks) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(ACameraCaptureSession_captureCallbacks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).context) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_captureCallbacks), - "::", - stringify!(context) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureStarted) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_captureCallbacks), - "::", - stringify!(onCaptureStarted) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureProgressed) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_captureCallbacks), - "::", - stringify!(onCaptureProgressed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureCompleted) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_captureCallbacks), - "::", - stringify!(onCaptureCompleted) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureFailed) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_captureCallbacks), - "::", - stringify!(onCaptureFailed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureSequenceCompleted) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_captureCallbacks), - "::", - stringify!(onCaptureSequenceCompleted) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureSequenceAborted) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_captureCallbacks), - "::", - stringify!(onCaptureSequenceAborted) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureBufferLost) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_captureCallbacks), - "::", - stringify!(onCaptureBufferLost) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACameraCaptureSession_captureCallbacks"] + [::std::mem::size_of::() - 64usize]; + ["Alignment of ACameraCaptureSession_captureCallbacks"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: ACameraCaptureSession_captureCallbacks::context"] + [::std::mem::offset_of!(ACameraCaptureSession_captureCallbacks, context) - 0usize]; + ["Offset of field: ACameraCaptureSession_captureCallbacks::onCaptureStarted"] + [::std::mem::offset_of!(ACameraCaptureSession_captureCallbacks, onCaptureStarted) - 8usize]; + ["Offset of field: ACameraCaptureSession_captureCallbacks::onCaptureProgressed"][::std::mem::offset_of!( + ACameraCaptureSession_captureCallbacks, + onCaptureProgressed + ) - 16usize]; + ["Offset of field: ACameraCaptureSession_captureCallbacks::onCaptureCompleted"][::std::mem::offset_of!( + ACameraCaptureSession_captureCallbacks, + onCaptureCompleted + ) - 24usize]; + ["Offset of field: ACameraCaptureSession_captureCallbacks::onCaptureFailed"] + [::std::mem::offset_of!(ACameraCaptureSession_captureCallbacks, onCaptureFailed) - 32usize]; + ["Offset of field: ACameraCaptureSession_captureCallbacks::onCaptureSequenceCompleted"][::std::mem::offset_of!( + ACameraCaptureSession_captureCallbacks, + onCaptureSequenceCompleted + ) + - 40usize]; + ["Offset of field: ACameraCaptureSession_captureCallbacks::onCaptureSequenceAborted"][::std::mem::offset_of!( + ACameraCaptureSession_captureCallbacks, + onCaptureSequenceAborted + ) + - 48usize]; + ["Offset of field: ACameraCaptureSession_captureCallbacks::onCaptureBufferLost"][::std::mem::offset_of!( + ACameraCaptureSession_captureCallbacks, + onCaptureBufferLost + ) - 56usize]; +}; pub const CAPTURE_SEQUENCE_ID_NONE: _bindgen_ty_66 = -1; pub type _bindgen_ty_66 = ::std::os::raw::c_int; extern "C" { @@ -21793,42 +16254,17 @@ pub struct ALogicalCameraCaptureFailure { pub captureFailure: ACameraCaptureFailure, pub physicalCameraId: *const ::std::os::raw::c_char, } -#[test] -fn bindgen_test_layout_ALogicalCameraCaptureFailure() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(ALogicalCameraCaptureFailure)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(ALogicalCameraCaptureFailure)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).captureFailure) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ALogicalCameraCaptureFailure), - "::", - stringify!(captureFailure) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).physicalCameraId) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(ALogicalCameraCaptureFailure), - "::", - stringify!(physicalCameraId) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ALogicalCameraCaptureFailure"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of ALogicalCameraCaptureFailure"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: ALogicalCameraCaptureFailure::captureFailure"] + [::std::mem::offset_of!(ALogicalCameraCaptureFailure, captureFailure) - 0usize]; + ["Offset of field: ALogicalCameraCaptureFailure::physicalCameraId"] + [::std::mem::offset_of!(ALogicalCameraCaptureFailure, physicalCameraId) - 24usize]; +}; pub type ACameraCaptureSession_logicalCamera_captureCallback_failed = ::std::option::Option< unsafe extern "C" fn( context: *mut ::std::os::raw::c_void, @@ -21849,112 +16285,28 @@ pub struct ACameraCaptureSession_logicalCamera_captureCallbacks { pub onCaptureSequenceAborted: ACameraCaptureSession_captureCallback_sequenceAbort, pub onCaptureBufferLost: ACameraCaptureSession_captureCallback_bufferLost, } -#[test] -fn bindgen_test_layout_ACameraCaptureSession_logicalCamera_captureCallbacks() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!( - "Size of: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacks) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).context) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacks), - "::", - stringify!(context) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureStarted) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacks), - "::", - stringify!(onCaptureStarted) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureProgressed) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacks), - "::", - stringify!(onCaptureProgressed) - ) - ); - assert_eq!( - unsafe { - ::std::ptr::addr_of!((*ptr).onLogicalCameraCaptureCompleted) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacks), - "::", - stringify!(onLogicalCameraCaptureCompleted) - ) - ); - assert_eq!( - unsafe { - ::std::ptr::addr_of!((*ptr).onLogicalCameraCaptureFailed) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacks), - "::", - stringify!(onLogicalCameraCaptureFailed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureSequenceCompleted) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacks), - "::", - stringify!(onCaptureSequenceCompleted) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureSequenceAborted) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacks), - "::", - stringify!(onCaptureSequenceAborted) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureBufferLost) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacks), - "::", - stringify!(onCaptureBufferLost) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACameraCaptureSession_logicalCamera_captureCallbacks"] + [::std::mem::size_of::() - 64usize]; + ["Alignment of ACameraCaptureSession_logicalCamera_captureCallbacks"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: ACameraCaptureSession_logicalCamera_captureCallbacks::context"][::std::mem::offset_of!( + ACameraCaptureSession_logicalCamera_captureCallbacks, + context + ) - 0usize]; + ["Offset of field: ACameraCaptureSession_logicalCamera_captureCallbacks::onCaptureStarted"][::std::mem::offset_of!( + ACameraCaptureSession_logicalCamera_captureCallbacks, + onCaptureStarted + ) + - 8usize]; + ["Offset of field: ACameraCaptureSession_logicalCamera_captureCallbacks::onCaptureProgressed"] [:: std :: mem :: offset_of ! (ACameraCaptureSession_logicalCamera_captureCallbacks , onCaptureProgressed) - 16usize] ; + ["Offset of field: ACameraCaptureSession_logicalCamera_captureCallbacks::onLogicalCameraCaptureCompleted"] [:: std :: mem :: offset_of ! (ACameraCaptureSession_logicalCamera_captureCallbacks , onLogicalCameraCaptureCompleted) - 24usize] ; + ["Offset of field: ACameraCaptureSession_logicalCamera_captureCallbacks::onLogicalCameraCaptureFailed"] [:: std :: mem :: offset_of ! (ACameraCaptureSession_logicalCamera_captureCallbacks , onLogicalCameraCaptureFailed) - 32usize] ; + ["Offset of field: ACameraCaptureSession_logicalCamera_captureCallbacks::onCaptureSequenceCompleted"] [:: std :: mem :: offset_of ! (ACameraCaptureSession_logicalCamera_captureCallbacks , onCaptureSequenceCompleted) - 40usize] ; + ["Offset of field: ACameraCaptureSession_logicalCamera_captureCallbacks::onCaptureSequenceAborted"] [:: std :: mem :: offset_of ! (ACameraCaptureSession_logicalCamera_captureCallbacks , onCaptureSequenceAborted) - 48usize] ; + ["Offset of field: ACameraCaptureSession_logicalCamera_captureCallbacks::onCaptureBufferLost"] [:: std :: mem :: offset_of ! (ACameraCaptureSession_logicalCamera_captureCallbacks , onCaptureBufferLost) - 56usize] ; +}; extern "C" { pub fn ACameraCaptureSession_logicalCamera_capture( session: *mut ACameraCaptureSession, @@ -21994,108 +16346,45 @@ pub struct ACameraCaptureSession_captureCallbacksV2 { pub onCaptureSequenceAborted: ACameraCaptureSession_captureCallback_sequenceAbort, pub onCaptureBufferLost: ACameraCaptureSession_captureCallback_bufferLost, } -#[test] -fn bindgen_test_layout_ACameraCaptureSession_captureCallbacksV2() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!( - "Size of: ", - stringify!(ACameraCaptureSession_captureCallbacksV2) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(ACameraCaptureSession_captureCallbacksV2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).context) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_captureCallbacksV2), - "::", - stringify!(context) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureStarted) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_captureCallbacksV2), - "::", - stringify!(onCaptureStarted) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureProgressed) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_captureCallbacksV2), - "::", - stringify!(onCaptureProgressed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureCompleted) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_captureCallbacksV2), - "::", - stringify!(onCaptureCompleted) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureFailed) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_captureCallbacksV2), - "::", - stringify!(onCaptureFailed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureSequenceCompleted) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_captureCallbacksV2), - "::", - stringify!(onCaptureSequenceCompleted) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureSequenceAborted) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_captureCallbacksV2), - "::", - stringify!(onCaptureSequenceAborted) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureBufferLost) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_captureCallbacksV2), - "::", - stringify!(onCaptureBufferLost) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACameraCaptureSession_captureCallbacksV2"] + [::std::mem::size_of::() - 64usize]; + ["Alignment of ACameraCaptureSession_captureCallbacksV2"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: ACameraCaptureSession_captureCallbacksV2::context"] + [::std::mem::offset_of!(ACameraCaptureSession_captureCallbacksV2, context) - 0usize]; + ["Offset of field: ACameraCaptureSession_captureCallbacksV2::onCaptureStarted"][::std::mem::offset_of!( + ACameraCaptureSession_captureCallbacksV2, + onCaptureStarted + ) - 8usize]; + ["Offset of field: ACameraCaptureSession_captureCallbacksV2::onCaptureProgressed"][::std::mem::offset_of!( + ACameraCaptureSession_captureCallbacksV2, + onCaptureProgressed + ) - 16usize]; + ["Offset of field: ACameraCaptureSession_captureCallbacksV2::onCaptureCompleted"][::std::mem::offset_of!( + ACameraCaptureSession_captureCallbacksV2, + onCaptureCompleted + ) - 24usize]; + ["Offset of field: ACameraCaptureSession_captureCallbacksV2::onCaptureFailed"][::std::mem::offset_of!( + ACameraCaptureSession_captureCallbacksV2, + onCaptureFailed + ) - 32usize]; + ["Offset of field: ACameraCaptureSession_captureCallbacksV2::onCaptureSequenceCompleted"][::std::mem::offset_of!( + ACameraCaptureSession_captureCallbacksV2, + onCaptureSequenceCompleted + ) + - 40usize]; + ["Offset of field: ACameraCaptureSession_captureCallbacksV2::onCaptureSequenceAborted"][::std::mem::offset_of!( + ACameraCaptureSession_captureCallbacksV2, + onCaptureSequenceAborted + ) + - 48usize]; + ["Offset of field: ACameraCaptureSession_captureCallbacksV2::onCaptureBufferLost"][::std::mem::offset_of!( + ACameraCaptureSession_captureCallbacksV2, + onCaptureBufferLost + ) - 56usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ACameraCaptureSession_logicalCamera_captureCallbacksV2 { @@ -22108,112 +16397,29 @@ pub struct ACameraCaptureSession_logicalCamera_captureCallbacksV2 { pub onCaptureSequenceAborted: ACameraCaptureSession_captureCallback_sequenceAbort, pub onCaptureBufferLost: ACameraCaptureSession_captureCallback_bufferLost, } -#[test] -fn bindgen_test_layout_ACameraCaptureSession_logicalCamera_captureCallbacksV2() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!( - "Size of: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacksV2) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacksV2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).context) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacksV2), - "::", - stringify!(context) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureStarted) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacksV2), - "::", - stringify!(onCaptureStarted) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureProgressed) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacksV2), - "::", - stringify!(onCaptureProgressed) - ) - ); - assert_eq!( - unsafe { - ::std::ptr::addr_of!((*ptr).onLogicalCameraCaptureCompleted) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacksV2), - "::", - stringify!(onLogicalCameraCaptureCompleted) - ) - ); - assert_eq!( - unsafe { - ::std::ptr::addr_of!((*ptr).onLogicalCameraCaptureFailed) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacksV2), - "::", - stringify!(onLogicalCameraCaptureFailed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureSequenceCompleted) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacksV2), - "::", - stringify!(onCaptureSequenceCompleted) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureSequenceAborted) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacksV2), - "::", - stringify!(onCaptureSequenceAborted) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureBufferLost) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacksV2), - "::", - stringify!(onCaptureBufferLost) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACameraCaptureSession_logicalCamera_captureCallbacksV2"] + [::std::mem::size_of::() - 64usize]; + ["Alignment of ACameraCaptureSession_logicalCamera_captureCallbacksV2"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: ACameraCaptureSession_logicalCamera_captureCallbacksV2::context"][::std::mem::offset_of!( + ACameraCaptureSession_logicalCamera_captureCallbacksV2, + context + ) + - 0usize]; + ["Offset of field: ACameraCaptureSession_logicalCamera_captureCallbacksV2::onCaptureStarted"][::std::mem::offset_of!( + ACameraCaptureSession_logicalCamera_captureCallbacksV2, + onCaptureStarted + ) + - 8usize]; + ["Offset of field: ACameraCaptureSession_logicalCamera_captureCallbacksV2::onCaptureProgressed"] [:: std :: mem :: offset_of ! (ACameraCaptureSession_logicalCamera_captureCallbacksV2 , onCaptureProgressed) - 16usize] ; + ["Offset of field: ACameraCaptureSession_logicalCamera_captureCallbacksV2::onLogicalCameraCaptureCompleted"] [:: std :: mem :: offset_of ! (ACameraCaptureSession_logicalCamera_captureCallbacksV2 , onLogicalCameraCaptureCompleted) - 24usize] ; + ["Offset of field: ACameraCaptureSession_logicalCamera_captureCallbacksV2::onLogicalCameraCaptureFailed"] [:: std :: mem :: offset_of ! (ACameraCaptureSession_logicalCamera_captureCallbacksV2 , onLogicalCameraCaptureFailed) - 32usize] ; + ["Offset of field: ACameraCaptureSession_logicalCamera_captureCallbacksV2::onCaptureSequenceCompleted"] [:: std :: mem :: offset_of ! (ACameraCaptureSession_logicalCamera_captureCallbacksV2 , onCaptureSequenceCompleted) - 40usize] ; + ["Offset of field: ACameraCaptureSession_logicalCamera_captureCallbacksV2::onCaptureSequenceAborted"] [:: std :: mem :: offset_of ! (ACameraCaptureSession_logicalCamera_captureCallbacksV2 , onCaptureSequenceAborted) - 48usize] ; + ["Offset of field: ACameraCaptureSession_logicalCamera_captureCallbacksV2::onCaptureBufferLost"] [:: std :: mem :: offset_of ! (ACameraCaptureSession_logicalCamera_captureCallbacksV2 , onCaptureBufferLost) - 56usize] ; +}; extern "C" { pub fn ACameraCaptureSession_captureV2( session: *mut ACameraCaptureSession, @@ -22269,41 +16475,15 @@ pub struct ACameraIdList { pub numCameras: ::std::os::raw::c_int, pub cameraIds: *mut *const ::std::os::raw::c_char, } -#[test] -fn bindgen_test_layout_ACameraIdList() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(ACameraIdList)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(ACameraIdList)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).numCameras) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraIdList), - "::", - stringify!(numCameras) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cameraIds) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ACameraIdList), - "::", - stringify!(cameraIds) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACameraIdList"][::std::mem::size_of::() - 16usize]; + ["Alignment of ACameraIdList"][::std::mem::align_of::() - 8usize]; + ["Offset of field: ACameraIdList::numCameras"] + [::std::mem::offset_of!(ACameraIdList, numCameras) - 0usize]; + ["Offset of field: ACameraIdList::cameraIds"] + [::std::mem::offset_of!(ACameraIdList, cameraIds) - 8usize]; +}; pub const ERROR_CAMERA_IN_USE: _bindgen_ty_67 = 1; pub const ERROR_MAX_CAMERAS_IN_USE: _bindgen_ty_67 = 2; pub const ERROR_CAMERA_DISABLED: _bindgen_ty_67 = 3; @@ -22327,52 +16507,19 @@ pub struct ACameraDevice_StateCallbacks { pub onDisconnected: ACameraDevice_StateCallback, pub onError: ACameraDevice_ErrorStateCallback, } -#[test] -fn bindgen_test_layout_ACameraDevice_StateCallbacks() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(ACameraDevice_StateCallbacks)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(ACameraDevice_StateCallbacks)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).context) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraDevice_StateCallbacks), - "::", - stringify!(context) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onDisconnected) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ACameraDevice_StateCallbacks), - "::", - stringify!(onDisconnected) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onError) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(ACameraDevice_StateCallbacks), - "::", - stringify!(onError) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACameraDevice_StateCallbacks"] + [::std::mem::size_of::() - 24usize]; + ["Alignment of ACameraDevice_StateCallbacks"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: ACameraDevice_StateCallbacks::context"] + [::std::mem::offset_of!(ACameraDevice_StateCallbacks, context) - 0usize]; + ["Offset of field: ACameraDevice_StateCallbacks::onDisconnected"] + [::std::mem::offset_of!(ACameraDevice_StateCallbacks, onDisconnected) - 8usize]; + ["Offset of field: ACameraDevice_StateCallbacks::onError"] + [::std::mem::offset_of!(ACameraDevice_StateCallbacks, onError) - 16usize]; +}; pub type ACameraDevice_stateCallbacks = ACameraDevice_StateCallbacks; extern "C" { pub fn ACameraDevice_close(device: *mut ACameraDevice) -> camera_status_t; @@ -22541,55 +16688,21 @@ pub struct ACameraManager_AvailabilityListener { pub onCameraAvailable: ACameraManager_AvailabilityCallback, pub onCameraUnavailable: ACameraManager_AvailabilityCallback, } -#[test] -fn bindgen_test_layout_ACameraManager_AvailabilityListener() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(ACameraManager_AvailabilityListener)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(ACameraManager_AvailabilityListener) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).context) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraManager_AvailabilityListener), - "::", - stringify!(context) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCameraAvailable) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ACameraManager_AvailabilityListener), - "::", - stringify!(onCameraAvailable) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCameraUnavailable) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(ACameraManager_AvailabilityListener), - "::", - stringify!(onCameraUnavailable) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACameraManager_AvailabilityListener"] + [::std::mem::size_of::() - 24usize]; + ["Alignment of ACameraManager_AvailabilityListener"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: ACameraManager_AvailabilityListener::context"] + [::std::mem::offset_of!(ACameraManager_AvailabilityListener, context) - 0usize]; + ["Offset of field: ACameraManager_AvailabilityListener::onCameraAvailable"] + [::std::mem::offset_of!(ACameraManager_AvailabilityListener, onCameraAvailable) - 8usize]; + ["Offset of field: ACameraManager_AvailabilityListener::onCameraUnavailable"][::std::mem::offset_of!( + ACameraManager_AvailabilityListener, + onCameraUnavailable + ) - 16usize]; +}; pub type ACameraManager_AvailabilityCallbacks = ACameraManager_AvailabilityListener; extern "C" { pub fn ACameraManager_registerAvailabilityCallback( @@ -22629,80 +16742,31 @@ pub struct ACameraManager_ExtendedAvailabilityListener { pub onPhysicalCameraUnavailable: ACameraManager_PhysicalCameraAvailabilityCallback, pub reserved: [*mut ::std::os::raw::c_void; 4usize], } -#[test] -fn bindgen_test_layout_ACameraManager_ExtendedAvailabilityListener() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 80usize, - concat!( - "Size of: ", - stringify!(ACameraManager_ExtendedAvailabilityListener) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(ACameraManager_ExtendedAvailabilityListener) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).availabilityCallbacks) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraManager_ExtendedAvailabilityListener), - "::", - stringify!(availabilityCallbacks) - ) - ); - assert_eq!( - unsafe { - ::std::ptr::addr_of!((*ptr).onCameraAccessPrioritiesChanged) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(ACameraManager_ExtendedAvailabilityListener), - "::", - stringify!(onCameraAccessPrioritiesChanged) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onPhysicalCameraAvailable) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(ACameraManager_ExtendedAvailabilityListener), - "::", - stringify!(onPhysicalCameraAvailable) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onPhysicalCameraUnavailable) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(ACameraManager_ExtendedAvailabilityListener), - "::", - stringify!(onPhysicalCameraUnavailable) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(ACameraManager_ExtendedAvailabilityListener), - "::", - stringify!(reserved) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACameraManager_ExtendedAvailabilityListener"] + [::std::mem::size_of::() - 80usize]; + ["Alignment of ACameraManager_ExtendedAvailabilityListener"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: ACameraManager_ExtendedAvailabilityListener::availabilityCallbacks"][::std::mem::offset_of!( + ACameraManager_ExtendedAvailabilityListener, + availabilityCallbacks + ) + - 0usize]; + ["Offset of field: ACameraManager_ExtendedAvailabilityListener::onCameraAccessPrioritiesChanged"] [:: std :: mem :: offset_of ! (ACameraManager_ExtendedAvailabilityListener , onCameraAccessPrioritiesChanged) - 24usize] ; + ["Offset of field: ACameraManager_ExtendedAvailabilityListener::onPhysicalCameraAvailable"][::std::mem::offset_of!( + ACameraManager_ExtendedAvailabilityListener, + onPhysicalCameraAvailable + ) + - 32usize]; + ["Offset of field: ACameraManager_ExtendedAvailabilityListener::onPhysicalCameraUnavailable"][::std::mem::offset_of!( + ACameraManager_ExtendedAvailabilityListener, + onPhysicalCameraUnavailable + ) + - 40usize]; + ["Offset of field: ACameraManager_ExtendedAvailabilityListener::reserved"] + [::std::mem::offset_of!(ACameraManager_ExtendedAvailabilityListener, reserved) - 48usize]; +}; pub type ACameraManager_ExtendedAvailabilityCallbacks = ACameraManager_ExtendedAvailabilityListener; extern "C" { pub fn ACameraManager_registerExtendedAvailabilityCallback( @@ -22783,61 +16847,18 @@ pub struct AImageCropRect { pub right: i32, pub bottom: i32, } -#[test] -fn bindgen_test_layout_AImageCropRect() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(AImageCropRect)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AImageCropRect)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).left) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AImageCropRect), - "::", - stringify!(left) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).top) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AImageCropRect), - "::", - stringify!(top) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).right) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AImageCropRect), - "::", - stringify!(right) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bottom) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(AImageCropRect), - "::", - stringify!(bottom) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AImageCropRect"][::std::mem::size_of::() - 16usize]; + ["Alignment of AImageCropRect"][::std::mem::align_of::() - 4usize]; + ["Offset of field: AImageCropRect::left"] + [::std::mem::offset_of!(AImageCropRect, left) - 0usize]; + ["Offset of field: AImageCropRect::top"][::std::mem::offset_of!(AImageCropRect, top) - 4usize]; + ["Offset of field: AImageCropRect::right"] + [::std::mem::offset_of!(AImageCropRect, right) - 8usize]; + ["Offset of field: AImageCropRect::bottom"] + [::std::mem::offset_of!(AImageCropRect, bottom) - 12usize]; +}; extern "C" { pub fn AImage_delete(image: *mut AImage); } @@ -22952,42 +16973,17 @@ pub struct AImageReader_ImageListener { pub context: *mut ::std::os::raw::c_void, pub onImageAvailable: AImageReader_ImageCallback, } -#[test] -fn bindgen_test_layout_AImageReader_ImageListener() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(AImageReader_ImageListener)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AImageReader_ImageListener)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).context) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AImageReader_ImageListener), - "::", - stringify!(context) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onImageAvailable) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AImageReader_ImageListener), - "::", - stringify!(onImageAvailable) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AImageReader_ImageListener"] + [::std::mem::size_of::() - 16usize]; + ["Alignment of AImageReader_ImageListener"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: AImageReader_ImageListener::context"] + [::std::mem::offset_of!(AImageReader_ImageListener, context) - 0usize]; + ["Offset of field: AImageReader_ImageListener::onImageAvailable"] + [::std::mem::offset_of!(AImageReader_ImageListener, onImageAvailable) - 8usize]; +}; extern "C" { pub fn AImageReader_setImageListener( reader: *mut AImageReader, @@ -23042,45 +17038,17 @@ pub struct AImageReader_BufferRemovedListener { pub context: *mut ::std::os::raw::c_void, pub onBufferRemoved: AImageReader_BufferRemovedCallback, } -#[test] -fn bindgen_test_layout_AImageReader_BufferRemovedListener() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(AImageReader_BufferRemovedListener)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(AImageReader_BufferRemovedListener) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).context) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AImageReader_BufferRemovedListener), - "::", - stringify!(context) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onBufferRemoved) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AImageReader_BufferRemovedListener), - "::", - stringify!(onBufferRemoved) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AImageReader_BufferRemovedListener"] + [::std::mem::size_of::() - 16usize]; + ["Alignment of AImageReader_BufferRemovedListener"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: AImageReader_BufferRemovedListener::context"] + [::std::mem::offset_of!(AImageReader_BufferRemovedListener, context) - 0usize]; + ["Offset of field: AImageReader_BufferRemovedListener::onBufferRemoved"] + [::std::mem::offset_of!(AImageReader_BufferRemovedListener, onBufferRemoved) - 8usize]; +}; extern "C" { pub fn AImageReader_setBufferRemovedListener( reader: *mut AImageReader, @@ -23094,7 +17062,7 @@ pub struct AMediaCrypto { } pub type AMediaUUID = [u8; 16usize]; extern "C" { - pub fn AMediaCrypto_isCryptoSchemeSupported(uuid: *mut u8) -> bool; + pub fn AMediaCrypto_isCryptoSchemeSupported(uuid: *const u8) -> bool; } extern "C" { pub fn AMediaCrypto_requiresSecureDecoderComponent(mime: *const ::std::os::raw::c_char) @@ -23102,7 +17070,7 @@ extern "C" { } extern "C" { pub fn AMediaCrypto_new( - uuid: *mut u8, + uuid: *const u8, initData: *const ::std::os::raw::c_void, initDataSize: usize, ) -> *mut AMediaCrypto; @@ -23721,62 +17689,20 @@ pub struct AMediaCodecBufferInfo { pub presentationTimeUs: i64, pub flags: u32, } -#[test] -fn bindgen_test_layout_AMediaCodecBufferInfo() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(AMediaCodecBufferInfo)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AMediaCodecBufferInfo)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).offset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AMediaCodecBufferInfo), - "::", - stringify!(offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AMediaCodecBufferInfo), - "::", - stringify!(size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).presentationTimeUs) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AMediaCodecBufferInfo), - "::", - stringify!(presentationTimeUs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AMediaCodecBufferInfo), - "::", - stringify!(flags) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AMediaCodecBufferInfo"][::std::mem::size_of::() - 24usize]; + ["Alignment of AMediaCodecBufferInfo"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: AMediaCodecBufferInfo::offset"] + [::std::mem::offset_of!(AMediaCodecBufferInfo, offset) - 0usize]; + ["Offset of field: AMediaCodecBufferInfo::size"] + [::std::mem::offset_of!(AMediaCodecBufferInfo, size) - 4usize]; + ["Offset of field: AMediaCodecBufferInfo::presentationTimeUs"] + [::std::mem::offset_of!(AMediaCodecBufferInfo, presentationTimeUs) - 8usize]; + ["Offset of field: AMediaCodecBufferInfo::flags"] + [::std::mem::offset_of!(AMediaCodecBufferInfo, flags) - 16usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct AMediaCodecCryptoInfo { @@ -23833,65 +17759,21 @@ pub struct AMediaCodecOnAsyncNotifyCallback { pub onAsyncFormatChanged: AMediaCodecOnAsyncFormatChanged, pub onAsyncError: AMediaCodecOnAsyncError, } -#[test] -fn bindgen_test_layout_AMediaCodecOnAsyncNotifyCallback() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(AMediaCodecOnAsyncNotifyCallback)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(AMediaCodecOnAsyncNotifyCallback) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onAsyncInputAvailable) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AMediaCodecOnAsyncNotifyCallback), - "::", - stringify!(onAsyncInputAvailable) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onAsyncOutputAvailable) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AMediaCodecOnAsyncNotifyCallback), - "::", - stringify!(onAsyncOutputAvailable) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onAsyncFormatChanged) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AMediaCodecOnAsyncNotifyCallback), - "::", - stringify!(onAsyncFormatChanged) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onAsyncError) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(AMediaCodecOnAsyncNotifyCallback), - "::", - stringify!(onAsyncError) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AMediaCodecOnAsyncNotifyCallback"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of AMediaCodecOnAsyncNotifyCallback"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: AMediaCodecOnAsyncNotifyCallback::onAsyncInputAvailable"] + [::std::mem::offset_of!(AMediaCodecOnAsyncNotifyCallback, onAsyncInputAvailable) - 0usize]; + ["Offset of field: AMediaCodecOnAsyncNotifyCallback::onAsyncOutputAvailable"] + [::std::mem::offset_of!(AMediaCodecOnAsyncNotifyCallback, onAsyncOutputAvailable) - 8usize]; + ["Offset of field: AMediaCodecOnAsyncNotifyCallback::onAsyncFormatChanged"] + [::std::mem::offset_of!(AMediaCodecOnAsyncNotifyCallback, onAsyncFormatChanged) - 16usize]; + ["Offset of field: AMediaCodecOnAsyncNotifyCallback::onAsyncError"] + [::std::mem::offset_of!(AMediaCodecOnAsyncNotifyCallback, onAsyncError) - 24usize]; +}; pub type AMediaCodecOnFrameRendered = ::std::option::Option< unsafe extern "C" fn( codec: *mut AMediaCodec, @@ -24101,41 +17983,15 @@ pub struct cryptoinfo_pattern_t { pub encryptBlocks: i32, pub skipBlocks: i32, } -#[test] -fn bindgen_test_layout_cryptoinfo_pattern_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(cryptoinfo_pattern_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(cryptoinfo_pattern_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).encryptBlocks) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cryptoinfo_pattern_t), - "::", - stringify!(encryptBlocks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).skipBlocks) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(cryptoinfo_pattern_t), - "::", - stringify!(skipBlocks) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cryptoinfo_pattern_t"][::std::mem::size_of::() - 8usize]; + ["Alignment of cryptoinfo_pattern_t"][::std::mem::align_of::() - 4usize]; + ["Offset of field: cryptoinfo_pattern_t::encryptBlocks"] + [::std::mem::offset_of!(cryptoinfo_pattern_t, encryptBlocks) - 0usize]; + ["Offset of field: cryptoinfo_pattern_t::skipBlocks"] + [::std::mem::offset_of!(cryptoinfo_pattern_t, skipBlocks) - 4usize]; +}; extern "C" { pub fn AMediaCodecCryptoInfo_new( numsubsamples: ::std::os::raw::c_int, @@ -24274,41 +18130,15 @@ pub struct AMediaDrmByteArray { pub ptr: *const u8, pub length: usize, } -#[test] -fn bindgen_test_layout_AMediaDrmByteArray() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(AMediaDrmByteArray)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AMediaDrmByteArray)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ptr) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AMediaDrmByteArray), - "::", - stringify!(ptr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AMediaDrmByteArray), - "::", - stringify!(length) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AMediaDrmByteArray"][::std::mem::size_of::() - 16usize]; + ["Alignment of AMediaDrmByteArray"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AMediaDrmByteArray::ptr"] + [::std::mem::offset_of!(AMediaDrmByteArray, ptr) - 0usize]; + ["Offset of field: AMediaDrmByteArray::length"] + [::std::mem::offset_of!(AMediaDrmByteArray, length) - 8usize]; +}; pub type AMediaDrmSessionId = AMediaDrmByteArray; pub type AMediaDrmScope = AMediaDrmByteArray; pub type AMediaDrmKeySetId = AMediaDrmByteArray; @@ -24368,42 +18198,16 @@ pub struct AMediaDrmKeyValuePair { pub mKey: *const ::std::os::raw::c_char, pub mValue: *const ::std::os::raw::c_char, } -#[test] -fn bindgen_test_layout_AMediaDrmKeyValuePair() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(AMediaDrmKeyValuePair)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AMediaDrmKeyValuePair)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mKey) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AMediaDrmKeyValuePair), - "::", - stringify!(mKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mValue) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AMediaDrmKeyValuePair), - "::", - stringify!(mValue) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AMediaDrmKeyValuePair"][::std::mem::size_of::() - 16usize]; + ["Alignment of AMediaDrmKeyValuePair"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: AMediaDrmKeyValuePair::mKey"] + [::std::mem::offset_of!(AMediaDrmKeyValuePair, mKey) - 0usize]; + ["Offset of field: AMediaDrmKeyValuePair::mValue"] + [::std::mem::offset_of!(AMediaDrmKeyValuePair, mValue) - 8usize]; +}; pub type AMediaDrmKeyValue = AMediaDrmKeyValuePair; impl AMediaKeyStatusType { pub const KEY_STATUS_TYPE_USABLE: AMediaKeyStatusType = AMediaKeyStatusType(0); @@ -24430,41 +18234,15 @@ pub struct AMediaDrmKeyStatus { pub keyId: AMediaDrmKeyId, pub keyType: AMediaDrmKeyStatusType, } -#[test] -fn bindgen_test_layout_AMediaDrmKeyStatus() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(AMediaDrmKeyStatus)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AMediaDrmKeyStatus)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).keyId) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AMediaDrmKeyStatus), - "::", - stringify!(keyId) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).keyType) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AMediaDrmKeyStatus), - "::", - stringify!(keyType) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AMediaDrmKeyStatus"][::std::mem::size_of::() - 24usize]; + ["Alignment of AMediaDrmKeyStatus"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AMediaDrmKeyStatus::keyId"] + [::std::mem::offset_of!(AMediaDrmKeyStatus, keyId) - 0usize]; + ["Offset of field: AMediaDrmKeyStatus::keyType"] + [::std::mem::offset_of!(AMediaDrmKeyStatus, keyType) - 16usize]; +}; pub type AMediaDrmEventListener = ::std::option::Option< unsafe extern "C" fn( arg1: *mut AMediaDrm, @@ -24790,92 +18568,28 @@ pub struct PsshEntry { pub datalen: usize, pub data: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout_PsshEntry() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(PsshEntry)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(PsshEntry)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uuid) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(PsshEntry), - "::", - stringify!(uuid) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).datalen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(PsshEntry), - "::", - stringify!(datalen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(PsshEntry), - "::", - stringify!(data) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of PsshEntry"][::std::mem::size_of::() - 32usize]; + ["Alignment of PsshEntry"][::std::mem::align_of::() - 8usize]; + ["Offset of field: PsshEntry::uuid"][::std::mem::offset_of!(PsshEntry, uuid) - 0usize]; + ["Offset of field: PsshEntry::datalen"][::std::mem::offset_of!(PsshEntry, datalen) - 16usize]; + ["Offset of field: PsshEntry::data"][::std::mem::offset_of!(PsshEntry, data) - 24usize]; +}; #[repr(C)] #[derive(Debug)] pub struct PsshInfo { pub numentries: usize, pub entries: __IncompleteArrayField, } -#[test] -fn bindgen_test_layout_PsshInfo() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(PsshInfo)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(PsshInfo)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).numentries) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(PsshInfo), - "::", - stringify!(numentries) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).entries) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(PsshInfo), - "::", - stringify!(entries) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of PsshInfo"][::std::mem::size_of::() - 8usize]; + ["Alignment of PsshInfo"][::std::mem::align_of::() - 8usize]; + ["Offset of field: PsshInfo::numentries"] + [::std::mem::offset_of!(PsshInfo, numentries) - 0usize]; + ["Offset of field: PsshInfo::entries"][::std::mem::offset_of!(PsshInfo, entries) - 8usize]; +}; extern "C" { pub fn AMediaExtractor_getPsshInfo(arg1: *mut AMediaExtractor) -> *mut PsshInfo; } diff --git a/ndk-sys/src/ffi_arm.rs b/ndk-sys/src/ffi_arm.rs index 64fce589..999a7adb 100644 --- a/ndk-sys/src/ffi_arm.rs +++ b/ndk-sys/src/ffi_arm.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.69.4 */ +/* automatically generated by rust-bindgen 0.70.1 */ #[repr(C)] #[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] @@ -1419,41 +1419,15 @@ pub struct max_align_t { pub __clang_max_align_nonce1: ::std::os::raw::c_longlong, pub __clang_max_align_nonce2: f64, } -#[test] -fn bindgen_test_layout_max_align_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(max_align_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(max_align_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__clang_max_align_nonce1) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(max_align_t), - "::", - stringify!(__clang_max_align_nonce1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__clang_max_align_nonce2) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(max_align_t), - "::", - stringify!(__clang_max_align_nonce2) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of max_align_t"][::std::mem::size_of::() - 16usize]; + ["Alignment of max_align_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: max_align_t::__clang_max_align_nonce1"] + [::std::mem::offset_of!(max_align_t, __clang_max_align_nonce1) - 0usize]; + ["Offset of field: max_align_t::__clang_max_align_nonce2"] + [::std::mem::offset_of!(max_align_t, __clang_max_align_nonce2) - 8usize]; +}; pub type __int8_t = ::std::os::raw::c_schar; pub type __uint8_t = ::std::os::raw::c_uchar; pub type __int16_t = ::std::os::raw::c_short; @@ -1495,31 +1469,13 @@ pub type __u64 = ::std::os::raw::c_ulonglong; pub struct __kernel_fd_set { pub fds_bits: [::std::os::raw::c_ulong; 32usize], } -#[test] -fn bindgen_test_layout___kernel_fd_set() { - const UNINIT: ::std::mem::MaybeUninit<__kernel_fd_set> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__kernel_fd_set>(), - 128usize, - concat!("Size of: ", stringify!(__kernel_fd_set)) - ); - assert_eq!( - ::std::mem::align_of::<__kernel_fd_set>(), - 4usize, - concat!("Alignment of ", stringify!(__kernel_fd_set)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fds_bits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__kernel_fd_set), - "::", - stringify!(fds_bits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __kernel_fd_set"][::std::mem::size_of::<__kernel_fd_set>() - 128usize]; + ["Alignment of __kernel_fd_set"][::std::mem::align_of::<__kernel_fd_set>() - 4usize]; + ["Offset of field: __kernel_fd_set::fds_bits"] + [::std::mem::offset_of!(__kernel_fd_set, fds_bits) - 0usize]; +}; pub type __kernel_sighandler_t = ::std::option::Option; pub type __kernel_key_t = ::std::os::raw::c_int; @@ -1547,31 +1503,13 @@ pub type __kernel_ptrdiff_t = ::std::os::raw::c_int; pub struct __kernel_fsid_t { pub val: [::std::os::raw::c_int; 2usize], } -#[test] -fn bindgen_test_layout___kernel_fsid_t() { - const UNINIT: ::std::mem::MaybeUninit<__kernel_fsid_t> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__kernel_fsid_t>(), - 8usize, - concat!("Size of: ", stringify!(__kernel_fsid_t)) - ); - assert_eq!( - ::std::mem::align_of::<__kernel_fsid_t>(), - 4usize, - concat!("Alignment of ", stringify!(__kernel_fsid_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).val) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__kernel_fsid_t), - "::", - stringify!(val) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __kernel_fsid_t"][::std::mem::size_of::<__kernel_fsid_t>() - 8usize]; + ["Alignment of __kernel_fsid_t"][::std::mem::align_of::<__kernel_fsid_t>() - 4usize]; + ["Offset of field: __kernel_fsid_t::val"] + [::std::mem::offset_of!(__kernel_fsid_t, val) - 0usize]; +}; pub type __kernel_off_t = __kernel_long_t; pub type __kernel_loff_t = ::std::os::raw::c_longlong; pub type __kernel_old_time_t = __kernel_long_t; @@ -1602,142 +1540,48 @@ pub struct pthread_attr_t { pub sched_policy: i32, pub sched_priority: i32, } -#[test] -fn bindgen_test_layout_pthread_attr_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(pthread_attr_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(pthread_attr_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_attr_t), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).stack_base) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(pthread_attr_t), - "::", - stringify!(stack_base) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).stack_size) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(pthread_attr_t), - "::", - stringify!(stack_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).guard_size) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(pthread_attr_t), - "::", - stringify!(guard_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sched_policy) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(pthread_attr_t), - "::", - stringify!(sched_policy) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sched_priority) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(pthread_attr_t), - "::", - stringify!(sched_priority) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of pthread_attr_t"][::std::mem::size_of::() - 24usize]; + ["Alignment of pthread_attr_t"][::std::mem::align_of::() - 4usize]; + ["Offset of field: pthread_attr_t::flags"] + [::std::mem::offset_of!(pthread_attr_t, flags) - 0usize]; + ["Offset of field: pthread_attr_t::stack_base"] + [::std::mem::offset_of!(pthread_attr_t, stack_base) - 4usize]; + ["Offset of field: pthread_attr_t::stack_size"] + [::std::mem::offset_of!(pthread_attr_t, stack_size) - 8usize]; + ["Offset of field: pthread_attr_t::guard_size"] + [::std::mem::offset_of!(pthread_attr_t, guard_size) - 12usize]; + ["Offset of field: pthread_attr_t::sched_policy"] + [::std::mem::offset_of!(pthread_attr_t, sched_policy) - 16usize]; + ["Offset of field: pthread_attr_t::sched_priority"] + [::std::mem::offset_of!(pthread_attr_t, sched_priority) - 20usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct pthread_barrier_t { pub __private: [i32; 8usize], } -#[test] -fn bindgen_test_layout_pthread_barrier_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(pthread_barrier_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(pthread_barrier_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__private) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_barrier_t), - "::", - stringify!(__private) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of pthread_barrier_t"][::std::mem::size_of::() - 32usize]; + ["Alignment of pthread_barrier_t"][::std::mem::align_of::() - 4usize]; + ["Offset of field: pthread_barrier_t::__private"] + [::std::mem::offset_of!(pthread_barrier_t, __private) - 0usize]; +}; pub type pthread_barrierattr_t = ::std::os::raw::c_int; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct pthread_cond_t { pub __private: [i32; 1usize], } -#[test] -fn bindgen_test_layout_pthread_cond_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(pthread_cond_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(pthread_cond_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__private) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_cond_t), - "::", - stringify!(__private) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of pthread_cond_t"][::std::mem::size_of::() - 4usize]; + ["Alignment of pthread_cond_t"][::std::mem::align_of::() - 4usize]; + ["Offset of field: pthread_cond_t::__private"] + [::std::mem::offset_of!(pthread_cond_t, __private) - 0usize]; +}; pub type pthread_condattr_t = ::std::os::raw::c_long; pub type pthread_key_t = ::std::os::raw::c_int; #[repr(C)] @@ -1745,31 +1589,13 @@ pub type pthread_key_t = ::std::os::raw::c_int; pub struct pthread_mutex_t { pub __private: [i32; 1usize], } -#[test] -fn bindgen_test_layout_pthread_mutex_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(pthread_mutex_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(pthread_mutex_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__private) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_mutex_t), - "::", - stringify!(__private) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of pthread_mutex_t"][::std::mem::size_of::() - 4usize]; + ["Alignment of pthread_mutex_t"][::std::mem::align_of::() - 4usize]; + ["Offset of field: pthread_mutex_t::__private"] + [::std::mem::offset_of!(pthread_mutex_t, __private) - 0usize]; +}; pub type pthread_mutexattr_t = ::std::os::raw::c_long; pub type pthread_once_t = ::std::os::raw::c_int; #[repr(C)] @@ -1777,62 +1603,26 @@ pub type pthread_once_t = ::std::os::raw::c_int; pub struct pthread_rwlock_t { pub __private: [i32; 10usize], } -#[test] -fn bindgen_test_layout_pthread_rwlock_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(pthread_rwlock_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(pthread_rwlock_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__private) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_rwlock_t), - "::", - stringify!(__private) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of pthread_rwlock_t"][::std::mem::size_of::() - 40usize]; + ["Alignment of pthread_rwlock_t"][::std::mem::align_of::() - 4usize]; + ["Offset of field: pthread_rwlock_t::__private"] + [::std::mem::offset_of!(pthread_rwlock_t, __private) - 0usize]; +}; pub type pthread_rwlockattr_t = ::std::os::raw::c_long; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct pthread_spinlock_t { pub __private: [i32; 2usize], } -#[test] -fn bindgen_test_layout_pthread_spinlock_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(pthread_spinlock_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(pthread_spinlock_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__private) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_spinlock_t), - "::", - stringify!(__private) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of pthread_spinlock_t"][::std::mem::size_of::() - 8usize]; + ["Alignment of pthread_spinlock_t"][::std::mem::align_of::() - 4usize]; + ["Offset of field: pthread_spinlock_t::__private"] + [::std::mem::offset_of!(pthread_spinlock_t, __private) - 0usize]; +}; pub type pthread_t = ::std::os::raw::c_long; pub type __gid_t = __kernel_gid32_t; pub type gid_t = __gid_t; @@ -1987,92 +1777,32 @@ pub struct JavaVMAttachArgs { pub name: *const ::std::os::raw::c_char, pub group: jobject, } -#[test] -fn bindgen_test_layout_JavaVMAttachArgs() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(JavaVMAttachArgs)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(JavaVMAttachArgs)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(JavaVMAttachArgs), - "::", - stringify!(version) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(JavaVMAttachArgs), - "::", - stringify!(name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).group) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(JavaVMAttachArgs), - "::", - stringify!(group) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of JavaVMAttachArgs"][::std::mem::size_of::() - 12usize]; + ["Alignment of JavaVMAttachArgs"][::std::mem::align_of::() - 4usize]; + ["Offset of field: JavaVMAttachArgs::version"] + [::std::mem::offset_of!(JavaVMAttachArgs, version) - 0usize]; + ["Offset of field: JavaVMAttachArgs::name"] + [::std::mem::offset_of!(JavaVMAttachArgs, name) - 4usize]; + ["Offset of field: JavaVMAttachArgs::group"] + [::std::mem::offset_of!(JavaVMAttachArgs, group) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct JavaVMOption { pub optionString: *const ::std::os::raw::c_char, pub extraInfo: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout_JavaVMOption() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(JavaVMOption)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(JavaVMOption)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).optionString) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(JavaVMOption), - "::", - stringify!(optionString) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).extraInfo) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(JavaVMOption), - "::", - stringify!(extraInfo) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of JavaVMOption"][::std::mem::size_of::() - 8usize]; + ["Alignment of JavaVMOption"][::std::mem::align_of::() - 4usize]; + ["Offset of field: JavaVMOption::optionString"] + [::std::mem::offset_of!(JavaVMOption, optionString) - 0usize]; + ["Offset of field: JavaVMOption::extraInfo"] + [::std::mem::offset_of!(JavaVMOption, extraInfo) - 4usize]; +}; #[repr(C)] pub struct JavaVMInitArgs { pub version: jint, @@ -2080,61 +1810,19 @@ pub struct JavaVMInitArgs { pub options: *mut JavaVMOption, pub ignoreUnrecognized: jboolean, } -#[test] -fn bindgen_test_layout_JavaVMInitArgs() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(JavaVMInitArgs)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(JavaVMInitArgs)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(JavaVMInitArgs), - "::", - stringify!(version) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nOptions) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(JavaVMInitArgs), - "::", - stringify!(nOptions) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).options) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(JavaVMInitArgs), - "::", - stringify!(options) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ignoreUnrecognized) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(JavaVMInitArgs), - "::", - stringify!(ignoreUnrecognized) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of JavaVMInitArgs"][::std::mem::size_of::() - 16usize]; + ["Alignment of JavaVMInitArgs"][::std::mem::align_of::() - 4usize]; + ["Offset of field: JavaVMInitArgs::version"] + [::std::mem::offset_of!(JavaVMInitArgs, version) - 0usize]; + ["Offset of field: JavaVMInitArgs::nOptions"] + [::std::mem::offset_of!(JavaVMInitArgs, nOptions) - 4usize]; + ["Offset of field: JavaVMInitArgs::options"] + [::std::mem::offset_of!(JavaVMInitArgs, options) - 8usize]; + ["Offset of field: JavaVMInitArgs::ignoreUnrecognized"] + [::std::mem::offset_of!(JavaVMInitArgs, ignoreUnrecognized) - 12usize]; +}; extern "C" { pub fn AAssetManager_fromJava(env: *mut JNIEnv, assetManager: jobject) -> *mut AAssetManager; } @@ -2184,71 +1872,21 @@ pub struct AndroidBitmapInfo { pub format: i32, pub flags: u32, } -#[test] -fn bindgen_test_layout_AndroidBitmapInfo() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 20usize, - concat!("Size of: ", stringify!(AndroidBitmapInfo)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AndroidBitmapInfo)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AndroidBitmapInfo), - "::", - stringify!(width) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AndroidBitmapInfo), - "::", - stringify!(height) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).stride) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AndroidBitmapInfo), - "::", - stringify!(stride) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).format) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(AndroidBitmapInfo), - "::", - stringify!(format) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AndroidBitmapInfo), - "::", - stringify!(flags) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AndroidBitmapInfo"][::std::mem::size_of::() - 20usize]; + ["Alignment of AndroidBitmapInfo"][::std::mem::align_of::() - 4usize]; + ["Offset of field: AndroidBitmapInfo::width"] + [::std::mem::offset_of!(AndroidBitmapInfo, width) - 0usize]; + ["Offset of field: AndroidBitmapInfo::height"] + [::std::mem::offset_of!(AndroidBitmapInfo, height) - 4usize]; + ["Offset of field: AndroidBitmapInfo::stride"] + [::std::mem::offset_of!(AndroidBitmapInfo, stride) - 8usize]; + ["Offset of field: AndroidBitmapInfo::format"] + [::std::mem::offset_of!(AndroidBitmapInfo, format) - 12usize]; + ["Offset of field: AndroidBitmapInfo::flags"] + [::std::mem::offset_of!(AndroidBitmapInfo, flags) - 16usize]; +}; extern "C" { pub fn AndroidBitmap_getInfo( env: *mut JNIEnv, @@ -2703,41 +2341,13 @@ pub struct imaxdiv_t { pub quot: intmax_t, pub rem: intmax_t, } -#[test] -fn bindgen_test_layout_imaxdiv_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(imaxdiv_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(imaxdiv_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).quot) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(imaxdiv_t), - "::", - stringify!(quot) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rem) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(imaxdiv_t), - "::", - stringify!(rem) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of imaxdiv_t"][::std::mem::size_of::() - 16usize]; + ["Alignment of imaxdiv_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: imaxdiv_t::quot"][::std::mem::offset_of!(imaxdiv_t, quot) - 0usize]; + ["Offset of field: imaxdiv_t::rem"][::std::mem::offset_of!(imaxdiv_t, rem) - 8usize]; +}; extern "C" { pub fn imaxabs(__i: intmax_t) -> intmax_t; } @@ -2943,91 +2553,25 @@ pub struct android_dlextinfo { pub library_fd_offset: off64_t, pub library_namespace: *mut android_namespace_t, } -#[test] -fn bindgen_test_layout_android_dlextinfo() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(android_dlextinfo)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(android_dlextinfo)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(android_dlextinfo), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved_addr) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(android_dlextinfo), - "::", - stringify!(reserved_addr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved_size) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(android_dlextinfo), - "::", - stringify!(reserved_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).relro_fd) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(android_dlextinfo), - "::", - stringify!(relro_fd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).library_fd) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(android_dlextinfo), - "::", - stringify!(library_fd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).library_fd_offset) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(android_dlextinfo), - "::", - stringify!(library_fd_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).library_namespace) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(android_dlextinfo), - "::", - stringify!(library_namespace) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of android_dlextinfo"][::std::mem::size_of::() - 40usize]; + ["Alignment of android_dlextinfo"][::std::mem::align_of::() - 8usize]; + ["Offset of field: android_dlextinfo::flags"] + [::std::mem::offset_of!(android_dlextinfo, flags) - 0usize]; + ["Offset of field: android_dlextinfo::reserved_addr"] + [::std::mem::offset_of!(android_dlextinfo, reserved_addr) - 8usize]; + ["Offset of field: android_dlextinfo::reserved_size"] + [::std::mem::offset_of!(android_dlextinfo, reserved_size) - 12usize]; + ["Offset of field: android_dlextinfo::relro_fd"] + [::std::mem::offset_of!(android_dlextinfo, relro_fd) - 16usize]; + ["Offset of field: android_dlextinfo::library_fd"] + [::std::mem::offset_of!(android_dlextinfo, library_fd) - 20usize]; + ["Offset of field: android_dlextinfo::library_fd_offset"] + [::std::mem::offset_of!(android_dlextinfo, library_fd_offset) - 24usize]; + ["Offset of field: android_dlextinfo::library_namespace"] + [::std::mem::offset_of!(android_dlextinfo, library_namespace) - 32usize]; +}; extern "C" { pub fn android_dlopen_ext( __filename: *const ::std::os::raw::c_char, @@ -3261,61 +2805,15 @@ pub struct ARect { pub right: i32, pub bottom: i32, } -#[test] -fn bindgen_test_layout_ARect() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(ARect)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(ARect)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).left) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ARect), - "::", - stringify!(left) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).top) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ARect), - "::", - stringify!(top) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).right) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ARect), - "::", - stringify!(right) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bottom) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(ARect), - "::", - stringify!(bottom) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ARect"][::std::mem::size_of::() - 16usize]; + ["Alignment of ARect"][::std::mem::align_of::() - 4usize]; + ["Offset of field: ARect::left"][::std::mem::offset_of!(ARect, left) - 0usize]; + ["Offset of field: ARect::top"][::std::mem::offset_of!(ARect, top) - 4usize]; + ["Offset of field: ARect::right"][::std::mem::offset_of!(ARect, right) - 8usize]; + ["Offset of field: ARect::bottom"][::std::mem::offset_of!(ARect, bottom) - 12usize]; +}; impl AHardwareBuffer_Format { pub const AHARDWAREBUFFER_FORMAT_R8G8B8A8_UNORM: AHardwareBuffer_Format = AHardwareBuffer_Format(1); @@ -3559,101 +3057,27 @@ pub struct AHardwareBuffer_Desc { pub rfu0: u32, pub rfu1: u64, } -#[test] -fn bindgen_test_layout_AHardwareBuffer_Desc() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(AHardwareBuffer_Desc)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AHardwareBuffer_Desc)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Desc), - "::", - stringify!(width) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Desc), - "::", - stringify!(height) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).layers) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Desc), - "::", - stringify!(layers) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).format) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Desc), - "::", - stringify!(format) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).usage) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Desc), - "::", - stringify!(usage) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).stride) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Desc), - "::", - stringify!(stride) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rfu0) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Desc), - "::", - stringify!(rfu0) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rfu1) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Desc), - "::", - stringify!(rfu1) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AHardwareBuffer_Desc"][::std::mem::size_of::() - 40usize]; + ["Alignment of AHardwareBuffer_Desc"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AHardwareBuffer_Desc::width"] + [::std::mem::offset_of!(AHardwareBuffer_Desc, width) - 0usize]; + ["Offset of field: AHardwareBuffer_Desc::height"] + [::std::mem::offset_of!(AHardwareBuffer_Desc, height) - 4usize]; + ["Offset of field: AHardwareBuffer_Desc::layers"] + [::std::mem::offset_of!(AHardwareBuffer_Desc, layers) - 8usize]; + ["Offset of field: AHardwareBuffer_Desc::format"] + [::std::mem::offset_of!(AHardwareBuffer_Desc, format) - 12usize]; + ["Offset of field: AHardwareBuffer_Desc::usage"] + [::std::mem::offset_of!(AHardwareBuffer_Desc, usage) - 16usize]; + ["Offset of field: AHardwareBuffer_Desc::stride"] + [::std::mem::offset_of!(AHardwareBuffer_Desc, stride) - 24usize]; + ["Offset of field: AHardwareBuffer_Desc::rfu0"] + [::std::mem::offset_of!(AHardwareBuffer_Desc, rfu0) - 28usize]; + ["Offset of field: AHardwareBuffer_Desc::rfu1"] + [::std::mem::offset_of!(AHardwareBuffer_Desc, rfu1) - 32usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct AHardwareBuffer_Plane { @@ -3661,94 +3085,34 @@ pub struct AHardwareBuffer_Plane { pub pixelStride: u32, pub rowStride: u32, } -#[test] -fn bindgen_test_layout_AHardwareBuffer_Plane() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(AHardwareBuffer_Plane)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AHardwareBuffer_Plane)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Plane), - "::", - stringify!(data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pixelStride) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Plane), - "::", - stringify!(pixelStride) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rowStride) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Plane), - "::", - stringify!(rowStride) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AHardwareBuffer_Plane"][::std::mem::size_of::() - 12usize]; + ["Alignment of AHardwareBuffer_Plane"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: AHardwareBuffer_Plane::data"] + [::std::mem::offset_of!(AHardwareBuffer_Plane, data) - 0usize]; + ["Offset of field: AHardwareBuffer_Plane::pixelStride"] + [::std::mem::offset_of!(AHardwareBuffer_Plane, pixelStride) - 4usize]; + ["Offset of field: AHardwareBuffer_Plane::rowStride"] + [::std::mem::offset_of!(AHardwareBuffer_Plane, rowStride) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct AHardwareBuffer_Planes { pub planeCount: u32, pub planes: [AHardwareBuffer_Plane; 4usize], } -#[test] -fn bindgen_test_layout_AHardwareBuffer_Planes() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 52usize, - concat!("Size of: ", stringify!(AHardwareBuffer_Planes)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AHardwareBuffer_Planes)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).planeCount) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Planes), - "::", - stringify!(planeCount) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).planes) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Planes), - "::", - stringify!(planes) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AHardwareBuffer_Planes"][::std::mem::size_of::() - 52usize]; + ["Alignment of AHardwareBuffer_Planes"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: AHardwareBuffer_Planes::planeCount"] + [::std::mem::offset_of!(AHardwareBuffer_Planes, planeCount) - 0usize]; + ["Offset of field: AHardwareBuffer_Planes::planes"] + [::std::mem::offset_of!(AHardwareBuffer_Planes, planes) - 4usize]; +}; extern "C" { pub fn AHardwareBuffer_allocate( desc: *const AHardwareBuffer_Desc, @@ -3853,41 +3217,13 @@ pub struct AColor_xy { pub x: f32, pub y: f32, } -#[test] -fn bindgen_test_layout_AColor_xy() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(AColor_xy)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AColor_xy)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AColor_xy), - "::", - stringify!(x) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AColor_xy), - "::", - stringify!(y) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AColor_xy"][::std::mem::size_of::() - 8usize]; + ["Alignment of AColor_xy"][::std::mem::align_of::() - 4usize]; + ["Offset of field: AColor_xy::x"][::std::mem::offset_of!(AColor_xy, x) - 0usize]; + ["Offset of field: AColor_xy::y"][::std::mem::offset_of!(AColor_xy, y) - 4usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct AHdrMetadata_smpte2086 { @@ -3898,124 +3234,40 @@ pub struct AHdrMetadata_smpte2086 { pub maxLuminance: f32, pub minLuminance: f32, } -#[test] -fn bindgen_test_layout_AHdrMetadata_smpte2086() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(AHdrMetadata_smpte2086)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AHdrMetadata_smpte2086)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).displayPrimaryRed) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AHdrMetadata_smpte2086), - "::", - stringify!(displayPrimaryRed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).displayPrimaryGreen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AHdrMetadata_smpte2086), - "::", - stringify!(displayPrimaryGreen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).displayPrimaryBlue) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AHdrMetadata_smpte2086), - "::", - stringify!(displayPrimaryBlue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).whitePoint) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(AHdrMetadata_smpte2086), - "::", - stringify!(whitePoint) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).maxLuminance) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(AHdrMetadata_smpte2086), - "::", - stringify!(maxLuminance) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).minLuminance) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(AHdrMetadata_smpte2086), - "::", - stringify!(minLuminance) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AHdrMetadata_smpte2086"][::std::mem::size_of::() - 40usize]; + ["Alignment of AHdrMetadata_smpte2086"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: AHdrMetadata_smpte2086::displayPrimaryRed"] + [::std::mem::offset_of!(AHdrMetadata_smpte2086, displayPrimaryRed) - 0usize]; + ["Offset of field: AHdrMetadata_smpte2086::displayPrimaryGreen"] + [::std::mem::offset_of!(AHdrMetadata_smpte2086, displayPrimaryGreen) - 8usize]; + ["Offset of field: AHdrMetadata_smpte2086::displayPrimaryBlue"] + [::std::mem::offset_of!(AHdrMetadata_smpte2086, displayPrimaryBlue) - 16usize]; + ["Offset of field: AHdrMetadata_smpte2086::whitePoint"] + [::std::mem::offset_of!(AHdrMetadata_smpte2086, whitePoint) - 24usize]; + ["Offset of field: AHdrMetadata_smpte2086::maxLuminance"] + [::std::mem::offset_of!(AHdrMetadata_smpte2086, maxLuminance) - 32usize]; + ["Offset of field: AHdrMetadata_smpte2086::minLuminance"] + [::std::mem::offset_of!(AHdrMetadata_smpte2086, minLuminance) - 36usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct AHdrMetadata_cta861_3 { pub maxContentLightLevel: f32, pub maxFrameAverageLightLevel: f32, } -#[test] -fn bindgen_test_layout_AHdrMetadata_cta861_3() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(AHdrMetadata_cta861_3)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AHdrMetadata_cta861_3)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).maxContentLightLevel) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AHdrMetadata_cta861_3), - "::", - stringify!(maxContentLightLevel) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).maxFrameAverageLightLevel) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AHdrMetadata_cta861_3), - "::", - stringify!(maxFrameAverageLightLevel) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AHdrMetadata_cta861_3"][::std::mem::size_of::() - 8usize]; + ["Alignment of AHdrMetadata_cta861_3"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: AHdrMetadata_cta861_3::maxContentLightLevel"] + [::std::mem::offset_of!(AHdrMetadata_cta861_3, maxContentLightLevel) - 0usize]; + ["Offset of field: AHdrMetadata_cta861_3::maxFrameAverageLightLevel"] + [::std::mem::offset_of!(AHdrMetadata_cta861_3, maxFrameAverageLightLevel) - 4usize]; +}; pub const ANDROID_IMAGE_DECODER_SUCCESS: _bindgen_ty_9 = 0; pub const ANDROID_IMAGE_DECODER_INCOMPLETE: _bindgen_ty_9 = -1; pub const ANDROID_IMAGE_DECODER_ERROR: _bindgen_ty_9 = -2; @@ -5200,92 +4452,26 @@ pub struct __android_log_message { pub line: u32, pub message: *const ::std::os::raw::c_char, } -#[test] -fn bindgen_test_layout___android_log_message() { - const UNINIT: ::std::mem::MaybeUninit<__android_log_message> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__android_log_message>(), - 28usize, - concat!("Size of: ", stringify!(__android_log_message)) - ); - assert_eq!( - ::std::mem::align_of::<__android_log_message>(), - 4usize, - concat!("Alignment of ", stringify!(__android_log_message)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).struct_size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__android_log_message), - "::", - stringify!(struct_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).buffer_id) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__android_log_message), - "::", - stringify!(buffer_id) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).priority) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__android_log_message), - "::", - stringify!(priority) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tag) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(__android_log_message), - "::", - stringify!(tag) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).file) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__android_log_message), - "::", - stringify!(file) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).line) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(__android_log_message), - "::", - stringify!(line) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).message) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(__android_log_message), - "::", - stringify!(message) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __android_log_message"][::std::mem::size_of::<__android_log_message>() - 28usize]; + ["Alignment of __android_log_message"] + [::std::mem::align_of::<__android_log_message>() - 4usize]; + ["Offset of field: __android_log_message::struct_size"] + [::std::mem::offset_of!(__android_log_message, struct_size) - 0usize]; + ["Offset of field: __android_log_message::buffer_id"] + [::std::mem::offset_of!(__android_log_message, buffer_id) - 4usize]; + ["Offset of field: __android_log_message::priority"] + [::std::mem::offset_of!(__android_log_message, priority) - 8usize]; + ["Offset of field: __android_log_message::tag"] + [::std::mem::offset_of!(__android_log_message, tag) - 12usize]; + ["Offset of field: __android_log_message::file"] + [::std::mem::offset_of!(__android_log_message, file) - 16usize]; + ["Offset of field: __android_log_message::line"] + [::std::mem::offset_of!(__android_log_message, line) - 20usize]; + ["Offset of field: __android_log_message::message"] + [::std::mem::offset_of!(__android_log_message, message) - 24usize]; +}; pub type __android_logger_function = ::std::option::Option; pub type __android_aborter_function = @@ -5344,71 +4530,16 @@ pub struct flock { pub l_len: off_t, pub l_pid: pid_t, } -#[test] -fn bindgen_test_layout_flock() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(flock)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(flock)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).l_type) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(flock), - "::", - stringify!(l_type) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).l_whence) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(flock), - "::", - stringify!(l_whence) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).l_start) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(flock), - "::", - stringify!(l_start) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).l_len) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(flock), - "::", - stringify!(l_len) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).l_pid) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(flock), - "::", - stringify!(l_pid) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of flock"][::std::mem::size_of::() - 16usize]; + ["Alignment of flock"][::std::mem::align_of::() - 4usize]; + ["Offset of field: flock::l_type"][::std::mem::offset_of!(flock, l_type) - 0usize]; + ["Offset of field: flock::l_whence"][::std::mem::offset_of!(flock, l_whence) - 2usize]; + ["Offset of field: flock::l_start"][::std::mem::offset_of!(flock, l_start) - 4usize]; + ["Offset of field: flock::l_len"][::std::mem::offset_of!(flock, l_len) - 8usize]; + ["Offset of field: flock::l_pid"][::std::mem::offset_of!(flock, l_pid) - 12usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct flock64 { @@ -5418,153 +4549,42 @@ pub struct flock64 { pub l_len: off64_t, pub l_pid: pid_t, } -#[test] -fn bindgen_test_layout_flock64() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(flock64)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(flock64)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).l_type) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(flock64), - "::", - stringify!(l_type) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).l_whence) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(flock64), - "::", - stringify!(l_whence) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).l_start) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(flock64), - "::", - stringify!(l_start) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).l_len) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(flock64), - "::", - stringify!(l_len) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).l_pid) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(flock64), - "::", - stringify!(l_pid) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of flock64"][::std::mem::size_of::() - 32usize]; + ["Alignment of flock64"][::std::mem::align_of::() - 8usize]; + ["Offset of field: flock64::l_type"][::std::mem::offset_of!(flock64, l_type) - 0usize]; + ["Offset of field: flock64::l_whence"][::std::mem::offset_of!(flock64, l_whence) - 2usize]; + ["Offset of field: flock64::l_start"][::std::mem::offset_of!(flock64, l_start) - 8usize]; + ["Offset of field: flock64::l_len"][::std::mem::offset_of!(flock64, l_len) - 16usize]; + ["Offset of field: flock64::l_pid"][::std::mem::offset_of!(flock64, l_pid) - 24usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct f_owner_ex { pub type_: ::std::os::raw::c_int, pub pid: __kernel_pid_t, } -#[test] -fn bindgen_test_layout_f_owner_ex() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(f_owner_ex)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(f_owner_ex)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(f_owner_ex), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pid) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(f_owner_ex), - "::", - stringify!(pid) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of f_owner_ex"][::std::mem::size_of::() - 8usize]; + ["Alignment of f_owner_ex"][::std::mem::align_of::() - 4usize]; + ["Offset of field: f_owner_ex::type_"][::std::mem::offset_of!(f_owner_ex, type_) - 0usize]; + ["Offset of field: f_owner_ex::pid"][::std::mem::offset_of!(f_owner_ex, pid) - 4usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct iovec { pub iov_base: *mut ::std::os::raw::c_void, pub iov_len: __kernel_size_t, } -#[test] -fn bindgen_test_layout_iovec() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(iovec)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(iovec)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iov_base) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(iovec), - "::", - stringify!(iov_base) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iov_len) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(iovec), - "::", - stringify!(iov_len) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of iovec"][::std::mem::size_of::() - 8usize]; + ["Alignment of iovec"][::std::mem::align_of::() - 4usize]; + ["Offset of field: iovec::iov_base"][::std::mem::offset_of!(iovec, iov_base) - 0usize]; + ["Offset of field: iovec::iov_len"][::std::mem::offset_of!(iovec, iov_len) - 4usize]; +}; pub type sa_family_t = ::std::os::raw::c_ushort; #[repr(C)] #[derive(Copy, Clone)] @@ -5583,87 +4603,31 @@ pub struct sockaddr_storage__bindgen_ty_1__bindgen_ty_1 { pub ss_family: sa_family_t, pub __data: [::std::os::raw::c_char; 126usize], } -#[test] -fn bindgen_test_layout_sockaddr_storage__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 128usize, - concat!( - "Size of: ", - stringify!(sockaddr_storage__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 2usize, - concat!( - "Alignment of ", - stringify!(sockaddr_storage__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ss_family) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sockaddr_storage__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(ss_family) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__data) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(sockaddr_storage__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(__data) - ) - ); -} -#[test] -fn bindgen_test_layout_sockaddr_storage__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 128usize, - concat!("Size of: ", stringify!(sockaddr_storage__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(sockaddr_storage__bindgen_ty_1)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__align) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sockaddr_storage__bindgen_ty_1), - "::", - stringify!(__align) - ) - ); -} -#[test] -fn bindgen_test_layout_sockaddr_storage() { - assert_eq!( - ::std::mem::size_of::(), - 128usize, - concat!("Size of: ", stringify!(sockaddr_storage)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(sockaddr_storage)) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sockaddr_storage__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::size_of::() - 128usize]; + ["Alignment of sockaddr_storage__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::align_of::() - 2usize]; + ["Offset of field: sockaddr_storage__bindgen_ty_1__bindgen_ty_1::ss_family"] + [::std::mem::offset_of!(sockaddr_storage__bindgen_ty_1__bindgen_ty_1, ss_family) - 0usize]; + ["Offset of field: sockaddr_storage__bindgen_ty_1__bindgen_ty_1::__data"] + [::std::mem::offset_of!(sockaddr_storage__bindgen_ty_1__bindgen_ty_1, __data) - 2usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sockaddr_storage__bindgen_ty_1"] + [::std::mem::size_of::() - 128usize]; + ["Alignment of sockaddr_storage__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: sockaddr_storage__bindgen_ty_1::__align"] + [::std::mem::offset_of!(sockaddr_storage__bindgen_ty_1, __align) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sockaddr_storage"][::std::mem::size_of::() - 128usize]; + ["Alignment of sockaddr_storage"][::std::mem::align_of::() - 4usize]; +}; pub const SHUT_RD: _bindgen_ty_32 = 0; pub const SHUT_WR: _bindgen_ty_32 = 1; pub const SHUT_RDWR: _bindgen_ty_32 = 2; @@ -5674,82 +4638,26 @@ pub struct sockaddr { pub sa_family: sa_family_t, pub sa_data: [::std::os::raw::c_char; 14usize], } -#[test] -fn bindgen_test_layout_sockaddr() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(sockaddr)) - ); - assert_eq!( - ::std::mem::align_of::(), - 2usize, - concat!("Alignment of ", stringify!(sockaddr)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sa_family) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sockaddr), - "::", - stringify!(sa_family) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sa_data) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(sockaddr), - "::", - stringify!(sa_data) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sockaddr"][::std::mem::size_of::() - 16usize]; + ["Alignment of sockaddr"][::std::mem::align_of::() - 2usize]; + ["Offset of field: sockaddr::sa_family"][::std::mem::offset_of!(sockaddr, sa_family) - 0usize]; + ["Offset of field: sockaddr::sa_data"][::std::mem::offset_of!(sockaddr, sa_data) - 2usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct linger { pub l_onoff: ::std::os::raw::c_int, pub l_linger: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_linger() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(linger)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(linger)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).l_onoff) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(linger), - "::", - stringify!(l_onoff) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).l_linger) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(linger), - "::", - stringify!(l_linger) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of linger"][::std::mem::size_of::() - 8usize]; + ["Alignment of linger"][::std::mem::align_of::() - 4usize]; + ["Offset of field: linger::l_onoff"][::std::mem::offset_of!(linger, l_onoff) - 0usize]; + ["Offset of field: linger::l_linger"][::std::mem::offset_of!(linger, l_linger) - 4usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct msghdr { @@ -5761,132 +4669,32 @@ pub struct msghdr { pub msg_controllen: usize, pub msg_flags: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_msghdr() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 28usize, - concat!("Size of: ", stringify!(msghdr)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(msghdr)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).msg_name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(msghdr), - "::", - stringify!(msg_name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).msg_namelen) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(msghdr), - "::", - stringify!(msg_namelen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).msg_iov) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(msghdr), - "::", - stringify!(msg_iov) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).msg_iovlen) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(msghdr), - "::", - stringify!(msg_iovlen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).msg_control) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(msghdr), - "::", - stringify!(msg_control) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).msg_controllen) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(msghdr), - "::", - stringify!(msg_controllen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).msg_flags) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(msghdr), - "::", - stringify!(msg_flags) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of msghdr"][::std::mem::size_of::() - 28usize]; + ["Alignment of msghdr"][::std::mem::align_of::() - 4usize]; + ["Offset of field: msghdr::msg_name"][::std::mem::offset_of!(msghdr, msg_name) - 0usize]; + ["Offset of field: msghdr::msg_namelen"][::std::mem::offset_of!(msghdr, msg_namelen) - 4usize]; + ["Offset of field: msghdr::msg_iov"][::std::mem::offset_of!(msghdr, msg_iov) - 8usize]; + ["Offset of field: msghdr::msg_iovlen"][::std::mem::offset_of!(msghdr, msg_iovlen) - 12usize]; + ["Offset of field: msghdr::msg_control"][::std::mem::offset_of!(msghdr, msg_control) - 16usize]; + ["Offset of field: msghdr::msg_controllen"] + [::std::mem::offset_of!(msghdr, msg_controllen) - 20usize]; + ["Offset of field: msghdr::msg_flags"][::std::mem::offset_of!(msghdr, msg_flags) - 24usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct mmsghdr { pub msg_hdr: msghdr, pub msg_len: ::std::os::raw::c_uint, } -#[test] -fn bindgen_test_layout_mmsghdr() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(mmsghdr)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(mmsghdr)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).msg_hdr) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(mmsghdr), - "::", - stringify!(msg_hdr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).msg_len) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(mmsghdr), - "::", - stringify!(msg_len) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of mmsghdr"][::std::mem::size_of::() - 32usize]; + ["Alignment of mmsghdr"][::std::mem::align_of::() - 4usize]; + ["Offset of field: mmsghdr::msg_hdr"][::std::mem::offset_of!(mmsghdr, msg_hdr) - 0usize]; + ["Offset of field: mmsghdr::msg_len"][::std::mem::offset_of!(mmsghdr, msg_len) - 28usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct cmsghdr { @@ -5894,51 +4702,14 @@ pub struct cmsghdr { pub cmsg_level: ::std::os::raw::c_int, pub cmsg_type: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_cmsghdr() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(cmsghdr)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(cmsghdr)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cmsg_len) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cmsghdr), - "::", - stringify!(cmsg_len) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cmsg_level) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(cmsghdr), - "::", - stringify!(cmsg_level) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cmsg_type) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cmsghdr), - "::", - stringify!(cmsg_type) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cmsghdr"][::std::mem::size_of::() - 12usize]; + ["Alignment of cmsghdr"][::std::mem::align_of::() - 4usize]; + ["Offset of field: cmsghdr::cmsg_len"][::std::mem::offset_of!(cmsghdr, cmsg_len) - 0usize]; + ["Offset of field: cmsghdr::cmsg_level"][::std::mem::offset_of!(cmsghdr, cmsg_level) - 4usize]; + ["Offset of field: cmsghdr::cmsg_type"][::std::mem::offset_of!(cmsghdr, cmsg_type) - 8usize]; +}; extern "C" { pub fn __cmsg_nxthdr(__msg: *mut msghdr, __cmsg: *mut cmsghdr) -> *mut cmsghdr; } @@ -5949,51 +4720,14 @@ pub struct ucred { pub uid: uid_t, pub gid: gid_t, } -#[test] -fn bindgen_test_layout_ucred() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(ucred)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(ucred)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pid) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ucred), - "::", - stringify!(pid) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uid) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ucred), - "::", - stringify!(uid) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gid) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ucred), - "::", - stringify!(gid) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ucred"][::std::mem::size_of::() - 12usize]; + ["Alignment of ucred"][::std::mem::align_of::() - 4usize]; + ["Offset of field: ucred::pid"][::std::mem::offset_of!(ucred, pid) - 0usize]; + ["Offset of field: ucred::uid"][::std::mem::offset_of!(ucred, uid) - 4usize]; + ["Offset of field: ucred::gid"][::std::mem::offset_of!(ucred, gid) - 8usize]; +}; extern "C" { pub fn accept( __fd: ::std::os::raw::c_int, @@ -6158,71 +4892,17 @@ pub struct hostent { pub h_length: ::std::os::raw::c_int, pub h_addr_list: *mut *mut ::std::os::raw::c_char, } -#[test] -fn bindgen_test_layout_hostent() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 20usize, - concat!("Size of: ", stringify!(hostent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(hostent)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).h_name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(hostent), - "::", - stringify!(h_name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).h_aliases) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(hostent), - "::", - stringify!(h_aliases) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).h_addrtype) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(hostent), - "::", - stringify!(h_addrtype) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).h_length) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(hostent), - "::", - stringify!(h_length) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).h_addr_list) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(hostent), - "::", - stringify!(h_addr_list) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of hostent"][::std::mem::size_of::() - 20usize]; + ["Alignment of hostent"][::std::mem::align_of::() - 4usize]; + ["Offset of field: hostent::h_name"][::std::mem::offset_of!(hostent, h_name) - 0usize]; + ["Offset of field: hostent::h_aliases"][::std::mem::offset_of!(hostent, h_aliases) - 4usize]; + ["Offset of field: hostent::h_addrtype"][::std::mem::offset_of!(hostent, h_addrtype) - 8usize]; + ["Offset of field: hostent::h_length"][::std::mem::offset_of!(hostent, h_length) - 12usize]; + ["Offset of field: hostent::h_addr_list"] + [::std::mem::offset_of!(hostent, h_addr_list) - 16usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct netent { @@ -6231,61 +4911,15 @@ pub struct netent { pub n_addrtype: ::std::os::raw::c_int, pub n_net: u32, } -#[test] -fn bindgen_test_layout_netent() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(netent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(netent)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).n_name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(netent), - "::", - stringify!(n_name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).n_aliases) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(netent), - "::", - stringify!(n_aliases) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).n_addrtype) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(netent), - "::", - stringify!(n_addrtype) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).n_net) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(netent), - "::", - stringify!(n_net) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of netent"][::std::mem::size_of::() - 16usize]; + ["Alignment of netent"][::std::mem::align_of::() - 4usize]; + ["Offset of field: netent::n_name"][::std::mem::offset_of!(netent, n_name) - 0usize]; + ["Offset of field: netent::n_aliases"][::std::mem::offset_of!(netent, n_aliases) - 4usize]; + ["Offset of field: netent::n_addrtype"][::std::mem::offset_of!(netent, n_addrtype) - 8usize]; + ["Offset of field: netent::n_net"][::std::mem::offset_of!(netent, n_net) - 12usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct servent { @@ -6294,61 +4928,15 @@ pub struct servent { pub s_port: ::std::os::raw::c_int, pub s_proto: *mut ::std::os::raw::c_char, } -#[test] -fn bindgen_test_layout_servent() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(servent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(servent)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).s_name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(servent), - "::", - stringify!(s_name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).s_aliases) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(servent), - "::", - stringify!(s_aliases) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).s_port) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(servent), - "::", - stringify!(s_port) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).s_proto) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(servent), - "::", - stringify!(s_proto) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of servent"][::std::mem::size_of::() - 16usize]; + ["Alignment of servent"][::std::mem::align_of::() - 4usize]; + ["Offset of field: servent::s_name"][::std::mem::offset_of!(servent, s_name) - 0usize]; + ["Offset of field: servent::s_aliases"][::std::mem::offset_of!(servent, s_aliases) - 4usize]; + ["Offset of field: servent::s_port"][::std::mem::offset_of!(servent, s_port) - 8usize]; + ["Offset of field: servent::s_proto"][::std::mem::offset_of!(servent, s_proto) - 12usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct protoent { @@ -6356,51 +4944,14 @@ pub struct protoent { pub p_aliases: *mut *mut ::std::os::raw::c_char, pub p_proto: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_protoent() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(protoent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(protoent)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).p_name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(protoent), - "::", - stringify!(p_name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).p_aliases) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(protoent), - "::", - stringify!(p_aliases) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).p_proto) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(protoent), - "::", - stringify!(p_proto) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of protoent"][::std::mem::size_of::() - 12usize]; + ["Alignment of protoent"][::std::mem::align_of::() - 4usize]; + ["Offset of field: protoent::p_name"][::std::mem::offset_of!(protoent, p_name) - 0usize]; + ["Offset of field: protoent::p_aliases"][::std::mem::offset_of!(protoent, p_aliases) - 4usize]; + ["Offset of field: protoent::p_proto"][::std::mem::offset_of!(protoent, p_proto) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct addrinfo { @@ -6413,101 +4964,23 @@ pub struct addrinfo { pub ai_addr: *mut sockaddr, pub ai_next: *mut addrinfo, } -#[test] -fn bindgen_test_layout_addrinfo() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(addrinfo)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(addrinfo)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ai_flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(addrinfo), - "::", - stringify!(ai_flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ai_family) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(addrinfo), - "::", - stringify!(ai_family) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ai_socktype) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(addrinfo), - "::", - stringify!(ai_socktype) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ai_protocol) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(addrinfo), - "::", - stringify!(ai_protocol) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ai_addrlen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(addrinfo), - "::", - stringify!(ai_addrlen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ai_canonname) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(addrinfo), - "::", - stringify!(ai_canonname) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ai_addr) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(addrinfo), - "::", - stringify!(ai_addr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ai_next) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(addrinfo), - "::", - stringify!(ai_next) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of addrinfo"][::std::mem::size_of::() - 32usize]; + ["Alignment of addrinfo"][::std::mem::align_of::() - 4usize]; + ["Offset of field: addrinfo::ai_flags"][::std::mem::offset_of!(addrinfo, ai_flags) - 0usize]; + ["Offset of field: addrinfo::ai_family"][::std::mem::offset_of!(addrinfo, ai_family) - 4usize]; + ["Offset of field: addrinfo::ai_socktype"] + [::std::mem::offset_of!(addrinfo, ai_socktype) - 8usize]; + ["Offset of field: addrinfo::ai_protocol"] + [::std::mem::offset_of!(addrinfo, ai_protocol) - 12usize]; + ["Offset of field: addrinfo::ai_addrlen"] + [::std::mem::offset_of!(addrinfo, ai_addrlen) - 16usize]; + ["Offset of field: addrinfo::ai_canonname"] + [::std::mem::offset_of!(addrinfo, ai_canonname) - 20usize]; + ["Offset of field: addrinfo::ai_addr"][::std::mem::offset_of!(addrinfo, ai_addr) - 24usize]; + ["Offset of field: addrinfo::ai_next"][::std::mem::offset_of!(addrinfo, ai_next) - 28usize]; +}; extern "C" { pub fn getaddrinfo( __node: *const ::std::os::raw::c_char, @@ -7105,121 +5578,21 @@ pub struct mallinfo { pub fordblks: usize, pub keepcost: usize, } -#[test] -fn bindgen_test_layout_mallinfo() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(mallinfo)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(mallinfo)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).arena) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(mallinfo), - "::", - stringify!(arena) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ordblks) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(mallinfo), - "::", - stringify!(ordblks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).smblks) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(mallinfo), - "::", - stringify!(smblks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hblks) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(mallinfo), - "::", - stringify!(hblks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hblkhd) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(mallinfo), - "::", - stringify!(hblkhd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).usmblks) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(mallinfo), - "::", - stringify!(usmblks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fsmblks) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(mallinfo), - "::", - stringify!(fsmblks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uordblks) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(mallinfo), - "::", - stringify!(uordblks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fordblks) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(mallinfo), - "::", - stringify!(fordblks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).keepcost) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(mallinfo), - "::", - stringify!(keepcost) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of mallinfo"][::std::mem::size_of::() - 40usize]; + ["Alignment of mallinfo"][::std::mem::align_of::() - 4usize]; + ["Offset of field: mallinfo::arena"][::std::mem::offset_of!(mallinfo, arena) - 0usize]; + ["Offset of field: mallinfo::ordblks"][::std::mem::offset_of!(mallinfo, ordblks) - 4usize]; + ["Offset of field: mallinfo::smblks"][::std::mem::offset_of!(mallinfo, smblks) - 8usize]; + ["Offset of field: mallinfo::hblks"][::std::mem::offset_of!(mallinfo, hblks) - 12usize]; + ["Offset of field: mallinfo::hblkhd"][::std::mem::offset_of!(mallinfo, hblkhd) - 16usize]; + ["Offset of field: mallinfo::usmblks"][::std::mem::offset_of!(mallinfo, usmblks) - 20usize]; + ["Offset of field: mallinfo::fsmblks"][::std::mem::offset_of!(mallinfo, fsmblks) - 24usize]; + ["Offset of field: mallinfo::uordblks"][::std::mem::offset_of!(mallinfo, uordblks) - 28usize]; + ["Offset of field: mallinfo::fordblks"][::std::mem::offset_of!(mallinfo, fordblks) - 32usize]; + ["Offset of field: mallinfo::keepcost"][::std::mem::offset_of!(mallinfo, keepcost) - 36usize]; +}; extern "C" { pub fn mallinfo() -> mallinfo; } @@ -7237,121 +5610,21 @@ pub struct mallinfo2 { pub fordblks: usize, pub keepcost: usize, } -#[test] -fn bindgen_test_layout_mallinfo2() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(mallinfo2)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(mallinfo2)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).arena) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(mallinfo2), - "::", - stringify!(arena) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ordblks) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(mallinfo2), - "::", - stringify!(ordblks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).smblks) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(mallinfo2), - "::", - stringify!(smblks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hblks) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(mallinfo2), - "::", - stringify!(hblks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hblkhd) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(mallinfo2), - "::", - stringify!(hblkhd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).usmblks) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(mallinfo2), - "::", - stringify!(usmblks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fsmblks) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(mallinfo2), - "::", - stringify!(fsmblks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uordblks) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(mallinfo2), - "::", - stringify!(uordblks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fordblks) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(mallinfo2), - "::", - stringify!(fordblks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).keepcost) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(mallinfo2), - "::", - stringify!(keepcost) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of mallinfo2"][::std::mem::size_of::() - 40usize]; + ["Alignment of mallinfo2"][::std::mem::align_of::() - 4usize]; + ["Offset of field: mallinfo2::arena"][::std::mem::offset_of!(mallinfo2, arena) - 0usize]; + ["Offset of field: mallinfo2::ordblks"][::std::mem::offset_of!(mallinfo2, ordblks) - 4usize]; + ["Offset of field: mallinfo2::smblks"][::std::mem::offset_of!(mallinfo2, smblks) - 8usize]; + ["Offset of field: mallinfo2::hblks"][::std::mem::offset_of!(mallinfo2, hblks) - 12usize]; + ["Offset of field: mallinfo2::hblkhd"][::std::mem::offset_of!(mallinfo2, hblkhd) - 16usize]; + ["Offset of field: mallinfo2::usmblks"][::std::mem::offset_of!(mallinfo2, usmblks) - 20usize]; + ["Offset of field: mallinfo2::fsmblks"][::std::mem::offset_of!(mallinfo2, fsmblks) - 24usize]; + ["Offset of field: mallinfo2::uordblks"][::std::mem::offset_of!(mallinfo2, uordblks) - 28usize]; + ["Offset of field: mallinfo2::fordblks"][::std::mem::offset_of!(mallinfo2, fordblks) - 32usize]; + ["Offset of field: mallinfo2::keepcost"][::std::mem::offset_of!(mallinfo2, keepcost) - 36usize]; +}; extern "C" { pub fn malloc_info( __must_be_zero: ::std::os::raw::c_int, @@ -7692,41 +5965,13 @@ pub struct div_t { pub quot: ::std::os::raw::c_int, pub rem: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_div_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(div_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(div_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).quot) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(div_t), - "::", - stringify!(quot) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rem) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(div_t), - "::", - stringify!(rem) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of div_t"][::std::mem::size_of::() - 8usize]; + ["Alignment of div_t"][::std::mem::align_of::() - 4usize]; + ["Offset of field: div_t::quot"][::std::mem::offset_of!(div_t, quot) - 0usize]; + ["Offset of field: div_t::rem"][::std::mem::offset_of!(div_t, rem) - 4usize]; +}; extern "C" { pub fn div(__numerator: ::std::os::raw::c_int, __denominator: ::std::os::raw::c_int) -> div_t; } @@ -7736,41 +5981,13 @@ pub struct ldiv_t { pub quot: ::std::os::raw::c_long, pub rem: ::std::os::raw::c_long, } -#[test] -fn bindgen_test_layout_ldiv_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(ldiv_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(ldiv_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).quot) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ldiv_t), - "::", - stringify!(quot) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rem) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ldiv_t), - "::", - stringify!(rem) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ldiv_t"][::std::mem::size_of::() - 8usize]; + ["Alignment of ldiv_t"][::std::mem::align_of::() - 4usize]; + ["Offset of field: ldiv_t::quot"][::std::mem::offset_of!(ldiv_t, quot) - 0usize]; + ["Offset of field: ldiv_t::rem"][::std::mem::offset_of!(ldiv_t, rem) - 4usize]; +}; extern "C" { pub fn ldiv( __numerator: ::std::os::raw::c_long, @@ -7783,41 +6000,13 @@ pub struct lldiv_t { pub quot: ::std::os::raw::c_longlong, pub rem: ::std::os::raw::c_longlong, } -#[test] -fn bindgen_test_layout_lldiv_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(lldiv_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(lldiv_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).quot) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(lldiv_t), - "::", - stringify!(quot) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rem) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(lldiv_t), - "::", - stringify!(rem) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of lldiv_t"][::std::mem::size_of::() - 16usize]; + ["Alignment of lldiv_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: lldiv_t::quot"][::std::mem::offset_of!(lldiv_t, quot) - 0usize]; + ["Offset of field: lldiv_t::rem"][::std::mem::offset_of!(lldiv_t, rem) - 8usize]; +}; extern "C" { pub fn lldiv( __numerator: ::std::os::raw::c_longlong, @@ -8068,81 +6257,23 @@ pub struct ANativeWindow_Buffer { pub bits: *mut ::std::os::raw::c_void, pub reserved: [u32; 6usize], } -#[test] -fn bindgen_test_layout_ANativeWindow_Buffer() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 44usize, - concat!("Size of: ", stringify!(ANativeWindow_Buffer)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(ANativeWindow_Buffer)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ANativeWindow_Buffer), - "::", - stringify!(width) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ANativeWindow_Buffer), - "::", - stringify!(height) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).stride) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ANativeWindow_Buffer), - "::", - stringify!(stride) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).format) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(ANativeWindow_Buffer), - "::", - stringify!(format) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bits) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(ANativeWindow_Buffer), - "::", - stringify!(bits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(ANativeWindow_Buffer), - "::", - stringify!(reserved) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ANativeWindow_Buffer"][::std::mem::size_of::() - 44usize]; + ["Alignment of ANativeWindow_Buffer"][::std::mem::align_of::() - 4usize]; + ["Offset of field: ANativeWindow_Buffer::width"] + [::std::mem::offset_of!(ANativeWindow_Buffer, width) - 0usize]; + ["Offset of field: ANativeWindow_Buffer::height"] + [::std::mem::offset_of!(ANativeWindow_Buffer, height) - 4usize]; + ["Offset of field: ANativeWindow_Buffer::stride"] + [::std::mem::offset_of!(ANativeWindow_Buffer, stride) - 8usize]; + ["Offset of field: ANativeWindow_Buffer::format"] + [::std::mem::offset_of!(ANativeWindow_Buffer, format) - 12usize]; + ["Offset of field: ANativeWindow_Buffer::bits"] + [::std::mem::offset_of!(ANativeWindow_Buffer, bits) - 16usize]; + ["Offset of field: ANativeWindow_Buffer::reserved"] + [::std::mem::offset_of!(ANativeWindow_Buffer, reserved) - 20usize]; +}; extern "C" { pub fn ANativeWindow_acquire(window: *mut ANativeWindow); } @@ -8241,121 +6372,30 @@ pub struct ANativeActivity { pub assetManager: *mut AAssetManager, pub obbPath: *const ::std::os::raw::c_char, } -#[test] -fn bindgen_test_layout_ANativeActivity() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(ANativeActivity)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(ANativeActivity)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).callbacks) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivity), - "::", - stringify!(callbacks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).vm) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivity), - "::", - stringify!(vm) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).env) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivity), - "::", - stringify!(env) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clazz) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivity), - "::", - stringify!(clazz) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).internalDataPath) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivity), - "::", - stringify!(internalDataPath) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).externalDataPath) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivity), - "::", - stringify!(externalDataPath) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sdkVersion) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivity), - "::", - stringify!(sdkVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).instance) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivity), - "::", - stringify!(instance) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).assetManager) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivity), - "::", - stringify!(assetManager) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).obbPath) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivity), - "::", - stringify!(obbPath) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ANativeActivity"][::std::mem::size_of::() - 40usize]; + ["Alignment of ANativeActivity"][::std::mem::align_of::() - 4usize]; + ["Offset of field: ANativeActivity::callbacks"] + [::std::mem::offset_of!(ANativeActivity, callbacks) - 0usize]; + ["Offset of field: ANativeActivity::vm"][::std::mem::offset_of!(ANativeActivity, vm) - 4usize]; + ["Offset of field: ANativeActivity::env"] + [::std::mem::offset_of!(ANativeActivity, env) - 8usize]; + ["Offset of field: ANativeActivity::clazz"] + [::std::mem::offset_of!(ANativeActivity, clazz) - 12usize]; + ["Offset of field: ANativeActivity::internalDataPath"] + [::std::mem::offset_of!(ANativeActivity, internalDataPath) - 16usize]; + ["Offset of field: ANativeActivity::externalDataPath"] + [::std::mem::offset_of!(ANativeActivity, externalDataPath) - 20usize]; + ["Offset of field: ANativeActivity::sdkVersion"] + [::std::mem::offset_of!(ANativeActivity, sdkVersion) - 24usize]; + ["Offset of field: ANativeActivity::instance"] + [::std::mem::offset_of!(ANativeActivity, instance) - 28usize]; + ["Offset of field: ANativeActivity::assetManager"] + [::std::mem::offset_of!(ANativeActivity, assetManager) - 32usize]; + ["Offset of field: ANativeActivity::obbPath"] + [::std::mem::offset_of!(ANativeActivity, obbPath) - 36usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ANativeActivityCallbacks { @@ -8398,182 +6438,45 @@ pub struct ANativeActivityCallbacks { ::std::option::Option, pub onLowMemory: ::std::option::Option, } -#[test] -fn bindgen_test_layout_ANativeActivityCallbacks() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(ANativeActivityCallbacks)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(ANativeActivityCallbacks)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onStart) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivityCallbacks), - "::", - stringify!(onStart) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onResume) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivityCallbacks), - "::", - stringify!(onResume) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onSaveInstanceState) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivityCallbacks), - "::", - stringify!(onSaveInstanceState) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onPause) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivityCallbacks), - "::", - stringify!(onPause) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onStop) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivityCallbacks), - "::", - stringify!(onStop) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onDestroy) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivityCallbacks), - "::", - stringify!(onDestroy) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onWindowFocusChanged) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivityCallbacks), - "::", - stringify!(onWindowFocusChanged) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onNativeWindowCreated) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivityCallbacks), - "::", - stringify!(onNativeWindowCreated) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onNativeWindowResized) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivityCallbacks), - "::", - stringify!(onNativeWindowResized) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onNativeWindowRedrawNeeded) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivityCallbacks), - "::", - stringify!(onNativeWindowRedrawNeeded) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onNativeWindowDestroyed) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivityCallbacks), - "::", - stringify!(onNativeWindowDestroyed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onInputQueueCreated) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivityCallbacks), - "::", - stringify!(onInputQueueCreated) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onInputQueueDestroyed) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivityCallbacks), - "::", - stringify!(onInputQueueDestroyed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onContentRectChanged) as usize - ptr as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivityCallbacks), - "::", - stringify!(onContentRectChanged) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onConfigurationChanged) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivityCallbacks), - "::", - stringify!(onConfigurationChanged) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onLowMemory) as usize - ptr as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivityCallbacks), - "::", - stringify!(onLowMemory) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ANativeActivityCallbacks"] + [::std::mem::size_of::() - 64usize]; + ["Alignment of ANativeActivityCallbacks"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ANativeActivityCallbacks::onStart"] + [::std::mem::offset_of!(ANativeActivityCallbacks, onStart) - 0usize]; + ["Offset of field: ANativeActivityCallbacks::onResume"] + [::std::mem::offset_of!(ANativeActivityCallbacks, onResume) - 4usize]; + ["Offset of field: ANativeActivityCallbacks::onSaveInstanceState"] + [::std::mem::offset_of!(ANativeActivityCallbacks, onSaveInstanceState) - 8usize]; + ["Offset of field: ANativeActivityCallbacks::onPause"] + [::std::mem::offset_of!(ANativeActivityCallbacks, onPause) - 12usize]; + ["Offset of field: ANativeActivityCallbacks::onStop"] + [::std::mem::offset_of!(ANativeActivityCallbacks, onStop) - 16usize]; + ["Offset of field: ANativeActivityCallbacks::onDestroy"] + [::std::mem::offset_of!(ANativeActivityCallbacks, onDestroy) - 20usize]; + ["Offset of field: ANativeActivityCallbacks::onWindowFocusChanged"] + [::std::mem::offset_of!(ANativeActivityCallbacks, onWindowFocusChanged) - 24usize]; + ["Offset of field: ANativeActivityCallbacks::onNativeWindowCreated"] + [::std::mem::offset_of!(ANativeActivityCallbacks, onNativeWindowCreated) - 28usize]; + ["Offset of field: ANativeActivityCallbacks::onNativeWindowResized"] + [::std::mem::offset_of!(ANativeActivityCallbacks, onNativeWindowResized) - 32usize]; + ["Offset of field: ANativeActivityCallbacks::onNativeWindowRedrawNeeded"] + [::std::mem::offset_of!(ANativeActivityCallbacks, onNativeWindowRedrawNeeded) - 36usize]; + ["Offset of field: ANativeActivityCallbacks::onNativeWindowDestroyed"] + [::std::mem::offset_of!(ANativeActivityCallbacks, onNativeWindowDestroyed) - 40usize]; + ["Offset of field: ANativeActivityCallbacks::onInputQueueCreated"] + [::std::mem::offset_of!(ANativeActivityCallbacks, onInputQueueCreated) - 44usize]; + ["Offset of field: ANativeActivityCallbacks::onInputQueueDestroyed"] + [::std::mem::offset_of!(ANativeActivityCallbacks, onInputQueueDestroyed) - 48usize]; + ["Offset of field: ANativeActivityCallbacks::onContentRectChanged"] + [::std::mem::offset_of!(ANativeActivityCallbacks, onContentRectChanged) - 52usize]; + ["Offset of field: ANativeActivityCallbacks::onConfigurationChanged"] + [::std::mem::offset_of!(ANativeActivityCallbacks, onConfigurationChanged) - 56usize]; + ["Offset of field: ANativeActivityCallbacks::onLowMemory"] + [::std::mem::offset_of!(ANativeActivityCallbacks, onLowMemory) - 60usize]; +}; pub type ANativeActivity_createFunc = ::std::option::Option< unsafe extern "C" fn( activity: *mut ANativeActivity, @@ -9181,58 +7084,19 @@ pub struct ANeuralNetworksSymmPerChannelQuantParams { pub scaleCount: u32, pub scales: *const f32, } -#[test] -fn bindgen_test_layout_ANeuralNetworksSymmPerChannelQuantParams() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!( - "Size of: ", - stringify!(ANeuralNetworksSymmPerChannelQuantParams) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ANeuralNetworksSymmPerChannelQuantParams) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).channelDim) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ANeuralNetworksSymmPerChannelQuantParams), - "::", - stringify!(channelDim) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).scaleCount) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ANeuralNetworksSymmPerChannelQuantParams), - "::", - stringify!(scaleCount) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).scales) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ANeuralNetworksSymmPerChannelQuantParams), - "::", - stringify!(scales) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ANeuralNetworksSymmPerChannelQuantParams"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of ANeuralNetworksSymmPerChannelQuantParams"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ANeuralNetworksSymmPerChannelQuantParams::channelDim"] + [::std::mem::offset_of!(ANeuralNetworksSymmPerChannelQuantParams, channelDim) - 0usize]; + ["Offset of field: ANeuralNetworksSymmPerChannelQuantParams::scaleCount"] + [::std::mem::offset_of!(ANeuralNetworksSymmPerChannelQuantParams, scaleCount) - 4usize]; + ["Offset of field: ANeuralNetworksSymmPerChannelQuantParams::scales"] + [::std::mem::offset_of!(ANeuralNetworksSymmPerChannelQuantParams, scales) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ANeuralNetworksBurst { @@ -9247,72 +7111,23 @@ pub struct ANeuralNetworksOperandType { pub scale: f32, pub zeroPoint: i32, } -#[test] -fn bindgen_test_layout_ANeuralNetworksOperandType() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 20usize, - concat!("Size of: ", stringify!(ANeuralNetworksOperandType)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(ANeuralNetworksOperandType)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ANeuralNetworksOperandType), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dimensionCount) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ANeuralNetworksOperandType), - "::", - stringify!(dimensionCount) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dimensions) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ANeuralNetworksOperandType), - "::", - stringify!(dimensions) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).scale) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(ANeuralNetworksOperandType), - "::", - stringify!(scale) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).zeroPoint) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(ANeuralNetworksOperandType), - "::", - stringify!(zeroPoint) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ANeuralNetworksOperandType"] + [::std::mem::size_of::() - 20usize]; + ["Alignment of ANeuralNetworksOperandType"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ANeuralNetworksOperandType::type_"] + [::std::mem::offset_of!(ANeuralNetworksOperandType, type_) - 0usize]; + ["Offset of field: ANeuralNetworksOperandType::dimensionCount"] + [::std::mem::offset_of!(ANeuralNetworksOperandType, dimensionCount) - 4usize]; + ["Offset of field: ANeuralNetworksOperandType::dimensions"] + [::std::mem::offset_of!(ANeuralNetworksOperandType, dimensions) - 8usize]; + ["Offset of field: ANeuralNetworksOperandType::scale"] + [::std::mem::offset_of!(ANeuralNetworksOperandType, scale) - 12usize]; + ["Offset of field: ANeuralNetworksOperandType::zeroPoint"] + [::std::mem::offset_of!(ANeuralNetworksOperandType, zeroPoint) - 16usize]; +}; pub type ANeuralNetworksOperationType = i32; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -9777,371 +7592,132 @@ pub struct timespec { pub tv_sec: time_t, pub tv_nsec: ::std::os::raw::c_long, } -#[test] -fn bindgen_test_layout_timespec() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(timespec)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(timespec)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tv_sec) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(timespec), - "::", - stringify!(tv_sec) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tv_nsec) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(timespec), - "::", - stringify!(tv_nsec) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of timespec"][::std::mem::size_of::() - 8usize]; + ["Alignment of timespec"][::std::mem::align_of::() - 4usize]; + ["Offset of field: timespec::tv_sec"][::std::mem::offset_of!(timespec, tv_sec) - 0usize]; + ["Offset of field: timespec::tv_nsec"][::std::mem::offset_of!(timespec, tv_nsec) - 4usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __kernel_timespec { pub tv_sec: __kernel_time64_t, pub tv_nsec: ::std::os::raw::c_longlong, } -#[test] -fn bindgen_test_layout___kernel_timespec() { - const UNINIT: ::std::mem::MaybeUninit<__kernel_timespec> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__kernel_timespec>(), - 16usize, - concat!("Size of: ", stringify!(__kernel_timespec)) - ); - assert_eq!( - ::std::mem::align_of::<__kernel_timespec>(), - 8usize, - concat!("Alignment of ", stringify!(__kernel_timespec)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tv_sec) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__kernel_timespec), - "::", - stringify!(tv_sec) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tv_nsec) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__kernel_timespec), - "::", - stringify!(tv_nsec) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __kernel_timespec"][::std::mem::size_of::<__kernel_timespec>() - 16usize]; + ["Alignment of __kernel_timespec"][::std::mem::align_of::<__kernel_timespec>() - 8usize]; + ["Offset of field: __kernel_timespec::tv_sec"] + [::std::mem::offset_of!(__kernel_timespec, tv_sec) - 0usize]; + ["Offset of field: __kernel_timespec::tv_nsec"] + [::std::mem::offset_of!(__kernel_timespec, tv_nsec) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __kernel_itimerspec { pub it_interval: __kernel_timespec, pub it_value: __kernel_timespec, } -#[test] -fn bindgen_test_layout___kernel_itimerspec() { - const UNINIT: ::std::mem::MaybeUninit<__kernel_itimerspec> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__kernel_itimerspec>(), - 32usize, - concat!("Size of: ", stringify!(__kernel_itimerspec)) - ); - assert_eq!( - ::std::mem::align_of::<__kernel_itimerspec>(), - 8usize, - concat!("Alignment of ", stringify!(__kernel_itimerspec)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).it_interval) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__kernel_itimerspec), - "::", - stringify!(it_interval) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).it_value) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__kernel_itimerspec), - "::", - stringify!(it_value) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __kernel_itimerspec"][::std::mem::size_of::<__kernel_itimerspec>() - 32usize]; + ["Alignment of __kernel_itimerspec"][::std::mem::align_of::<__kernel_itimerspec>() - 8usize]; + ["Offset of field: __kernel_itimerspec::it_interval"] + [::std::mem::offset_of!(__kernel_itimerspec, it_interval) - 0usize]; + ["Offset of field: __kernel_itimerspec::it_value"] + [::std::mem::offset_of!(__kernel_itimerspec, it_value) - 16usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __kernel_old_timespec { pub tv_sec: __kernel_old_time_t, pub tv_nsec: ::std::os::raw::c_long, } -#[test] -fn bindgen_test_layout___kernel_old_timespec() { - const UNINIT: ::std::mem::MaybeUninit<__kernel_old_timespec> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__kernel_old_timespec>(), - 8usize, - concat!("Size of: ", stringify!(__kernel_old_timespec)) - ); - assert_eq!( - ::std::mem::align_of::<__kernel_old_timespec>(), - 4usize, - concat!("Alignment of ", stringify!(__kernel_old_timespec)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tv_sec) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__kernel_old_timespec), - "::", - stringify!(tv_sec) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tv_nsec) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__kernel_old_timespec), - "::", - stringify!(tv_nsec) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __kernel_old_timespec"][::std::mem::size_of::<__kernel_old_timespec>() - 8usize]; + ["Alignment of __kernel_old_timespec"] + [::std::mem::align_of::<__kernel_old_timespec>() - 4usize]; + ["Offset of field: __kernel_old_timespec::tv_sec"] + [::std::mem::offset_of!(__kernel_old_timespec, tv_sec) - 0usize]; + ["Offset of field: __kernel_old_timespec::tv_nsec"] + [::std::mem::offset_of!(__kernel_old_timespec, tv_nsec) - 4usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __kernel_sock_timeval { pub tv_sec: __s64, pub tv_usec: __s64, } -#[test] -fn bindgen_test_layout___kernel_sock_timeval() { - const UNINIT: ::std::mem::MaybeUninit<__kernel_sock_timeval> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__kernel_sock_timeval>(), - 16usize, - concat!("Size of: ", stringify!(__kernel_sock_timeval)) - ); - assert_eq!( - ::std::mem::align_of::<__kernel_sock_timeval>(), - 8usize, - concat!("Alignment of ", stringify!(__kernel_sock_timeval)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tv_sec) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__kernel_sock_timeval), - "::", - stringify!(tv_sec) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tv_usec) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__kernel_sock_timeval), - "::", - stringify!(tv_usec) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __kernel_sock_timeval"][::std::mem::size_of::<__kernel_sock_timeval>() - 16usize]; + ["Alignment of __kernel_sock_timeval"] + [::std::mem::align_of::<__kernel_sock_timeval>() - 8usize]; + ["Offset of field: __kernel_sock_timeval::tv_sec"] + [::std::mem::offset_of!(__kernel_sock_timeval, tv_sec) - 0usize]; + ["Offset of field: __kernel_sock_timeval::tv_usec"] + [::std::mem::offset_of!(__kernel_sock_timeval, tv_usec) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct timeval { pub tv_sec: __kernel_old_time_t, pub tv_usec: __kernel_suseconds_t, } -#[test] -fn bindgen_test_layout_timeval() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(timeval)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(timeval)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tv_sec) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(timeval), - "::", - stringify!(tv_sec) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tv_usec) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(timeval), - "::", - stringify!(tv_usec) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of timeval"][::std::mem::size_of::() - 8usize]; + ["Alignment of timeval"][::std::mem::align_of::() - 4usize]; + ["Offset of field: timeval::tv_sec"][::std::mem::offset_of!(timeval, tv_sec) - 0usize]; + ["Offset of field: timeval::tv_usec"][::std::mem::offset_of!(timeval, tv_usec) - 4usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct itimerspec { pub it_interval: timespec, pub it_value: timespec, } -#[test] -fn bindgen_test_layout_itimerspec() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(itimerspec)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(itimerspec)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).it_interval) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(itimerspec), - "::", - stringify!(it_interval) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).it_value) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(itimerspec), - "::", - stringify!(it_value) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of itimerspec"][::std::mem::size_of::() - 16usize]; + ["Alignment of itimerspec"][::std::mem::align_of::() - 4usize]; + ["Offset of field: itimerspec::it_interval"] + [::std::mem::offset_of!(itimerspec, it_interval) - 0usize]; + ["Offset of field: itimerspec::it_value"] + [::std::mem::offset_of!(itimerspec, it_value) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct itimerval { pub it_interval: timeval, pub it_value: timeval, } -#[test] -fn bindgen_test_layout_itimerval() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(itimerval)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(itimerval)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).it_interval) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(itimerval), - "::", - stringify!(it_interval) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).it_value) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(itimerval), - "::", - stringify!(it_value) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of itimerval"][::std::mem::size_of::() - 16usize]; + ["Alignment of itimerval"][::std::mem::align_of::() - 4usize]; + ["Offset of field: itimerval::it_interval"] + [::std::mem::offset_of!(itimerval, it_interval) - 0usize]; + ["Offset of field: itimerval::it_value"][::std::mem::offset_of!(itimerval, it_value) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct timezone { pub tz_minuteswest: ::std::os::raw::c_int, pub tz_dsttime: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_timezone() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(timezone)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(timezone)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tz_minuteswest) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(timezone), - "::", - stringify!(tz_minuteswest) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tz_dsttime) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(timezone), - "::", - stringify!(tz_dsttime) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of timezone"][::std::mem::size_of::() - 8usize]; + ["Alignment of timezone"][::std::mem::align_of::() - 4usize]; + ["Offset of field: timezone::tz_minuteswest"] + [::std::mem::offset_of!(timezone, tz_minuteswest) - 0usize]; + ["Offset of field: timezone::tz_dsttime"] + [::std::mem::offset_of!(timezone, tz_dsttime) - 4usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct sigcontext { @@ -10167,231 +7743,35 @@ pub struct sigcontext { pub arm_cpsr: ::std::os::raw::c_ulong, pub fault_address: ::std::os::raw::c_ulong, } -#[test] -fn bindgen_test_layout_sigcontext() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 84usize, - concat!("Size of: ", stringify!(sigcontext)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(sigcontext)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).trap_no) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(trap_no) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).error_code) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(error_code) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).oldmask) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(oldmask) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).arm_r0) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(arm_r0) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).arm_r1) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(arm_r1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).arm_r2) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(arm_r2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).arm_r3) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(arm_r3) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).arm_r4) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(arm_r4) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).arm_r5) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(arm_r5) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).arm_r6) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(arm_r6) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).arm_r7) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(arm_r7) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).arm_r8) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(arm_r8) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).arm_r9) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(arm_r9) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).arm_r10) as usize - ptr as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(arm_r10) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).arm_fp) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(arm_fp) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).arm_ip) as usize - ptr as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(arm_ip) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).arm_sp) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(arm_sp) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).arm_lr) as usize - ptr as usize }, - 68usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(arm_lr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).arm_pc) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(arm_pc) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).arm_cpsr) as usize - ptr as usize }, - 76usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(arm_cpsr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fault_address) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(fault_address) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sigcontext"][::std::mem::size_of::() - 84usize]; + ["Alignment of sigcontext"][::std::mem::align_of::() - 4usize]; + ["Offset of field: sigcontext::trap_no"][::std::mem::offset_of!(sigcontext, trap_no) - 0usize]; + ["Offset of field: sigcontext::error_code"] + [::std::mem::offset_of!(sigcontext, error_code) - 4usize]; + ["Offset of field: sigcontext::oldmask"][::std::mem::offset_of!(sigcontext, oldmask) - 8usize]; + ["Offset of field: sigcontext::arm_r0"][::std::mem::offset_of!(sigcontext, arm_r0) - 12usize]; + ["Offset of field: sigcontext::arm_r1"][::std::mem::offset_of!(sigcontext, arm_r1) - 16usize]; + ["Offset of field: sigcontext::arm_r2"][::std::mem::offset_of!(sigcontext, arm_r2) - 20usize]; + ["Offset of field: sigcontext::arm_r3"][::std::mem::offset_of!(sigcontext, arm_r3) - 24usize]; + ["Offset of field: sigcontext::arm_r4"][::std::mem::offset_of!(sigcontext, arm_r4) - 28usize]; + ["Offset of field: sigcontext::arm_r5"][::std::mem::offset_of!(sigcontext, arm_r5) - 32usize]; + ["Offset of field: sigcontext::arm_r6"][::std::mem::offset_of!(sigcontext, arm_r6) - 36usize]; + ["Offset of field: sigcontext::arm_r7"][::std::mem::offset_of!(sigcontext, arm_r7) - 40usize]; + ["Offset of field: sigcontext::arm_r8"][::std::mem::offset_of!(sigcontext, arm_r8) - 44usize]; + ["Offset of field: sigcontext::arm_r9"][::std::mem::offset_of!(sigcontext, arm_r9) - 48usize]; + ["Offset of field: sigcontext::arm_r10"][::std::mem::offset_of!(sigcontext, arm_r10) - 52usize]; + ["Offset of field: sigcontext::arm_fp"][::std::mem::offset_of!(sigcontext, arm_fp) - 56usize]; + ["Offset of field: sigcontext::arm_ip"][::std::mem::offset_of!(sigcontext, arm_ip) - 60usize]; + ["Offset of field: sigcontext::arm_sp"][::std::mem::offset_of!(sigcontext, arm_sp) - 64usize]; + ["Offset of field: sigcontext::arm_lr"][::std::mem::offset_of!(sigcontext, arm_lr) - 68usize]; + ["Offset of field: sigcontext::arm_pc"][::std::mem::offset_of!(sigcontext, arm_pc) - 72usize]; + ["Offset of field: sigcontext::arm_cpsr"] + [::std::mem::offset_of!(sigcontext, arm_cpsr) - 76usize]; + ["Offset of field: sigcontext::fault_address"] + [::std::mem::offset_of!(sigcontext, fault_address) - 80usize]; +}; pub type sigset_t = ::std::os::raw::c_ulong; pub type __signalfn_t = ::std::option::Option; pub type __sighandler_t = __signalfn_t; @@ -10417,100 +7797,30 @@ pub union __kernel_sigaction__bindgen_ty_1 { ), >, } -#[test] -fn bindgen_test_layout___kernel_sigaction__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit<__kernel_sigaction__bindgen_ty_1> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__kernel_sigaction__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(__kernel_sigaction__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::<__kernel_sigaction__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(__kernel_sigaction__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._sa_handler) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__kernel_sigaction__bindgen_ty_1), - "::", - stringify!(_sa_handler) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._sa_sigaction) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__kernel_sigaction__bindgen_ty_1), - "::", - stringify!(_sa_sigaction) - ) - ); -} -#[test] -fn bindgen_test_layout___kernel_sigaction() { - const UNINIT: ::std::mem::MaybeUninit<__kernel_sigaction> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__kernel_sigaction>(), - 16usize, - concat!("Size of: ", stringify!(__kernel_sigaction)) - ); - assert_eq!( - ::std::mem::align_of::<__kernel_sigaction>(), - 4usize, - concat!("Alignment of ", stringify!(__kernel_sigaction)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._u) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__kernel_sigaction), - "::", - stringify!(_u) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sa_mask) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__kernel_sigaction), - "::", - stringify!(sa_mask) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sa_flags) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__kernel_sigaction), - "::", - stringify!(sa_flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sa_restorer) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(__kernel_sigaction), - "::", - stringify!(sa_restorer) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __kernel_sigaction__bindgen_ty_1"] + [::std::mem::size_of::<__kernel_sigaction__bindgen_ty_1>() - 4usize]; + ["Alignment of __kernel_sigaction__bindgen_ty_1"] + [::std::mem::align_of::<__kernel_sigaction__bindgen_ty_1>() - 4usize]; + ["Offset of field: __kernel_sigaction__bindgen_ty_1::_sa_handler"] + [::std::mem::offset_of!(__kernel_sigaction__bindgen_ty_1, _sa_handler) - 0usize]; + ["Offset of field: __kernel_sigaction__bindgen_ty_1::_sa_sigaction"] + [::std::mem::offset_of!(__kernel_sigaction__bindgen_ty_1, _sa_sigaction) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __kernel_sigaction"][::std::mem::size_of::<__kernel_sigaction>() - 16usize]; + ["Alignment of __kernel_sigaction"][::std::mem::align_of::<__kernel_sigaction>() - 4usize]; + ["Offset of field: __kernel_sigaction::_u"] + [::std::mem::offset_of!(__kernel_sigaction, _u) - 0usize]; + ["Offset of field: __kernel_sigaction::sa_mask"] + [::std::mem::offset_of!(__kernel_sigaction, sa_mask) - 4usize]; + ["Offset of field: __kernel_sigaction::sa_flags"] + [::std::mem::offset_of!(__kernel_sigaction, sa_flags) - 8usize]; + ["Offset of field: __kernel_sigaction::sa_restorer"] + [::std::mem::offset_of!(__kernel_sigaction, sa_restorer) - 12usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct sigaltstack { @@ -10518,51 +7828,16 @@ pub struct sigaltstack { pub ss_flags: ::std::os::raw::c_int, pub ss_size: __kernel_size_t, } -#[test] -fn bindgen_test_layout_sigaltstack() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(sigaltstack)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(sigaltstack)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ss_sp) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigaltstack), - "::", - stringify!(ss_sp) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ss_flags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(sigaltstack), - "::", - stringify!(ss_flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ss_size) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(sigaltstack), - "::", - stringify!(ss_size) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sigaltstack"][::std::mem::size_of::() - 12usize]; + ["Alignment of sigaltstack"][::std::mem::align_of::() - 4usize]; + ["Offset of field: sigaltstack::ss_sp"][::std::mem::offset_of!(sigaltstack, ss_sp) - 0usize]; + ["Offset of field: sigaltstack::ss_flags"] + [::std::mem::offset_of!(sigaltstack, ss_flags) - 4usize]; + ["Offset of field: sigaltstack::ss_size"] + [::std::mem::offset_of!(sigaltstack, ss_size) - 8usize]; +}; pub type stack_t = sigaltstack; #[repr(C)] #[derive(Copy, Clone)] @@ -10570,41 +7845,13 @@ pub union sigval { pub sival_int: ::std::os::raw::c_int, pub sival_ptr: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout_sigval() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(sigval)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(sigval)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sival_int) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigval), - "::", - stringify!(sival_int) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sival_ptr) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigval), - "::", - stringify!(sival_ptr) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sigval"][::std::mem::size_of::() - 4usize]; + ["Alignment of sigval"][::std::mem::align_of::() - 4usize]; + ["Offset of field: sigval::sival_int"][::std::mem::offset_of!(sigval, sival_int) - 0usize]; + ["Offset of field: sigval::sival_ptr"][::std::mem::offset_of!(sigval, sival_ptr) - 0usize]; +}; pub type sigval_t = sigval; #[repr(C)] #[derive(Copy, Clone)] @@ -10623,42 +7870,17 @@ pub struct __sifields__bindgen_ty_1 { pub _pid: __kernel_pid_t, pub _uid: __kernel_uid32_t, } -#[test] -fn bindgen_test_layout___sifields__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit<__sifields__bindgen_ty_1> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__sifields__bindgen_ty_1>(), - 8usize, - concat!("Size of: ", stringify!(__sifields__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::<__sifields__bindgen_ty_1>(), - 4usize, - concat!("Alignment of ", stringify!(__sifields__bindgen_ty_1)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._pid) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_1), - "::", - stringify!(_pid) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._uid) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_1), - "::", - stringify!(_uid) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __sifields__bindgen_ty_1"] + [::std::mem::size_of::<__sifields__bindgen_ty_1>() - 8usize]; + ["Alignment of __sifields__bindgen_ty_1"] + [::std::mem::align_of::<__sifields__bindgen_ty_1>() - 4usize]; + ["Offset of field: __sifields__bindgen_ty_1::_pid"] + [::std::mem::offset_of!(__sifields__bindgen_ty_1, _pid) - 0usize]; + ["Offset of field: __sifields__bindgen_ty_1::_uid"] + [::std::mem::offset_of!(__sifields__bindgen_ty_1, _uid) - 4usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub struct __sifields__bindgen_ty_2 { @@ -10667,62 +7889,21 @@ pub struct __sifields__bindgen_ty_2 { pub _sigval: sigval_t, pub _sys_private: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout___sifields__bindgen_ty_2() { - const UNINIT: ::std::mem::MaybeUninit<__sifields__bindgen_ty_2> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__sifields__bindgen_ty_2>(), - 16usize, - concat!("Size of: ", stringify!(__sifields__bindgen_ty_2)) - ); - assert_eq!( - ::std::mem::align_of::<__sifields__bindgen_ty_2>(), - 4usize, - concat!("Alignment of ", stringify!(__sifields__bindgen_ty_2)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._tid) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_2), - "::", - stringify!(_tid) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._overrun) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_2), - "::", - stringify!(_overrun) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._sigval) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_2), - "::", - stringify!(_sigval) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._sys_private) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_2), - "::", - stringify!(_sys_private) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __sifields__bindgen_ty_2"] + [::std::mem::size_of::<__sifields__bindgen_ty_2>() - 16usize]; + ["Alignment of __sifields__bindgen_ty_2"] + [::std::mem::align_of::<__sifields__bindgen_ty_2>() - 4usize]; + ["Offset of field: __sifields__bindgen_ty_2::_tid"] + [::std::mem::offset_of!(__sifields__bindgen_ty_2, _tid) - 0usize]; + ["Offset of field: __sifields__bindgen_ty_2::_overrun"] + [::std::mem::offset_of!(__sifields__bindgen_ty_2, _overrun) - 4usize]; + ["Offset of field: __sifields__bindgen_ty_2::_sigval"] + [::std::mem::offset_of!(__sifields__bindgen_ty_2, _sigval) - 8usize]; + ["Offset of field: __sifields__bindgen_ty_2::_sys_private"] + [::std::mem::offset_of!(__sifields__bindgen_ty_2, _sys_private) - 12usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub struct __sifields__bindgen_ty_3 { @@ -10730,52 +7911,19 @@ pub struct __sifields__bindgen_ty_3 { pub _uid: __kernel_uid32_t, pub _sigval: sigval_t, } -#[test] -fn bindgen_test_layout___sifields__bindgen_ty_3() { - const UNINIT: ::std::mem::MaybeUninit<__sifields__bindgen_ty_3> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__sifields__bindgen_ty_3>(), - 12usize, - concat!("Size of: ", stringify!(__sifields__bindgen_ty_3)) - ); - assert_eq!( - ::std::mem::align_of::<__sifields__bindgen_ty_3>(), - 4usize, - concat!("Alignment of ", stringify!(__sifields__bindgen_ty_3)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._pid) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_3), - "::", - stringify!(_pid) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._uid) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_3), - "::", - stringify!(_uid) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._sigval) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_3), - "::", - stringify!(_sigval) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __sifields__bindgen_ty_3"] + [::std::mem::size_of::<__sifields__bindgen_ty_3>() - 12usize]; + ["Alignment of __sifields__bindgen_ty_3"] + [::std::mem::align_of::<__sifields__bindgen_ty_3>() - 4usize]; + ["Offset of field: __sifields__bindgen_ty_3::_pid"] + [::std::mem::offset_of!(__sifields__bindgen_ty_3, _pid) - 0usize]; + ["Offset of field: __sifields__bindgen_ty_3::_uid"] + [::std::mem::offset_of!(__sifields__bindgen_ty_3, _uid) - 4usize]; + ["Offset of field: __sifields__bindgen_ty_3::_sigval"] + [::std::mem::offset_of!(__sifields__bindgen_ty_3, _sigval) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __sifields__bindgen_ty_4 { @@ -10785,72 +7933,23 @@ pub struct __sifields__bindgen_ty_4 { pub _utime: __kernel_clock_t, pub _stime: __kernel_clock_t, } -#[test] -fn bindgen_test_layout___sifields__bindgen_ty_4() { - const UNINIT: ::std::mem::MaybeUninit<__sifields__bindgen_ty_4> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__sifields__bindgen_ty_4>(), - 20usize, - concat!("Size of: ", stringify!(__sifields__bindgen_ty_4)) - ); - assert_eq!( - ::std::mem::align_of::<__sifields__bindgen_ty_4>(), - 4usize, - concat!("Alignment of ", stringify!(__sifields__bindgen_ty_4)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._pid) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_4), - "::", - stringify!(_pid) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._uid) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_4), - "::", - stringify!(_uid) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._status) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_4), - "::", - stringify!(_status) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._utime) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_4), - "::", - stringify!(_utime) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._stime) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_4), - "::", - stringify!(_stime) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __sifields__bindgen_ty_4"] + [::std::mem::size_of::<__sifields__bindgen_ty_4>() - 20usize]; + ["Alignment of __sifields__bindgen_ty_4"] + [::std::mem::align_of::<__sifields__bindgen_ty_4>() - 4usize]; + ["Offset of field: __sifields__bindgen_ty_4::_pid"] + [::std::mem::offset_of!(__sifields__bindgen_ty_4, _pid) - 0usize]; + ["Offset of field: __sifields__bindgen_ty_4::_uid"] + [::std::mem::offset_of!(__sifields__bindgen_ty_4, _uid) - 4usize]; + ["Offset of field: __sifields__bindgen_ty_4::_status"] + [::std::mem::offset_of!(__sifields__bindgen_ty_4, _status) - 8usize]; + ["Offset of field: __sifields__bindgen_ty_4::_utime"] + [::std::mem::offset_of!(__sifields__bindgen_ty_4, _utime) - 12usize]; + ["Offset of field: __sifields__bindgen_ty_4::_stime"] + [::std::mem::offset_of!(__sifields__bindgen_ty_4, _stime) - 16usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub struct __sifields__bindgen_ty_5 { @@ -10873,106 +7972,48 @@ pub struct __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1 { pub _lower: *mut ::std::os::raw::c_void, pub _upper: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout___sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1>(), - 12usize, - concat!( - "Size of: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._dummy_bnd) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(_dummy_bnd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._lower) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(_lower) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._upper) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(_upper) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::size_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1>() - 12usize]; + ["Alignment of __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::align_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1>() - 4usize]; + ["Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1::_dummy_bnd"][::std::mem::offset_of!( + __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1, + _dummy_bnd + ) + - 0usize]; + ["Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1::_lower"][::std::mem::offset_of!( + __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1, + _lower + ) - 4usize]; + ["Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1::_upper"][::std::mem::offset_of!( + __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1, + _upper + ) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2 { pub _dummy_pkey: [::std::os::raw::c_char; 4usize], pub _pkey: __u32, } -#[test] -fn bindgen_test_layout___sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2() { - const UNINIT: ::std::mem::MaybeUninit<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2>(), - 8usize, - concat!( - "Size of: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2) - ) - ); - assert_eq!( - ::std::mem::align_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2>(), - 4usize, - concat!( - "Alignment of ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._dummy_pkey) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(_dummy_pkey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._pkey) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(_pkey) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2"] + [::std::mem::size_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2>() - 8usize]; + ["Alignment of __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2"] + [::std::mem::align_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2>() - 4usize]; + ["Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2::_dummy_pkey"][::std::mem::offset_of!( + __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2, + _dummy_pkey + ) + - 0usize]; + ["Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2::_pkey"][::std::mem::offset_of!( + __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2, + _pkey + ) - 4usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3 { @@ -10980,198 +8021,68 @@ pub struct __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3 { pub _type: __u32, pub _flags: __u32, } -#[test] -fn bindgen_test_layout___sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3() { - const UNINIT: ::std::mem::MaybeUninit<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3>(), - 12usize, - concat!( - "Size of: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3) - ) - ); - assert_eq!( - ::std::mem::align_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3>(), - 4usize, - concat!( - "Alignment of ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._data) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(_data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._type) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(_type) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._flags) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(_flags) - ) - ); -} -#[test] -fn bindgen_test_layout___sifields__bindgen_ty_5__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit<__sifields__bindgen_ty_5__bindgen_ty_1> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__sifields__bindgen_ty_5__bindgen_ty_1>(), - 12usize, - concat!( - "Size of: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::<__sifields__bindgen_ty_5__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._trapno) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1), - "::", - stringify!(_trapno) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._addr_lsb) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1), - "::", - stringify!(_addr_lsb) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._addr_bnd) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1), - "::", - stringify!(_addr_bnd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._addr_pkey) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1), - "::", - stringify!(_addr_pkey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._perf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1), - "::", - stringify!(_perf) - ) - ); -} -#[test] -fn bindgen_test_layout___sifields__bindgen_ty_5() { - const UNINIT: ::std::mem::MaybeUninit<__sifields__bindgen_ty_5> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__sifields__bindgen_ty_5>(), - 16usize, - concat!("Size of: ", stringify!(__sifields__bindgen_ty_5)) - ); - assert_eq!( - ::std::mem::align_of::<__sifields__bindgen_ty_5>(), - 4usize, - concat!("Alignment of ", stringify!(__sifields__bindgen_ty_5)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._addr) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5), - "::", - stringify!(_addr) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3"] + [::std::mem::size_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3>() - 12usize]; + ["Alignment of __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3"] + [::std::mem::align_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3>() - 4usize]; + ["Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3::_data"][::std::mem::offset_of!( + __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3, + _data + ) - 0usize]; + ["Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3::_type"][::std::mem::offset_of!( + __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3, + _type + ) - 4usize]; + ["Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3::_flags"][::std::mem::offset_of!( + __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3, + _flags + ) - 8usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __sifields__bindgen_ty_5__bindgen_ty_1"] + [::std::mem::size_of::<__sifields__bindgen_ty_5__bindgen_ty_1>() - 12usize]; + ["Alignment of __sifields__bindgen_ty_5__bindgen_ty_1"] + [::std::mem::align_of::<__sifields__bindgen_ty_5__bindgen_ty_1>() - 4usize]; + ["Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1::_trapno"] + [::std::mem::offset_of!(__sifields__bindgen_ty_5__bindgen_ty_1, _trapno) - 0usize]; + ["Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1::_addr_lsb"] + [::std::mem::offset_of!(__sifields__bindgen_ty_5__bindgen_ty_1, _addr_lsb) - 0usize]; + ["Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1::_addr_bnd"] + [::std::mem::offset_of!(__sifields__bindgen_ty_5__bindgen_ty_1, _addr_bnd) - 0usize]; + ["Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1::_addr_pkey"] + [::std::mem::offset_of!(__sifields__bindgen_ty_5__bindgen_ty_1, _addr_pkey) - 0usize]; + ["Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1::_perf"] + [::std::mem::offset_of!(__sifields__bindgen_ty_5__bindgen_ty_1, _perf) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __sifields__bindgen_ty_5"] + [::std::mem::size_of::<__sifields__bindgen_ty_5>() - 16usize]; + ["Alignment of __sifields__bindgen_ty_5"] + [::std::mem::align_of::<__sifields__bindgen_ty_5>() - 4usize]; + ["Offset of field: __sifields__bindgen_ty_5::_addr"] + [::std::mem::offset_of!(__sifields__bindgen_ty_5, _addr) - 0usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __sifields__bindgen_ty_6 { pub _band: ::std::os::raw::c_long, pub _fd: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout___sifields__bindgen_ty_6() { - const UNINIT: ::std::mem::MaybeUninit<__sifields__bindgen_ty_6> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__sifields__bindgen_ty_6>(), - 8usize, - concat!("Size of: ", stringify!(__sifields__bindgen_ty_6)) - ); - assert_eq!( - ::std::mem::align_of::<__sifields__bindgen_ty_6>(), - 4usize, - concat!("Alignment of ", stringify!(__sifields__bindgen_ty_6)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._band) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_6), - "::", - stringify!(_band) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._fd) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_6), - "::", - stringify!(_fd) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __sifields__bindgen_ty_6"] + [::std::mem::size_of::<__sifields__bindgen_ty_6>() - 8usize]; + ["Alignment of __sifields__bindgen_ty_6"] + [::std::mem::align_of::<__sifields__bindgen_ty_6>() - 4usize]; + ["Offset of field: __sifields__bindgen_ty_6::_band"] + [::std::mem::offset_of!(__sifields__bindgen_ty_6, _band) - 0usize]; + ["Offset of field: __sifields__bindgen_ty_6::_fd"] + [::std::mem::offset_of!(__sifields__bindgen_ty_6, _fd) - 4usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __sifields__bindgen_ty_7 { @@ -11179,141 +8090,38 @@ pub struct __sifields__bindgen_ty_7 { pub _syscall: ::std::os::raw::c_int, pub _arch: ::std::os::raw::c_uint, } -#[test] -fn bindgen_test_layout___sifields__bindgen_ty_7() { - const UNINIT: ::std::mem::MaybeUninit<__sifields__bindgen_ty_7> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__sifields__bindgen_ty_7>(), - 12usize, - concat!("Size of: ", stringify!(__sifields__bindgen_ty_7)) - ); - assert_eq!( - ::std::mem::align_of::<__sifields__bindgen_ty_7>(), - 4usize, - concat!("Alignment of ", stringify!(__sifields__bindgen_ty_7)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._call_addr) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_7), - "::", - stringify!(_call_addr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._syscall) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_7), - "::", - stringify!(_syscall) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._arch) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_7), - "::", - stringify!(_arch) - ) - ); -} -#[test] -fn bindgen_test_layout___sifields() { - const UNINIT: ::std::mem::MaybeUninit<__sifields> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__sifields>(), - 20usize, - concat!("Size of: ", stringify!(__sifields)) - ); - assert_eq!( - ::std::mem::align_of::<__sifields>(), - 4usize, - concat!("Alignment of ", stringify!(__sifields)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._kill) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields), - "::", - stringify!(_kill) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._timer) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields), - "::", - stringify!(_timer) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._rt) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields), - "::", - stringify!(_rt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._sigchld) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields), - "::", - stringify!(_sigchld) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._sigfault) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields), - "::", - stringify!(_sigfault) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._sigpoll) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields), - "::", - stringify!(_sigpoll) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._sigsys) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields), - "::", - stringify!(_sigsys) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct siginfo { - pub __bindgen_anon_1: siginfo__bindgen_ty_1, +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __sifields__bindgen_ty_7"] + [::std::mem::size_of::<__sifields__bindgen_ty_7>() - 12usize]; + ["Alignment of __sifields__bindgen_ty_7"] + [::std::mem::align_of::<__sifields__bindgen_ty_7>() - 4usize]; + ["Offset of field: __sifields__bindgen_ty_7::_call_addr"] + [::std::mem::offset_of!(__sifields__bindgen_ty_7, _call_addr) - 0usize]; + ["Offset of field: __sifields__bindgen_ty_7::_syscall"] + [::std::mem::offset_of!(__sifields__bindgen_ty_7, _syscall) - 4usize]; + ["Offset of field: __sifields__bindgen_ty_7::_arch"] + [::std::mem::offset_of!(__sifields__bindgen_ty_7, _arch) - 8usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __sifields"][::std::mem::size_of::<__sifields>() - 20usize]; + ["Alignment of __sifields"][::std::mem::align_of::<__sifields>() - 4usize]; + ["Offset of field: __sifields::_kill"][::std::mem::offset_of!(__sifields, _kill) - 0usize]; + ["Offset of field: __sifields::_timer"][::std::mem::offset_of!(__sifields, _timer) - 0usize]; + ["Offset of field: __sifields::_rt"][::std::mem::offset_of!(__sifields, _rt) - 0usize]; + ["Offset of field: __sifields::_sigchld"] + [::std::mem::offset_of!(__sifields, _sigchld) - 0usize]; + ["Offset of field: __sifields::_sigfault"] + [::std::mem::offset_of!(__sifields, _sigfault) - 0usize]; + ["Offset of field: __sifields::_sigpoll"] + [::std::mem::offset_of!(__sifields, _sigpoll) - 0usize]; + ["Offset of field: __sifields::_sigsys"][::std::mem::offset_of!(__sifields, _sigsys) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct siginfo { + pub __bindgen_anon_1: siginfo__bindgen_ty_1, } #[repr(C)] #[derive(Copy, Clone)] @@ -11329,104 +8137,34 @@ pub struct siginfo__bindgen_ty_1__bindgen_ty_1 { pub si_code: ::std::os::raw::c_int, pub _sifields: __sifields, } -#[test] -fn bindgen_test_layout_siginfo__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(siginfo__bindgen_ty_1__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(siginfo__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).si_signo) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(siginfo__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(si_signo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).si_errno) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(siginfo__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(si_errno) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).si_code) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(siginfo__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(si_code) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._sifields) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(siginfo__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(_sifields) - ) - ); -} -#[test] -fn bindgen_test_layout_siginfo__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 128usize, - concat!("Size of: ", stringify!(siginfo__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(siginfo__bindgen_ty_1)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._si_pad) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(siginfo__bindgen_ty_1), - "::", - stringify!(_si_pad) - ) - ); -} -#[test] -fn bindgen_test_layout_siginfo() { - assert_eq!( - ::std::mem::size_of::(), - 128usize, - concat!("Size of: ", stringify!(siginfo)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(siginfo)) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of siginfo__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of siginfo__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: siginfo__bindgen_ty_1__bindgen_ty_1::si_signo"] + [::std::mem::offset_of!(siginfo__bindgen_ty_1__bindgen_ty_1, si_signo) - 0usize]; + ["Offset of field: siginfo__bindgen_ty_1__bindgen_ty_1::si_errno"] + [::std::mem::offset_of!(siginfo__bindgen_ty_1__bindgen_ty_1, si_errno) - 4usize]; + ["Offset of field: siginfo__bindgen_ty_1__bindgen_ty_1::si_code"] + [::std::mem::offset_of!(siginfo__bindgen_ty_1__bindgen_ty_1, si_code) - 8usize]; + ["Offset of field: siginfo__bindgen_ty_1__bindgen_ty_1::_sifields"] + [::std::mem::offset_of!(siginfo__bindgen_ty_1__bindgen_ty_1, _sifields) - 12usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of siginfo__bindgen_ty_1"][::std::mem::size_of::() - 128usize]; + ["Alignment of siginfo__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: siginfo__bindgen_ty_1::_si_pad"] + [::std::mem::offset_of!(siginfo__bindgen_ty_1, _si_pad) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of siginfo"][::std::mem::size_of::() - 128usize]; + ["Alignment of siginfo"][::std::mem::align_of::() - 4usize]; +}; pub type siginfo_t = siginfo; #[repr(C)] #[derive(Copy, Clone)] @@ -11449,149 +8187,41 @@ pub struct sigevent__bindgen_ty_1__bindgen_ty_1 { pub _function: ::std::option::Option, pub _attribute: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout_sigevent__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!( - "Size of: ", - stringify!(sigevent__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(sigevent__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._function) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigevent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(_function) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._attribute) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(sigevent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(_attribute) - ) - ); -} -#[test] -fn bindgen_test_layout_sigevent__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 52usize, - concat!("Size of: ", stringify!(sigevent__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(sigevent__bindgen_ty_1)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._pad) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigevent__bindgen_ty_1), - "::", - stringify!(_pad) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._tid) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigevent__bindgen_ty_1), - "::", - stringify!(_tid) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._sigev_thread) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigevent__bindgen_ty_1), - "::", - stringify!(_sigev_thread) - ) - ); -} -#[test] -fn bindgen_test_layout_sigevent() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(sigevent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(sigevent)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sigev_value) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigevent), - "::", - stringify!(sigev_value) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sigev_signo) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(sigevent), - "::", - stringify!(sigev_signo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sigev_notify) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(sigevent), - "::", - stringify!(sigev_notify) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._sigev_un) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(sigevent), - "::", - stringify!(_sigev_un) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sigevent__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::size_of::() - 8usize]; + ["Alignment of sigevent__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: sigevent__bindgen_ty_1__bindgen_ty_1::_function"] + [::std::mem::offset_of!(sigevent__bindgen_ty_1__bindgen_ty_1, _function) - 0usize]; + ["Offset of field: sigevent__bindgen_ty_1__bindgen_ty_1::_attribute"] + [::std::mem::offset_of!(sigevent__bindgen_ty_1__bindgen_ty_1, _attribute) - 4usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sigevent__bindgen_ty_1"][::std::mem::size_of::() - 52usize]; + ["Alignment of sigevent__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: sigevent__bindgen_ty_1::_pad"] + [::std::mem::offset_of!(sigevent__bindgen_ty_1, _pad) - 0usize]; + ["Offset of field: sigevent__bindgen_ty_1::_tid"] + [::std::mem::offset_of!(sigevent__bindgen_ty_1, _tid) - 0usize]; + ["Offset of field: sigevent__bindgen_ty_1::_sigev_thread"] + [::std::mem::offset_of!(sigevent__bindgen_ty_1, _sigev_thread) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sigevent"][::std::mem::size_of::() - 64usize]; + ["Alignment of sigevent"][::std::mem::align_of::() - 4usize]; + ["Offset of field: sigevent::sigev_value"] + [::std::mem::offset_of!(sigevent, sigev_value) - 0usize]; + ["Offset of field: sigevent::sigev_signo"] + [::std::mem::offset_of!(sigevent, sigev_signo) - 4usize]; + ["Offset of field: sigevent::sigev_notify"] + [::std::mem::offset_of!(sigevent, sigev_notify) - 8usize]; + ["Offset of field: sigevent::_sigev_un"][::std::mem::offset_of!(sigevent, _sigev_un) - 12usize]; +}; pub type sigevent_t = sigevent; pub type sig_atomic_t = ::std::os::raw::c_int; pub type sig_t = __sighandler_t; @@ -11601,31 +8231,12 @@ pub type sighandler_t = __sighandler_t; pub struct sigset64_t { pub __bits: [::std::os::raw::c_ulong; 2usize], } -#[test] -fn bindgen_test_layout_sigset64_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(sigset64_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(sigset64_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__bits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigset64_t), - "::", - stringify!(__bits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sigset64_t"][::std::mem::size_of::() - 8usize]; + ["Alignment of sigset64_t"][::std::mem::align_of::() - 4usize]; + ["Offset of field: sigset64_t::__bits"][::std::mem::offset_of!(sigset64_t, __bits) - 0usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub struct sigaction { @@ -11646,87 +8257,25 @@ pub union sigaction__bindgen_ty_1 { ), >, } -#[test] -fn bindgen_test_layout_sigaction__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(sigaction__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(sigaction__bindgen_ty_1)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sa_handler) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigaction__bindgen_ty_1), - "::", - stringify!(sa_handler) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sa_sigaction) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigaction__bindgen_ty_1), - "::", - stringify!(sa_sigaction) - ) - ); -} -#[test] -fn bindgen_test_layout_sigaction() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(sigaction)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(sigaction)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sa_mask) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(sigaction), - "::", - stringify!(sa_mask) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sa_flags) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(sigaction), - "::", - stringify!(sa_flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sa_restorer) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(sigaction), - "::", - stringify!(sa_restorer) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sigaction__bindgen_ty_1"][::std::mem::size_of::() - 4usize]; + ["Alignment of sigaction__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: sigaction__bindgen_ty_1::sa_handler"] + [::std::mem::offset_of!(sigaction__bindgen_ty_1, sa_handler) - 0usize]; + ["Offset of field: sigaction__bindgen_ty_1::sa_sigaction"] + [::std::mem::offset_of!(sigaction__bindgen_ty_1, sa_sigaction) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sigaction"][::std::mem::size_of::() - 16usize]; + ["Alignment of sigaction"][::std::mem::align_of::() - 4usize]; + ["Offset of field: sigaction::sa_mask"][::std::mem::offset_of!(sigaction, sa_mask) - 4usize]; + ["Offset of field: sigaction::sa_flags"][::std::mem::offset_of!(sigaction, sa_flags) - 8usize]; + ["Offset of field: sigaction::sa_restorer"] + [::std::mem::offset_of!(sigaction, sa_restorer) - 12usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub struct sigaction64 { @@ -11747,87 +8296,28 @@ pub union sigaction64__bindgen_ty_1 { ), >, } -#[test] -fn bindgen_test_layout_sigaction64__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(sigaction64__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(sigaction64__bindgen_ty_1)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sa_handler) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigaction64__bindgen_ty_1), - "::", - stringify!(sa_handler) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sa_sigaction) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigaction64__bindgen_ty_1), - "::", - stringify!(sa_sigaction) - ) - ); -} -#[test] -fn bindgen_test_layout_sigaction64() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 20usize, - concat!("Size of: ", stringify!(sigaction64)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(sigaction64)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sa_flags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(sigaction64), - "::", - stringify!(sa_flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sa_restorer) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(sigaction64), - "::", - stringify!(sa_restorer) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sa_mask) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(sigaction64), - "::", - stringify!(sa_mask) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sigaction64__bindgen_ty_1"] + [::std::mem::size_of::() - 4usize]; + ["Alignment of sigaction64__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: sigaction64__bindgen_ty_1::sa_handler"] + [::std::mem::offset_of!(sigaction64__bindgen_ty_1, sa_handler) - 0usize]; + ["Offset of field: sigaction64__bindgen_ty_1::sa_sigaction"] + [::std::mem::offset_of!(sigaction64__bindgen_ty_1, sa_sigaction) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sigaction64"][::std::mem::size_of::() - 20usize]; + ["Alignment of sigaction64"][::std::mem::align_of::() - 4usize]; + ["Offset of field: sigaction64::sa_flags"] + [::std::mem::offset_of!(sigaction64, sa_flags) - 4usize]; + ["Offset of field: sigaction64::sa_restorer"] + [::std::mem::offset_of!(sigaction64, sa_restorer) - 8usize]; + ["Offset of field: sigaction64::sa_mask"] + [::std::mem::offset_of!(sigaction64, sa_mask) - 12usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct user_fpregs { @@ -11843,19 +8333,11 @@ pub struct user_fpregs_fp_reg { pub _bitfield_align_1: [u32; 0], pub _bitfield_1: __BindgenBitfieldUnit<[u8; 12usize]>, } -#[test] -fn bindgen_test_layout_user_fpregs_fp_reg() { - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(user_fpregs_fp_reg)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(user_fpregs_fp_reg)) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of user_fpregs_fp_reg"][::std::mem::size_of::() - 12usize]; + ["Alignment of user_fpregs_fp_reg"][::std::mem::align_of::() - 4usize]; +}; impl user_fpregs_fp_reg { #[inline] pub fn sign1(&self) -> ::std::os::raw::c_uint { @@ -11976,51 +8458,15 @@ impl user_fpregs_fp_reg { __bindgen_bitfield_unit } } -#[test] -fn bindgen_test_layout_user_fpregs() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 116usize, - concat!("Size of: ", stringify!(user_fpregs)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(user_fpregs)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fpregs) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(user_fpregs), - "::", - stringify!(fpregs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ftype) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(user_fpregs), - "::", - stringify!(ftype) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).init_flag) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(user_fpregs), - "::", - stringify!(init_flag) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of user_fpregs"][::std::mem::size_of::() - 116usize]; + ["Alignment of user_fpregs"][::std::mem::align_of::() - 4usize]; + ["Offset of field: user_fpregs::fpregs"][::std::mem::offset_of!(user_fpregs, fpregs) - 0usize]; + ["Offset of field: user_fpregs::ftype"][::std::mem::offset_of!(user_fpregs, ftype) - 104usize]; + ["Offset of field: user_fpregs::init_flag"] + [::std::mem::offset_of!(user_fpregs, init_flag) - 112usize]; +}; impl user_fpregs { #[inline] pub fn fpsr(&self) -> ::std::os::raw::c_uint { @@ -12066,72 +8512,25 @@ impl user_fpregs { pub struct user_regs { pub uregs: [::std::os::raw::c_ulong; 18usize], } -#[test] -fn bindgen_test_layout_user_regs() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!("Size of: ", stringify!(user_regs)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(user_regs)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uregs) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(user_regs), - "::", - stringify!(uregs) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of user_regs"][::std::mem::size_of::() - 72usize]; + ["Alignment of user_regs"][::std::mem::align_of::() - 4usize]; + ["Offset of field: user_regs::uregs"][::std::mem::offset_of!(user_regs, uregs) - 0usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct user_vfp { pub fpregs: [::std::os::raw::c_ulonglong; 32usize], pub fpscr: ::std::os::raw::c_ulong, } -#[test] -fn bindgen_test_layout_user_vfp() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 264usize, - concat!("Size of: ", stringify!(user_vfp)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(user_vfp)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fpregs) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(user_vfp), - "::", - stringify!(fpregs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fpscr) as usize - ptr as usize }, - 256usize, - concat!( - "Offset of field: ", - stringify!(user_vfp), - "::", - stringify!(fpscr) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of user_vfp"][::std::mem::size_of::() - 264usize]; + ["Alignment of user_vfp"][::std::mem::align_of::() - 8usize]; + ["Offset of field: user_vfp::fpregs"][::std::mem::offset_of!(user_vfp, fpregs) - 0usize]; + ["Offset of field: user_vfp::fpscr"][::std::mem::offset_of!(user_vfp, fpscr) - 256usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct user_vfp_exc { @@ -12139,51 +8538,16 @@ pub struct user_vfp_exc { pub fpinst: ::std::os::raw::c_ulong, pub fpinst2: ::std::os::raw::c_ulong, } -#[test] -fn bindgen_test_layout_user_vfp_exc() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(user_vfp_exc)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(user_vfp_exc)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fpexc) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(user_vfp_exc), - "::", - stringify!(fpexc) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fpinst) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(user_vfp_exc), - "::", - stringify!(fpinst) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fpinst2) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(user_vfp_exc), - "::", - stringify!(fpinst2) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of user_vfp_exc"][::std::mem::size_of::() - 12usize]; + ["Alignment of user_vfp_exc"][::std::mem::align_of::() - 4usize]; + ["Offset of field: user_vfp_exc::fpexc"][::std::mem::offset_of!(user_vfp_exc, fpexc) - 0usize]; + ["Offset of field: user_vfp_exc::fpinst"] + [::std::mem::offset_of!(user_vfp_exc, fpinst) - 4usize]; + ["Offset of field: user_vfp_exc::fpinst2"] + [::std::mem::offset_of!(user_vfp_exc, fpinst2) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct user { @@ -12203,171 +8567,26 @@ pub struct user { pub u_fp: user_fpregs, pub u_fp0: *mut user_fpregs, } -#[test] -fn bindgen_test_layout_user() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 296usize, - concat!("Size of: ", stringify!(user)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(user)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).regs) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(regs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).u_fpvalid) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(u_fpvalid) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).u_tsize) as usize - ptr as usize }, - 76usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(u_tsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).u_dsize) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(u_dsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).u_ssize) as usize - ptr as usize }, - 84usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(u_ssize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).start_code) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(start_code) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).start_stack) as usize - ptr as usize }, - 92usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(start_stack) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).signal) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(signal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, - 100usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(reserved) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).u_ar0) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(u_ar0) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).magic) as usize - ptr as usize }, - 108usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(magic) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).u_comm) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(u_comm) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).u_debugreg) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(u_debugreg) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).u_fp) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(u_fp) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).u_fp0) as usize - ptr as usize }, - 292usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(u_fp0) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of user"][::std::mem::size_of::() - 296usize]; + ["Alignment of user"][::std::mem::align_of::() - 4usize]; + ["Offset of field: user::regs"][::std::mem::offset_of!(user, regs) - 0usize]; + ["Offset of field: user::u_fpvalid"][::std::mem::offset_of!(user, u_fpvalid) - 72usize]; + ["Offset of field: user::u_tsize"][::std::mem::offset_of!(user, u_tsize) - 76usize]; + ["Offset of field: user::u_dsize"][::std::mem::offset_of!(user, u_dsize) - 80usize]; + ["Offset of field: user::u_ssize"][::std::mem::offset_of!(user, u_ssize) - 84usize]; + ["Offset of field: user::start_code"][::std::mem::offset_of!(user, start_code) - 88usize]; + ["Offset of field: user::start_stack"][::std::mem::offset_of!(user, start_stack) - 92usize]; + ["Offset of field: user::signal"][::std::mem::offset_of!(user, signal) - 96usize]; + ["Offset of field: user::reserved"][::std::mem::offset_of!(user, reserved) - 100usize]; + ["Offset of field: user::u_ar0"][::std::mem::offset_of!(user, u_ar0) - 104usize]; + ["Offset of field: user::magic"][::std::mem::offset_of!(user, magic) - 108usize]; + ["Offset of field: user::u_comm"][::std::mem::offset_of!(user, u_comm) - 112usize]; + ["Offset of field: user::u_debugreg"][::std::mem::offset_of!(user, u_debugreg) - 144usize]; + ["Offset of field: user::u_fp"][::std::mem::offset_of!(user, u_fp) - 176usize]; + ["Offset of field: user::u_fp0"][::std::mem::offset_of!(user, u_fp0) - 292usize]; +}; pub const REG_R0: _bindgen_ty_38 = 0; pub const REG_R1: _bindgen_ty_38 = 1; pub const REG_R2: _bindgen_ty_38 = 2; @@ -12413,149 +8632,41 @@ pub struct ucontext__bindgen_ty_1__bindgen_ty_1 { pub uc_sigmask: sigset_t, pub __padding_rt_sigset: u32, } -#[test] -fn bindgen_test_layout_ucontext__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!( - "Size of: ", - stringify!(ucontext__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ucontext__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uc_sigmask) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ucontext__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(uc_sigmask) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__padding_rt_sigset) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ucontext__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(__padding_rt_sigset) - ) - ); -} -#[test] -fn bindgen_test_layout_ucontext__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(ucontext__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(ucontext__bindgen_ty_1)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uc_sigmask64) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ucontext__bindgen_ty_1), - "::", - stringify!(uc_sigmask64) - ) - ); -} -#[test] -fn bindgen_test_layout_ucontext() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 744usize, - concat!("Size of: ", stringify!(ucontext)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(ucontext)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uc_flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ucontext), - "::", - stringify!(uc_flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uc_link) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ucontext), - "::", - stringify!(uc_link) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uc_stack) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ucontext), - "::", - stringify!(uc_stack) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uc_mcontext) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(ucontext), - "::", - stringify!(uc_mcontext) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__padding) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(ucontext), - "::", - stringify!(__padding) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uc_regspace) as usize - ptr as usize }, - 232usize, - concat!( - "Offset of field: ", - stringify!(ucontext), - "::", - stringify!(uc_regspace) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ucontext__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::size_of::() - 8usize]; + ["Alignment of ucontext__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ucontext__bindgen_ty_1__bindgen_ty_1::uc_sigmask"] + [::std::mem::offset_of!(ucontext__bindgen_ty_1__bindgen_ty_1, uc_sigmask) - 0usize]; + ["Offset of field: ucontext__bindgen_ty_1__bindgen_ty_1::__padding_rt_sigset"][::std::mem::offset_of!( + ucontext__bindgen_ty_1__bindgen_ty_1, + __padding_rt_sigset + ) - 4usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ucontext__bindgen_ty_1"][::std::mem::size_of::() - 8usize]; + ["Alignment of ucontext__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ucontext__bindgen_ty_1::uc_sigmask64"] + [::std::mem::offset_of!(ucontext__bindgen_ty_1, uc_sigmask64) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ucontext"][::std::mem::size_of::() - 744usize]; + ["Alignment of ucontext"][::std::mem::align_of::() - 8usize]; + ["Offset of field: ucontext::uc_flags"][::std::mem::offset_of!(ucontext, uc_flags) - 0usize]; + ["Offset of field: ucontext::uc_link"][::std::mem::offset_of!(ucontext, uc_link) - 4usize]; + ["Offset of field: ucontext::uc_stack"][::std::mem::offset_of!(ucontext, uc_stack) - 8usize]; + ["Offset of field: ucontext::uc_mcontext"] + [::std::mem::offset_of!(ucontext, uc_mcontext) - 20usize]; + ["Offset of field: ucontext::__padding"] + [::std::mem::offset_of!(ucontext, __padding) - 112usize]; + ["Offset of field: ucontext::uc_regspace"] + [::std::mem::offset_of!(ucontext, uc_regspace) - 232usize]; +}; pub type ucontext_t = ucontext; extern "C" { pub fn __libc_current_sigrtmin() -> ::std::os::raw::c_int; @@ -12778,31 +8889,12 @@ pub type fd_mask = ::std::os::raw::c_ulong; pub struct fd_set { pub fds_bits: [fd_mask; 32usize], } -#[test] -fn bindgen_test_layout_fd_set() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 128usize, - concat!("Size of: ", stringify!(fd_set)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(fd_set)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fds_bits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(fd_set), - "::", - stringify!(fds_bits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of fd_set"][::std::mem::size_of::() - 128usize]; + ["Alignment of fd_set"][::std::mem::align_of::() - 4usize]; + ["Offset of field: fd_set::fds_bits"][::std::mem::offset_of!(fd_set, fds_bits) - 0usize]; +}; extern "C" { pub fn __FD_CLR_chk(arg1: ::std::os::raw::c_int, arg2: *mut fd_set, arg3: usize); } @@ -14133,58 +10225,19 @@ pub struct ASensorVector__bindgen_ty_1__bindgen_ty_1 { pub y: f32, pub z: f32, } -#[test] -fn bindgen_test_layout_ASensorVector__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!( - "Size of: ", - stringify!(ASensorVector__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ASensorVector__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorVector__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(x) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ASensorVector__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(y) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).z) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ASensorVector__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(z) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASensorVector__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of ASensorVector__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ASensorVector__bindgen_ty_1__bindgen_ty_1::x"] + [::std::mem::offset_of!(ASensorVector__bindgen_ty_1__bindgen_ty_1, x) - 0usize]; + ["Offset of field: ASensorVector__bindgen_ty_1__bindgen_ty_1::y"] + [::std::mem::offset_of!(ASensorVector__bindgen_ty_1__bindgen_ty_1, y) - 4usize]; + ["Offset of field: ASensorVector__bindgen_ty_1__bindgen_ty_1::z"] + [::std::mem::offset_of!(ASensorVector__bindgen_ty_1__bindgen_ty_1, z) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ASensorVector__bindgen_ty_1__bindgen_ty_2 { @@ -14192,160 +10245,52 @@ pub struct ASensorVector__bindgen_ty_1__bindgen_ty_2 { pub pitch: f32, pub roll: f32, } -#[test] -fn bindgen_test_layout_ASensorVector__bindgen_ty_1__bindgen_ty_2() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!( - "Size of: ", - stringify!(ASensorVector__bindgen_ty_1__bindgen_ty_2) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ASensorVector__bindgen_ty_1__bindgen_ty_2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).azimuth) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorVector__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(azimuth) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pitch) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ASensorVector__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(pitch) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).roll) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ASensorVector__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(roll) - ) - ); -} -#[test] -fn bindgen_test_layout_ASensorVector__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(ASensorVector__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(ASensorVector__bindgen_ty_1)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).v) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorVector__bindgen_ty_1), - "::", - stringify!(v) - ) - ); -} -#[test] -fn bindgen_test_layout_ASensorVector() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(ASensorVector)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(ASensorVector)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).status) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(ASensorVector), - "::", - stringify!(status) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, - 13usize, - concat!( - "Offset of field: ", - stringify!(ASensorVector), - "::", - stringify!(reserved) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASensorVector__bindgen_ty_1__bindgen_ty_2"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of ASensorVector__bindgen_ty_1__bindgen_ty_2"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ASensorVector__bindgen_ty_1__bindgen_ty_2::azimuth"] + [::std::mem::offset_of!(ASensorVector__bindgen_ty_1__bindgen_ty_2, azimuth) - 0usize]; + ["Offset of field: ASensorVector__bindgen_ty_1__bindgen_ty_2::pitch"] + [::std::mem::offset_of!(ASensorVector__bindgen_ty_1__bindgen_ty_2, pitch) - 4usize]; + ["Offset of field: ASensorVector__bindgen_ty_1__bindgen_ty_2::roll"] + [::std::mem::offset_of!(ASensorVector__bindgen_ty_1__bindgen_ty_2, roll) - 8usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASensorVector__bindgen_ty_1"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of ASensorVector__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ASensorVector__bindgen_ty_1::v"] + [::std::mem::offset_of!(ASensorVector__bindgen_ty_1, v) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASensorVector"][::std::mem::size_of::() - 16usize]; + ["Alignment of ASensorVector"][::std::mem::align_of::() - 4usize]; + ["Offset of field: ASensorVector::status"] + [::std::mem::offset_of!(ASensorVector, status) - 12usize]; + ["Offset of field: ASensorVector::reserved"] + [::std::mem::offset_of!(ASensorVector, reserved) - 13usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct AMetaDataEvent { pub what: i32, pub sensor: i32, } -#[test] -fn bindgen_test_layout_AMetaDataEvent() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(AMetaDataEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AMetaDataEvent)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).what) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AMetaDataEvent), - "::", - stringify!(what) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sensor) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AMetaDataEvent), - "::", - stringify!(sensor) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AMetaDataEvent"][::std::mem::size_of::() - 8usize]; + ["Alignment of AMetaDataEvent"][::std::mem::align_of::() - 4usize]; + ["Offset of field: AMetaDataEvent::what"] + [::std::mem::offset_of!(AMetaDataEvent, what) - 0usize]; + ["Offset of field: AMetaDataEvent::sensor"] + [::std::mem::offset_of!(AMetaDataEvent, sensor) - 4usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub struct AUncalibratedEvent { @@ -14365,87 +10310,34 @@ pub struct AUncalibratedEvent__bindgen_ty_1__bindgen_ty_1 { pub y_uncalib: f32, pub z_uncalib: f32, } -#[test] -fn bindgen_test_layout_AUncalibratedEvent__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!( - "Size of: ", - stringify!(AUncalibratedEvent__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(AUncalibratedEvent__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).x_uncalib) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AUncalibratedEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(x_uncalib) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).y_uncalib) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AUncalibratedEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(y_uncalib) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).z_uncalib) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AUncalibratedEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(z_uncalib) - ) - ); -} -#[test] -fn bindgen_test_layout_AUncalibratedEvent__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(AUncalibratedEvent__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(AUncalibratedEvent__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uncalib) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AUncalibratedEvent__bindgen_ty_1), - "::", - stringify!(uncalib) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AUncalibratedEvent__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of AUncalibratedEvent__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: AUncalibratedEvent__bindgen_ty_1__bindgen_ty_1::x_uncalib"][::std::mem::offset_of!( + AUncalibratedEvent__bindgen_ty_1__bindgen_ty_1, + x_uncalib + ) - 0usize]; + ["Offset of field: AUncalibratedEvent__bindgen_ty_1__bindgen_ty_1::y_uncalib"][::std::mem::offset_of!( + AUncalibratedEvent__bindgen_ty_1__bindgen_ty_1, + y_uncalib + ) - 4usize]; + ["Offset of field: AUncalibratedEvent__bindgen_ty_1__bindgen_ty_1::z_uncalib"][::std::mem::offset_of!( + AUncalibratedEvent__bindgen_ty_1__bindgen_ty_1, + z_uncalib + ) - 8usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AUncalibratedEvent__bindgen_ty_1"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of AUncalibratedEvent__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: AUncalibratedEvent__bindgen_ty_1::uncalib"] + [::std::mem::offset_of!(AUncalibratedEvent__bindgen_ty_1, uncalib) - 0usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub union AUncalibratedEvent__bindgen_ty_2 { @@ -14459,182 +10351,63 @@ pub struct AUncalibratedEvent__bindgen_ty_2__bindgen_ty_1 { pub y_bias: f32, pub z_bias: f32, } -#[test] -fn bindgen_test_layout_AUncalibratedEvent__bindgen_ty_2__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!( - "Size of: ", - stringify!(AUncalibratedEvent__bindgen_ty_2__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(AUncalibratedEvent__bindgen_ty_2__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).x_bias) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AUncalibratedEvent__bindgen_ty_2__bindgen_ty_1), - "::", - stringify!(x_bias) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).y_bias) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AUncalibratedEvent__bindgen_ty_2__bindgen_ty_1), - "::", - stringify!(y_bias) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).z_bias) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AUncalibratedEvent__bindgen_ty_2__bindgen_ty_1), - "::", - stringify!(z_bias) - ) - ); -} -#[test] -fn bindgen_test_layout_AUncalibratedEvent__bindgen_ty_2() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(AUncalibratedEvent__bindgen_ty_2)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(AUncalibratedEvent__bindgen_ty_2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bias) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AUncalibratedEvent__bindgen_ty_2), - "::", - stringify!(bias) - ) - ); -} -#[test] -fn bindgen_test_layout_AUncalibratedEvent() { - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(AUncalibratedEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AUncalibratedEvent)) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AUncalibratedEvent__bindgen_ty_2__bindgen_ty_1"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of AUncalibratedEvent__bindgen_ty_2__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: AUncalibratedEvent__bindgen_ty_2__bindgen_ty_1::x_bias"] + [::std::mem::offset_of!(AUncalibratedEvent__bindgen_ty_2__bindgen_ty_1, x_bias) - 0usize]; + ["Offset of field: AUncalibratedEvent__bindgen_ty_2__bindgen_ty_1::y_bias"] + [::std::mem::offset_of!(AUncalibratedEvent__bindgen_ty_2__bindgen_ty_1, y_bias) - 4usize]; + ["Offset of field: AUncalibratedEvent__bindgen_ty_2__bindgen_ty_1::z_bias"] + [::std::mem::offset_of!(AUncalibratedEvent__bindgen_ty_2__bindgen_ty_1, z_bias) - 8usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AUncalibratedEvent__bindgen_ty_2"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of AUncalibratedEvent__bindgen_ty_2"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: AUncalibratedEvent__bindgen_ty_2::bias"] + [::std::mem::offset_of!(AUncalibratedEvent__bindgen_ty_2, bias) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AUncalibratedEvent"][::std::mem::size_of::() - 24usize]; + ["Alignment of AUncalibratedEvent"][::std::mem::align_of::() - 4usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct AHeartRateEvent { pub bpm: f32, pub status: i8, } -#[test] -fn bindgen_test_layout_AHeartRateEvent() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(AHeartRateEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AHeartRateEvent)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bpm) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AHeartRateEvent), - "::", - stringify!(bpm) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).status) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AHeartRateEvent), - "::", - stringify!(status) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AHeartRateEvent"][::std::mem::size_of::() - 8usize]; + ["Alignment of AHeartRateEvent"][::std::mem::align_of::() - 4usize]; + ["Offset of field: AHeartRateEvent::bpm"] + [::std::mem::offset_of!(AHeartRateEvent, bpm) - 0usize]; + ["Offset of field: AHeartRateEvent::status"] + [::std::mem::offset_of!(AHeartRateEvent, status) - 4usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ADynamicSensorEvent { pub connected: i32, pub handle: i32, } -#[test] -fn bindgen_test_layout_ADynamicSensorEvent() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(ADynamicSensorEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(ADynamicSensorEvent)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).connected) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ADynamicSensorEvent), - "::", - stringify!(connected) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).handle) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ADynamicSensorEvent), - "::", - stringify!(handle) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ADynamicSensorEvent"][::std::mem::size_of::() - 8usize]; + ["Alignment of ADynamicSensorEvent"][::std::mem::align_of::() - 4usize]; + ["Offset of field: ADynamicSensorEvent::connected"] + [::std::mem::offset_of!(ADynamicSensorEvent, connected) - 0usize]; + ["Offset of field: ADynamicSensorEvent::handle"] + [::std::mem::offset_of!(ADynamicSensorEvent, handle) - 4usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub struct AAdditionalInfoEvent { @@ -14648,80 +10421,26 @@ pub union AAdditionalInfoEvent__bindgen_ty_1 { pub data_int32: [i32; 14usize], pub data_float: [f32; 14usize], } -#[test] -fn bindgen_test_layout_AAdditionalInfoEvent__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(AAdditionalInfoEvent__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(AAdditionalInfoEvent__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data_int32) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AAdditionalInfoEvent__bindgen_ty_1), - "::", - stringify!(data_int32) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data_float) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AAdditionalInfoEvent__bindgen_ty_1), - "::", - stringify!(data_float) - ) - ); -} -#[test] -fn bindgen_test_layout_AAdditionalInfoEvent() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(AAdditionalInfoEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AAdditionalInfoEvent)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AAdditionalInfoEvent), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).serial) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AAdditionalInfoEvent), - "::", - stringify!(serial) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AAdditionalInfoEvent__bindgen_ty_1"] + [::std::mem::size_of::() - 56usize]; + ["Alignment of AAdditionalInfoEvent__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: AAdditionalInfoEvent__bindgen_ty_1::data_int32"] + [::std::mem::offset_of!(AAdditionalInfoEvent__bindgen_ty_1, data_int32) - 0usize]; + ["Offset of field: AAdditionalInfoEvent__bindgen_ty_1::data_float"] + [::std::mem::offset_of!(AAdditionalInfoEvent__bindgen_ty_1, data_float) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AAdditionalInfoEvent"][::std::mem::size_of::() - 64usize]; + ["Alignment of AAdditionalInfoEvent"][::std::mem::align_of::() - 4usize]; + ["Offset of field: AAdditionalInfoEvent::type_"] + [::std::mem::offset_of!(AAdditionalInfoEvent, type_) - 0usize]; + ["Offset of field: AAdditionalInfoEvent::serial"] + [::std::mem::offset_of!(AAdditionalInfoEvent, serial) - 4usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct AHeadTrackerEvent { @@ -14733,91 +10452,25 @@ pub struct AHeadTrackerEvent { pub vz: f32, pub discontinuity_count: i32, } -#[test] -fn bindgen_test_layout_AHeadTrackerEvent() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 28usize, - concat!("Size of: ", stringify!(AHeadTrackerEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AHeadTrackerEvent)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rx) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AHeadTrackerEvent), - "::", - stringify!(rx) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ry) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AHeadTrackerEvent), - "::", - stringify!(ry) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rz) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AHeadTrackerEvent), - "::", - stringify!(rz) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).vx) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(AHeadTrackerEvent), - "::", - stringify!(vx) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).vy) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AHeadTrackerEvent), - "::", - stringify!(vy) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).vz) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(AHeadTrackerEvent), - "::", - stringify!(vz) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).discontinuity_count) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(AHeadTrackerEvent), - "::", - stringify!(discontinuity_count) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AHeadTrackerEvent"][::std::mem::size_of::() - 28usize]; + ["Alignment of AHeadTrackerEvent"][::std::mem::align_of::() - 4usize]; + ["Offset of field: AHeadTrackerEvent::rx"] + [::std::mem::offset_of!(AHeadTrackerEvent, rx) - 0usize]; + ["Offset of field: AHeadTrackerEvent::ry"] + [::std::mem::offset_of!(AHeadTrackerEvent, ry) - 4usize]; + ["Offset of field: AHeadTrackerEvent::rz"] + [::std::mem::offset_of!(AHeadTrackerEvent, rz) - 8usize]; + ["Offset of field: AHeadTrackerEvent::vx"] + [::std::mem::offset_of!(AHeadTrackerEvent, vx) - 12usize]; + ["Offset of field: AHeadTrackerEvent::vy"] + [::std::mem::offset_of!(AHeadTrackerEvent, vy) - 16usize]; + ["Offset of field: AHeadTrackerEvent::vz"] + [::std::mem::offset_of!(AHeadTrackerEvent, vz) - 20usize]; + ["Offset of field: AHeadTrackerEvent::discontinuity_count"] + [::std::mem::offset_of!(AHeadTrackerEvent, discontinuity_count) - 24usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub struct ALimitedAxesImuEvent { @@ -14837,87 +10490,28 @@ pub struct ALimitedAxesImuEvent__bindgen_ty_1__bindgen_ty_1 { pub y: f32, pub z: f32, } -#[test] -fn bindgen_test_layout_ALimitedAxesImuEvent__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!( - "Size of: ", - stringify!(ALimitedAxesImuEvent__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ALimitedAxesImuEvent__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(x) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(y) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).z) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(z) - ) - ); -} -#[test] -fn bindgen_test_layout_ALimitedAxesImuEvent__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(ALimitedAxesImuEvent__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ALimitedAxesImuEvent__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).calib) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuEvent__bindgen_ty_1), - "::", - stringify!(calib) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ALimitedAxesImuEvent__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of ALimitedAxesImuEvent__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ALimitedAxesImuEvent__bindgen_ty_1__bindgen_ty_1::x"] + [::std::mem::offset_of!(ALimitedAxesImuEvent__bindgen_ty_1__bindgen_ty_1, x) - 0usize]; + ["Offset of field: ALimitedAxesImuEvent__bindgen_ty_1__bindgen_ty_1::y"] + [::std::mem::offset_of!(ALimitedAxesImuEvent__bindgen_ty_1__bindgen_ty_1, y) - 4usize]; + ["Offset of field: ALimitedAxesImuEvent__bindgen_ty_1__bindgen_ty_1::z"] + [::std::mem::offset_of!(ALimitedAxesImuEvent__bindgen_ty_1__bindgen_ty_1, z) - 8usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ALimitedAxesImuEvent__bindgen_ty_1"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of ALimitedAxesImuEvent__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ALimitedAxesImuEvent__bindgen_ty_1::calib"] + [::std::mem::offset_of!(ALimitedAxesImuEvent__bindgen_ty_1, calib) - 0usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub union ALimitedAxesImuEvent__bindgen_ty_2 { @@ -14931,100 +10525,39 @@ pub struct ALimitedAxesImuEvent__bindgen_ty_2__bindgen_ty_1 { pub y_supported: f32, pub z_supported: f32, } -#[test] -fn bindgen_test_layout_ALimitedAxesImuEvent__bindgen_ty_2__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!( - "Size of: ", - stringify!(ALimitedAxesImuEvent__bindgen_ty_2__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ALimitedAxesImuEvent__bindgen_ty_2__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).x_supported) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuEvent__bindgen_ty_2__bindgen_ty_1), - "::", - stringify!(x_supported) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).y_supported) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuEvent__bindgen_ty_2__bindgen_ty_1), - "::", - stringify!(y_supported) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).z_supported) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuEvent__bindgen_ty_2__bindgen_ty_1), - "::", - stringify!(z_supported) - ) - ); -} -#[test] -fn bindgen_test_layout_ALimitedAxesImuEvent__bindgen_ty_2() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(ALimitedAxesImuEvent__bindgen_ty_2)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ALimitedAxesImuEvent__bindgen_ty_2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).supported) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuEvent__bindgen_ty_2), - "::", - stringify!(supported) - ) - ); -} -#[test] -fn bindgen_test_layout_ALimitedAxesImuEvent() { - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(ALimitedAxesImuEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(ALimitedAxesImuEvent)) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ALimitedAxesImuEvent__bindgen_ty_2__bindgen_ty_1"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of ALimitedAxesImuEvent__bindgen_ty_2__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ALimitedAxesImuEvent__bindgen_ty_2__bindgen_ty_1::x_supported"][::std::mem::offset_of!( + ALimitedAxesImuEvent__bindgen_ty_2__bindgen_ty_1, + x_supported + ) - 0usize]; + ["Offset of field: ALimitedAxesImuEvent__bindgen_ty_2__bindgen_ty_1::y_supported"][::std::mem::offset_of!( + ALimitedAxesImuEvent__bindgen_ty_2__bindgen_ty_1, + y_supported + ) - 4usize]; + ["Offset of field: ALimitedAxesImuEvent__bindgen_ty_2__bindgen_ty_1::z_supported"][::std::mem::offset_of!( + ALimitedAxesImuEvent__bindgen_ty_2__bindgen_ty_1, + z_supported + ) - 8usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ALimitedAxesImuEvent__bindgen_ty_2"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of ALimitedAxesImuEvent__bindgen_ty_2"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ALimitedAxesImuEvent__bindgen_ty_2::supported"] + [::std::mem::offset_of!(ALimitedAxesImuEvent__bindgen_ty_2, supported) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ALimitedAxesImuEvent"][::std::mem::size_of::() - 24usize]; + ["Alignment of ALimitedAxesImuEvent"][::std::mem::align_of::() - 4usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub struct ALimitedAxesImuUncalibratedEvent { @@ -15045,91 +10578,39 @@ pub struct ALimitedAxesImuUncalibratedEvent__bindgen_ty_1__bindgen_ty_1 { pub y_uncalib: f32, pub z_uncalib: f32, } -#[test] -fn bindgen_test_layout_ALimitedAxesImuUncalibratedEvent__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit< +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ALimitedAxesImuUncalibratedEvent__bindgen_ty_1__bindgen_ty_1"][::std::mem::size_of::< ALimitedAxesImuUncalibratedEvent__bindgen_ty_1__bindgen_ty_1, - > = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!( - "Size of: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).x_uncalib) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(x_uncalib) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).y_uncalib) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(y_uncalib) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).z_uncalib) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(z_uncalib) - ) - ); -} -#[test] -fn bindgen_test_layout_ALimitedAxesImuUncalibratedEvent__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!( - "Size of: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uncalib) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_1), - "::", - stringify!(uncalib) - ) - ); -} + >() - 12usize]; + ["Alignment of ALimitedAxesImuUncalibratedEvent__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::align_of::() + - 4usize]; + ["Offset of field: ALimitedAxesImuUncalibratedEvent__bindgen_ty_1__bindgen_ty_1::x_uncalib"][::std::mem::offset_of!( + ALimitedAxesImuUncalibratedEvent__bindgen_ty_1__bindgen_ty_1, + x_uncalib + ) + - 0usize]; + ["Offset of field: ALimitedAxesImuUncalibratedEvent__bindgen_ty_1__bindgen_ty_1::y_uncalib"][::std::mem::offset_of!( + ALimitedAxesImuUncalibratedEvent__bindgen_ty_1__bindgen_ty_1, + y_uncalib + ) + - 4usize]; + ["Offset of field: ALimitedAxesImuUncalibratedEvent__bindgen_ty_1__bindgen_ty_1::z_uncalib"][::std::mem::offset_of!( + ALimitedAxesImuUncalibratedEvent__bindgen_ty_1__bindgen_ty_1, + z_uncalib + ) + - 8usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ALimitedAxesImuUncalibratedEvent__bindgen_ty_1"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of ALimitedAxesImuUncalibratedEvent__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ALimitedAxesImuUncalibratedEvent__bindgen_ty_1::uncalib"] + [::std::mem::offset_of!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_1, uncalib) - 0usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub union ALimitedAxesImuUncalibratedEvent__bindgen_ty_2 { @@ -15143,91 +10624,39 @@ pub struct ALimitedAxesImuUncalibratedEvent__bindgen_ty_2__bindgen_ty_1 { pub y_bias: f32, pub z_bias: f32, } -#[test] -fn bindgen_test_layout_ALimitedAxesImuUncalibratedEvent__bindgen_ty_2__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit< +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ALimitedAxesImuUncalibratedEvent__bindgen_ty_2__bindgen_ty_1"][::std::mem::size_of::< ALimitedAxesImuUncalibratedEvent__bindgen_ty_2__bindgen_ty_1, - > = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!( - "Size of: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_2__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_2__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).x_bias) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_2__bindgen_ty_1), - "::", - stringify!(x_bias) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).y_bias) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_2__bindgen_ty_1), - "::", - stringify!(y_bias) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).z_bias) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_2__bindgen_ty_1), - "::", - stringify!(z_bias) - ) - ); -} -#[test] -fn bindgen_test_layout_ALimitedAxesImuUncalibratedEvent__bindgen_ty_2() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!( - "Size of: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_2) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bias) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_2), - "::", - stringify!(bias) - ) - ); -} + >() - 12usize]; + ["Alignment of ALimitedAxesImuUncalibratedEvent__bindgen_ty_2__bindgen_ty_1"] + [::std::mem::align_of::() + - 4usize]; + ["Offset of field: ALimitedAxesImuUncalibratedEvent__bindgen_ty_2__bindgen_ty_1::x_bias"][::std::mem::offset_of!( + ALimitedAxesImuUncalibratedEvent__bindgen_ty_2__bindgen_ty_1, + x_bias + ) + - 0usize]; + ["Offset of field: ALimitedAxesImuUncalibratedEvent__bindgen_ty_2__bindgen_ty_1::y_bias"][::std::mem::offset_of!( + ALimitedAxesImuUncalibratedEvent__bindgen_ty_2__bindgen_ty_1, + y_bias + ) + - 4usize]; + ["Offset of field: ALimitedAxesImuUncalibratedEvent__bindgen_ty_2__bindgen_ty_1::z_bias"][::std::mem::offset_of!( + ALimitedAxesImuUncalibratedEvent__bindgen_ty_2__bindgen_ty_1, + z_bias + ) + - 8usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ALimitedAxesImuUncalibratedEvent__bindgen_ty_2"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of ALimitedAxesImuUncalibratedEvent__bindgen_ty_2"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ALimitedAxesImuUncalibratedEvent__bindgen_ty_2::bias"] + [::std::mem::offset_of!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_2, bias) - 0usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub union ALimitedAxesImuUncalibratedEvent__bindgen_ty_3 { @@ -15241,148 +10670,51 @@ pub struct ALimitedAxesImuUncalibratedEvent__bindgen_ty_3__bindgen_ty_1 { pub y_supported: f32, pub z_supported: f32, } -#[test] -fn bindgen_test_layout_ALimitedAxesImuUncalibratedEvent__bindgen_ty_3__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit< +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ALimitedAxesImuUncalibratedEvent__bindgen_ty_3__bindgen_ty_1"][::std::mem::size_of::< ALimitedAxesImuUncalibratedEvent__bindgen_ty_3__bindgen_ty_1, - > = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!( - "Size of: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_3__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_3__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).x_supported) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_3__bindgen_ty_1), - "::", - stringify!(x_supported) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).y_supported) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_3__bindgen_ty_1), - "::", - stringify!(y_supported) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).z_supported) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_3__bindgen_ty_1), - "::", - stringify!(z_supported) - ) - ); -} -#[test] -fn bindgen_test_layout_ALimitedAxesImuUncalibratedEvent__bindgen_ty_3() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!( - "Size of: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_3) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_3) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).supported) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_3), - "::", - stringify!(supported) - ) - ); -} -#[test] -fn bindgen_test_layout_ALimitedAxesImuUncalibratedEvent() { - assert_eq!( - ::std::mem::size_of::(), - 36usize, - concat!("Size of: ", stringify!(ALimitedAxesImuUncalibratedEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ALimitedAxesImuUncalibratedEvent) - ) - ); -} + >() - 12usize]; + ["Alignment of ALimitedAxesImuUncalibratedEvent__bindgen_ty_3__bindgen_ty_1"] + [::std::mem::align_of::() + - 4usize]; + ["Offset of field: ALimitedAxesImuUncalibratedEvent__bindgen_ty_3__bindgen_ty_1::x_supported"] [:: std :: mem :: offset_of ! (ALimitedAxesImuUncalibratedEvent__bindgen_ty_3__bindgen_ty_1 , x_supported) - 0usize] ; + ["Offset of field: ALimitedAxesImuUncalibratedEvent__bindgen_ty_3__bindgen_ty_1::y_supported"] [:: std :: mem :: offset_of ! (ALimitedAxesImuUncalibratedEvent__bindgen_ty_3__bindgen_ty_1 , y_supported) - 4usize] ; + ["Offset of field: ALimitedAxesImuUncalibratedEvent__bindgen_ty_3__bindgen_ty_1::z_supported"] [:: std :: mem :: offset_of ! (ALimitedAxesImuUncalibratedEvent__bindgen_ty_3__bindgen_ty_1 , z_supported) - 8usize] ; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ALimitedAxesImuUncalibratedEvent__bindgen_ty_3"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of ALimitedAxesImuUncalibratedEvent__bindgen_ty_3"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ALimitedAxesImuUncalibratedEvent__bindgen_ty_3::supported"][::std::mem::offset_of!( + ALimitedAxesImuUncalibratedEvent__bindgen_ty_3, + supported + ) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ALimitedAxesImuUncalibratedEvent"] + [::std::mem::size_of::() - 36usize]; + ["Alignment of ALimitedAxesImuUncalibratedEvent"] + [::std::mem::align_of::() - 4usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct AHeadingEvent { pub heading: f32, pub accuracy: f32, } -#[test] -fn bindgen_test_layout_AHeadingEvent() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(AHeadingEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AHeadingEvent)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).heading) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AHeadingEvent), - "::", - stringify!(heading) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).accuracy) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AHeadingEvent), - "::", - stringify!(accuracy) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AHeadingEvent"][::std::mem::size_of::() - 8usize]; + ["Alignment of AHeadingEvent"][::std::mem::align_of::() - 4usize]; + ["Offset of field: AHeadingEvent::heading"] + [::std::mem::offset_of!(AHeadingEvent, heading) - 0usize]; + ["Offset of field: AHeadingEvent::accuracy"] + [::std::mem::offset_of!(AHeadingEvent, accuracy) - 4usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub struct ASensorEvent { @@ -15426,399 +10758,117 @@ pub union ASensorEvent__bindgen_ty_1__bindgen_ty_1 { pub limited_axes_imu_uncalibrated: ALimitedAxesImuUncalibratedEvent, pub heading: AHeadingEvent, } -#[test] -fn bindgen_test_layout_ASensorEvent__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!( - "Size of: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).vector) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(vector) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).acceleration) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(acceleration) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gyro) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(gyro) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).magnetic) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(magnetic) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).temperature) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(temperature) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).distance) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(distance) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).light) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(light) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pressure) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(pressure) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).relative_humidity) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(relative_humidity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uncalibrated_acceleration) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(uncalibrated_acceleration) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uncalibrated_gyro) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(uncalibrated_gyro) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uncalibrated_magnetic) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(uncalibrated_magnetic) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).meta_data) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(meta_data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).heart_rate) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(heart_rate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dynamic_sensor_meta) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(dynamic_sensor_meta) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).additional_info) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(additional_info) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).head_tracker) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(head_tracker) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).limited_axes_imu) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(limited_axes_imu) - ) - ); - assert_eq!( - unsafe { - ::std::ptr::addr_of!((*ptr).limited_axes_imu_uncalibrated) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(limited_axes_imu_uncalibrated) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).heading) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(heading) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASensorEvent__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::size_of::() - 64usize]; + ["Alignment of ASensorEvent__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::data"] + [::std::mem::offset_of!(ASensorEvent__bindgen_ty_1__bindgen_ty_1, data) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::vector"] + [::std::mem::offset_of!(ASensorEvent__bindgen_ty_1__bindgen_ty_1, vector) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::acceleration"] + [::std::mem::offset_of!(ASensorEvent__bindgen_ty_1__bindgen_ty_1, acceleration) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::gyro"] + [::std::mem::offset_of!(ASensorEvent__bindgen_ty_1__bindgen_ty_1, gyro) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::magnetic"] + [::std::mem::offset_of!(ASensorEvent__bindgen_ty_1__bindgen_ty_1, magnetic) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::temperature"] + [::std::mem::offset_of!(ASensorEvent__bindgen_ty_1__bindgen_ty_1, temperature) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::distance"] + [::std::mem::offset_of!(ASensorEvent__bindgen_ty_1__bindgen_ty_1, distance) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::light"] + [::std::mem::offset_of!(ASensorEvent__bindgen_ty_1__bindgen_ty_1, light) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::pressure"] + [::std::mem::offset_of!(ASensorEvent__bindgen_ty_1__bindgen_ty_1, pressure) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::relative_humidity"][::std::mem::offset_of!( + ASensorEvent__bindgen_ty_1__bindgen_ty_1, + relative_humidity + ) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::uncalibrated_acceleration"][::std::mem::offset_of!( + ASensorEvent__bindgen_ty_1__bindgen_ty_1, + uncalibrated_acceleration + ) + - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::uncalibrated_gyro"][::std::mem::offset_of!( + ASensorEvent__bindgen_ty_1__bindgen_ty_1, + uncalibrated_gyro + ) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::uncalibrated_magnetic"][::std::mem::offset_of!( + ASensorEvent__bindgen_ty_1__bindgen_ty_1, + uncalibrated_magnetic + ) + - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::meta_data"] + [::std::mem::offset_of!(ASensorEvent__bindgen_ty_1__bindgen_ty_1, meta_data) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::heart_rate"] + [::std::mem::offset_of!(ASensorEvent__bindgen_ty_1__bindgen_ty_1, heart_rate) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::dynamic_sensor_meta"][::std::mem::offset_of!( + ASensorEvent__bindgen_ty_1__bindgen_ty_1, + dynamic_sensor_meta + ) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::additional_info"][::std::mem::offset_of!( + ASensorEvent__bindgen_ty_1__bindgen_ty_1, + additional_info + ) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::head_tracker"] + [::std::mem::offset_of!(ASensorEvent__bindgen_ty_1__bindgen_ty_1, head_tracker) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::limited_axes_imu"][::std::mem::offset_of!( + ASensorEvent__bindgen_ty_1__bindgen_ty_1, + limited_axes_imu + ) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::limited_axes_imu_uncalibrated"][::std::mem::offset_of!( + ASensorEvent__bindgen_ty_1__bindgen_ty_1, + limited_axes_imu_uncalibrated + ) + - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::heading"] + [::std::mem::offset_of!(ASensorEvent__bindgen_ty_1__bindgen_ty_1, heading) - 0usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub union ASensorEvent__bindgen_ty_1__bindgen_ty_2 { pub data: [u64; 8usize], pub step_counter: u64, } -#[test] -fn bindgen_test_layout_ASensorEvent__bindgen_ty_1__bindgen_ty_2() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!( - "Size of: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_2) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).step_counter) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(step_counter) - ) - ); -} -#[test] -fn bindgen_test_layout_ASensorEvent__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(ASensorEvent__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(ASensorEvent__bindgen_ty_1)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).u64_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1), - "::", - stringify!(u64_) - ) - ); -} -#[test] -fn bindgen_test_layout_ASensorEvent() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 104usize, - concat!("Size of: ", stringify!(ASensorEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(ASensorEvent)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent), - "::", - stringify!(version) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sensor) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent), - "::", - stringify!(sensor) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved0) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent), - "::", - stringify!(reserved0) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).timestamp) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent), - "::", - stringify!(timestamp) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved1) as usize - ptr as usize }, - 92usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent), - "::", - stringify!(reserved1) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASensorEvent__bindgen_ty_1__bindgen_ty_2"] + [::std::mem::size_of::() - 64usize]; + ["Alignment of ASensorEvent__bindgen_ty_1__bindgen_ty_2"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_2::data"] + [::std::mem::offset_of!(ASensorEvent__bindgen_ty_1__bindgen_ty_2, data) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_2::step_counter"] + [::std::mem::offset_of!(ASensorEvent__bindgen_ty_1__bindgen_ty_2, step_counter) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASensorEvent__bindgen_ty_1"] + [::std::mem::size_of::() - 64usize]; + ["Alignment of ASensorEvent__bindgen_ty_1"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1::u64_"] + [::std::mem::offset_of!(ASensorEvent__bindgen_ty_1, u64_) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASensorEvent"][::std::mem::size_of::() - 104usize]; + ["Alignment of ASensorEvent"][::std::mem::align_of::() - 8usize]; + ["Offset of field: ASensorEvent::version"] + [::std::mem::offset_of!(ASensorEvent, version) - 0usize]; + ["Offset of field: ASensorEvent::sensor"] + [::std::mem::offset_of!(ASensorEvent, sensor) - 4usize]; + ["Offset of field: ASensorEvent::type_"][::std::mem::offset_of!(ASensorEvent, type_) - 8usize]; + ["Offset of field: ASensorEvent::reserved0"] + [::std::mem::offset_of!(ASensorEvent, reserved0) - 12usize]; + ["Offset of field: ASensorEvent::timestamp"] + [::std::mem::offset_of!(ASensorEvent, timestamp) - 16usize]; + ["Offset of field: ASensorEvent::flags"][::std::mem::offset_of!(ASensorEvent, flags) - 88usize]; + ["Offset of field: ASensorEvent::reserved1"] + [::std::mem::offset_of!(ASensorEvent, reserved1) - 92usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ASensorManager { @@ -16427,71 +11477,21 @@ pub struct sync_merge_data { pub flags: __u32, pub pad: __u32, } -#[test] -fn bindgen_test_layout_sync_merge_data() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(sync_merge_data)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(sync_merge_data)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sync_merge_data), - "::", - stringify!(name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fd2) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(sync_merge_data), - "::", - stringify!(fd2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fence) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(sync_merge_data), - "::", - stringify!(fence) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(sync_merge_data), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(sync_merge_data), - "::", - stringify!(pad) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sync_merge_data"][::std::mem::size_of::() - 48usize]; + ["Alignment of sync_merge_data"][::std::mem::align_of::() - 4usize]; + ["Offset of field: sync_merge_data::name"] + [::std::mem::offset_of!(sync_merge_data, name) - 0usize]; + ["Offset of field: sync_merge_data::fd2"] + [::std::mem::offset_of!(sync_merge_data, fd2) - 32usize]; + ["Offset of field: sync_merge_data::fence"] + [::std::mem::offset_of!(sync_merge_data, fence) - 36usize]; + ["Offset of field: sync_merge_data::flags"] + [::std::mem::offset_of!(sync_merge_data, flags) - 40usize]; + ["Offset of field: sync_merge_data::pad"] + [::std::mem::offset_of!(sync_merge_data, pad) - 44usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct sync_fence_info { @@ -16501,71 +11501,21 @@ pub struct sync_fence_info { pub flags: __u32, pub timestamp_ns: __u64, } -#[test] -fn bindgen_test_layout_sync_fence_info() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 80usize, - concat!("Size of: ", stringify!(sync_fence_info)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(sync_fence_info)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).obj_name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sync_fence_info), - "::", - stringify!(obj_name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).driver_name) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(sync_fence_info), - "::", - stringify!(driver_name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).status) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(sync_fence_info), - "::", - stringify!(status) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 68usize, - concat!( - "Offset of field: ", - stringify!(sync_fence_info), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).timestamp_ns) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(sync_fence_info), - "::", - stringify!(timestamp_ns) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sync_fence_info"][::std::mem::size_of::() - 80usize]; + ["Alignment of sync_fence_info"][::std::mem::align_of::() - 8usize]; + ["Offset of field: sync_fence_info::obj_name"] + [::std::mem::offset_of!(sync_fence_info, obj_name) - 0usize]; + ["Offset of field: sync_fence_info::driver_name"] + [::std::mem::offset_of!(sync_fence_info, driver_name) - 32usize]; + ["Offset of field: sync_fence_info::status"] + [::std::mem::offset_of!(sync_fence_info, status) - 64usize]; + ["Offset of field: sync_fence_info::flags"] + [::std::mem::offset_of!(sync_fence_info, flags) - 68usize]; + ["Offset of field: sync_fence_info::timestamp_ns"] + [::std::mem::offset_of!(sync_fence_info, timestamp_ns) - 72usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct sync_file_info { @@ -16576,122 +11526,37 @@ pub struct sync_file_info { pub pad: __u32, pub sync_fence_info: __u64, } -#[test] -fn bindgen_test_layout_sync_file_info() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(sync_file_info)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(sync_file_info)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sync_file_info), - "::", - stringify!(name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).status) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(sync_file_info), - "::", - stringify!(status) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(sync_file_info), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).num_fences) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(sync_file_info), - "::", - stringify!(num_fences) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(sync_file_info), - "::", - stringify!(pad) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sync_fence_info) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(sync_file_info), - "::", - stringify!(sync_fence_info) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sync_file_info"][::std::mem::size_of::() - 56usize]; + ["Alignment of sync_file_info"][::std::mem::align_of::() - 8usize]; + ["Offset of field: sync_file_info::name"] + [::std::mem::offset_of!(sync_file_info, name) - 0usize]; + ["Offset of field: sync_file_info::status"] + [::std::mem::offset_of!(sync_file_info, status) - 32usize]; + ["Offset of field: sync_file_info::flags"] + [::std::mem::offset_of!(sync_file_info, flags) - 36usize]; + ["Offset of field: sync_file_info::num_fences"] + [::std::mem::offset_of!(sync_file_info, num_fences) - 40usize]; + ["Offset of field: sync_file_info::pad"][::std::mem::offset_of!(sync_file_info, pad) - 44usize]; + ["Offset of field: sync_file_info::sync_fence_info"] + [::std::mem::offset_of!(sync_file_info, sync_fence_info) - 48usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct sync_set_deadline { pub deadline_ns: __u64, pub pad: __u64, } -#[test] -fn bindgen_test_layout_sync_set_deadline() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(sync_set_deadline)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(sync_set_deadline)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).deadline_ns) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sync_set_deadline), - "::", - stringify!(deadline_ns) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(sync_set_deadline), - "::", - stringify!(pad) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sync_set_deadline"][::std::mem::size_of::() - 16usize]; + ["Alignment of sync_set_deadline"][::std::mem::align_of::() - 8usize]; + ["Offset of field: sync_set_deadline::deadline_ns"] + [::std::mem::offset_of!(sync_set_deadline, deadline_ns) - 0usize]; + ["Offset of field: sync_set_deadline::pad"] + [::std::mem::offset_of!(sync_set_deadline, pad) - 8usize]; +}; extern "C" { pub fn sync_merge(name: *const ::std::os::raw::c_char, fd1: i32, fd2: i32) -> i32; } @@ -16812,131 +11677,22 @@ pub struct tm { pub tm_gmtoff: ::std::os::raw::c_long, pub tm_zone: *const ::std::os::raw::c_char, } -#[test] -fn bindgen_test_layout_tm() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 44usize, - concat!("Size of: ", stringify!(tm)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(tm)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tm_sec) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_sec) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tm_min) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_min) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tm_hour) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_hour) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tm_mday) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_mday) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tm_mon) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_mon) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tm_year) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_year) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tm_wday) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_wday) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tm_yday) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_yday) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tm_isdst) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_isdst) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tm_gmtoff) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_gmtoff) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tm_zone) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_zone) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of tm"][::std::mem::size_of::() - 44usize]; + ["Alignment of tm"][::std::mem::align_of::() - 4usize]; + ["Offset of field: tm::tm_sec"][::std::mem::offset_of!(tm, tm_sec) - 0usize]; + ["Offset of field: tm::tm_min"][::std::mem::offset_of!(tm, tm_min) - 4usize]; + ["Offset of field: tm::tm_hour"][::std::mem::offset_of!(tm, tm_hour) - 8usize]; + ["Offset of field: tm::tm_mday"][::std::mem::offset_of!(tm, tm_mday) - 12usize]; + ["Offset of field: tm::tm_mon"][::std::mem::offset_of!(tm, tm_mon) - 16usize]; + ["Offset of field: tm::tm_year"][::std::mem::offset_of!(tm, tm_year) - 20usize]; + ["Offset of field: tm::tm_wday"][::std::mem::offset_of!(tm, tm_wday) - 24usize]; + ["Offset of field: tm::tm_yday"][::std::mem::offset_of!(tm, tm_yday) - 28usize]; + ["Offset of field: tm::tm_isdst"][::std::mem::offset_of!(tm, tm_isdst) - 32usize]; + ["Offset of field: tm::tm_gmtoff"][::std::mem::offset_of!(tm, tm_gmtoff) - 36usize]; + ["Offset of field: tm::tm_zone"][::std::mem::offset_of!(tm, tm_zone) - 40usize]; +}; extern "C" { pub fn time(__t: *mut time_t) -> time_t; } @@ -21127,42 +15883,17 @@ pub struct ACameraMetadata_rational { pub numerator: i32, pub denominator: i32, } -#[test] -fn bindgen_test_layout_ACameraMetadata_rational() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(ACameraMetadata_rational)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(ACameraMetadata_rational)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).numerator) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_rational), - "::", - stringify!(numerator) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).denominator) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_rational), - "::", - stringify!(denominator) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACameraMetadata_rational"] + [::std::mem::size_of::() - 8usize]; + ["Alignment of ACameraMetadata_rational"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ACameraMetadata_rational::numerator"] + [::std::mem::offset_of!(ACameraMetadata_rational, numerator) - 0usize]; + ["Offset of field: ACameraMetadata_rational::denominator"] + [::std::mem::offset_of!(ACameraMetadata_rational, denominator) - 4usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub struct ACameraMetadata_entry { @@ -21181,141 +15912,39 @@ pub union ACameraMetadata_entry__bindgen_ty_1 { pub d: *mut f64, pub r: *mut ACameraMetadata_rational, } -#[test] -fn bindgen_test_layout_ACameraMetadata_entry__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(ACameraMetadata_entry__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ACameraMetadata_entry__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).u8_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_entry__bindgen_ty_1), - "::", - stringify!(u8_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).i32_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_entry__bindgen_ty_1), - "::", - stringify!(i32_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).f) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_entry__bindgen_ty_1), - "::", - stringify!(f) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).i64_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_entry__bindgen_ty_1), - "::", - stringify!(i64_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).d) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_entry__bindgen_ty_1), - "::", - stringify!(d) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).r) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_entry__bindgen_ty_1), - "::", - stringify!(r) - ) - ); -} -#[test] -fn bindgen_test_layout_ACameraMetadata_entry() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(ACameraMetadata_entry)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(ACameraMetadata_entry)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tag) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_entry), - "::", - stringify!(tag) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_entry), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_entry), - "::", - stringify!(count) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_entry), - "::", - stringify!(data) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACameraMetadata_entry__bindgen_ty_1"] + [::std::mem::size_of::() - 4usize]; + ["Alignment of ACameraMetadata_entry__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ACameraMetadata_entry__bindgen_ty_1::u8_"] + [::std::mem::offset_of!(ACameraMetadata_entry__bindgen_ty_1, u8_) - 0usize]; + ["Offset of field: ACameraMetadata_entry__bindgen_ty_1::i32_"] + [::std::mem::offset_of!(ACameraMetadata_entry__bindgen_ty_1, i32_) - 0usize]; + ["Offset of field: ACameraMetadata_entry__bindgen_ty_1::f"] + [::std::mem::offset_of!(ACameraMetadata_entry__bindgen_ty_1, f) - 0usize]; + ["Offset of field: ACameraMetadata_entry__bindgen_ty_1::i64_"] + [::std::mem::offset_of!(ACameraMetadata_entry__bindgen_ty_1, i64_) - 0usize]; + ["Offset of field: ACameraMetadata_entry__bindgen_ty_1::d"] + [::std::mem::offset_of!(ACameraMetadata_entry__bindgen_ty_1, d) - 0usize]; + ["Offset of field: ACameraMetadata_entry__bindgen_ty_1::r"] + [::std::mem::offset_of!(ACameraMetadata_entry__bindgen_ty_1, r) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACameraMetadata_entry"][::std::mem::size_of::() - 16usize]; + ["Alignment of ACameraMetadata_entry"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ACameraMetadata_entry::tag"] + [::std::mem::offset_of!(ACameraMetadata_entry, tag) - 0usize]; + ["Offset of field: ACameraMetadata_entry::type_"] + [::std::mem::offset_of!(ACameraMetadata_entry, type_) - 4usize]; + ["Offset of field: ACameraMetadata_entry::count"] + [::std::mem::offset_of!(ACameraMetadata_entry, count) - 8usize]; + ["Offset of field: ACameraMetadata_entry::data"] + [::std::mem::offset_of!(ACameraMetadata_entry, data) - 12usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub struct ACameraMetadata_const_entry { @@ -21334,144 +15963,40 @@ pub union ACameraMetadata_const_entry__bindgen_ty_1 { pub d: *const f64, pub r: *const ACameraMetadata_rational, } -#[test] -fn bindgen_test_layout_ACameraMetadata_const_entry__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 4usize, - concat!( - "Size of: ", - stringify!(ACameraMetadata_const_entry__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ACameraMetadata_const_entry__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).u8_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_const_entry__bindgen_ty_1), - "::", - stringify!(u8_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).i32_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_const_entry__bindgen_ty_1), - "::", - stringify!(i32_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).f) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_const_entry__bindgen_ty_1), - "::", - stringify!(f) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).i64_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_const_entry__bindgen_ty_1), - "::", - stringify!(i64_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).d) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_const_entry__bindgen_ty_1), - "::", - stringify!(d) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).r) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_const_entry__bindgen_ty_1), - "::", - stringify!(r) - ) - ); -} -#[test] -fn bindgen_test_layout_ACameraMetadata_const_entry() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(ACameraMetadata_const_entry)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(ACameraMetadata_const_entry)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tag) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_const_entry), - "::", - stringify!(tag) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_const_entry), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_const_entry), - "::", - stringify!(count) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_const_entry), - "::", - stringify!(data) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACameraMetadata_const_entry__bindgen_ty_1"] + [::std::mem::size_of::() - 4usize]; + ["Alignment of ACameraMetadata_const_entry__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ACameraMetadata_const_entry__bindgen_ty_1::u8_"] + [::std::mem::offset_of!(ACameraMetadata_const_entry__bindgen_ty_1, u8_) - 0usize]; + ["Offset of field: ACameraMetadata_const_entry__bindgen_ty_1::i32_"] + [::std::mem::offset_of!(ACameraMetadata_const_entry__bindgen_ty_1, i32_) - 0usize]; + ["Offset of field: ACameraMetadata_const_entry__bindgen_ty_1::f"] + [::std::mem::offset_of!(ACameraMetadata_const_entry__bindgen_ty_1, f) - 0usize]; + ["Offset of field: ACameraMetadata_const_entry__bindgen_ty_1::i64_"] + [::std::mem::offset_of!(ACameraMetadata_const_entry__bindgen_ty_1, i64_) - 0usize]; + ["Offset of field: ACameraMetadata_const_entry__bindgen_ty_1::d"] + [::std::mem::offset_of!(ACameraMetadata_const_entry__bindgen_ty_1, d) - 0usize]; + ["Offset of field: ACameraMetadata_const_entry__bindgen_ty_1::r"] + [::std::mem::offset_of!(ACameraMetadata_const_entry__bindgen_ty_1, r) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACameraMetadata_const_entry"] + [::std::mem::size_of::() - 16usize]; + ["Alignment of ACameraMetadata_const_entry"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ACameraMetadata_const_entry::tag"] + [::std::mem::offset_of!(ACameraMetadata_const_entry, tag) - 0usize]; + ["Offset of field: ACameraMetadata_const_entry::type_"] + [::std::mem::offset_of!(ACameraMetadata_const_entry, type_) - 4usize]; + ["Offset of field: ACameraMetadata_const_entry::count"] + [::std::mem::offset_of!(ACameraMetadata_const_entry, count) - 8usize]; + ["Offset of field: ACameraMetadata_const_entry::data"] + [::std::mem::offset_of!(ACameraMetadata_const_entry, data) - 12usize]; +}; extern "C" { pub fn ACameraMetadata_getConstEntry( metadata: *const ACameraMetadata, @@ -21700,68 +16225,21 @@ pub struct ACameraCaptureSession_stateCallbacks { pub onReady: ACameraCaptureSession_stateCallback, pub onActive: ACameraCaptureSession_stateCallback, } -#[test] -fn bindgen_test_layout_ACameraCaptureSession_stateCallbacks() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!( - "Size of: ", - stringify!(ACameraCaptureSession_stateCallbacks) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ACameraCaptureSession_stateCallbacks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).context) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_stateCallbacks), - "::", - stringify!(context) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onClosed) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_stateCallbacks), - "::", - stringify!(onClosed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onReady) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_stateCallbacks), - "::", - stringify!(onReady) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onActive) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_stateCallbacks), - "::", - stringify!(onActive) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACameraCaptureSession_stateCallbacks"] + [::std::mem::size_of::() - 16usize]; + ["Alignment of ACameraCaptureSession_stateCallbacks"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ACameraCaptureSession_stateCallbacks::context"] + [::std::mem::offset_of!(ACameraCaptureSession_stateCallbacks, context) - 0usize]; + ["Offset of field: ACameraCaptureSession_stateCallbacks::onClosed"] + [::std::mem::offset_of!(ACameraCaptureSession_stateCallbacks, onClosed) - 4usize]; + ["Offset of field: ACameraCaptureSession_stateCallbacks::onReady"] + [::std::mem::offset_of!(ACameraCaptureSession_stateCallbacks, onReady) - 8usize]; + ["Offset of field: ACameraCaptureSession_stateCallbacks::onActive"] + [::std::mem::offset_of!(ACameraCaptureSession_stateCallbacks, onActive) - 12usize]; +}; pub type ACameraCaptureSession_prepareCallback = ::std::option::Option< unsafe extern "C" fn( context: *mut ::std::os::raw::c_void, @@ -21780,62 +16258,20 @@ pub struct ACameraCaptureFailure { pub sequenceId: ::std::os::raw::c_int, pub wasImageCaptured: bool, } -#[test] -fn bindgen_test_layout_ACameraCaptureFailure() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(ACameraCaptureFailure)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(ACameraCaptureFailure)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).frameNumber) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureFailure), - "::", - stringify!(frameNumber) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reason) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureFailure), - "::", - stringify!(reason) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sequenceId) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureFailure), - "::", - stringify!(sequenceId) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).wasImageCaptured) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureFailure), - "::", - stringify!(wasImageCaptured) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACameraCaptureFailure"][::std::mem::size_of::() - 24usize]; + ["Alignment of ACameraCaptureFailure"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: ACameraCaptureFailure::frameNumber"] + [::std::mem::offset_of!(ACameraCaptureFailure, frameNumber) - 0usize]; + ["Offset of field: ACameraCaptureFailure::reason"] + [::std::mem::offset_of!(ACameraCaptureFailure, reason) - 8usize]; + ["Offset of field: ACameraCaptureFailure::sequenceId"] + [::std::mem::offset_of!(ACameraCaptureFailure, sequenceId) - 12usize]; + ["Offset of field: ACameraCaptureFailure::wasImageCaptured"] + [::std::mem::offset_of!(ACameraCaptureFailure, wasImageCaptured) - 16usize]; +}; pub type ACameraCaptureSession_captureCallback_start = ::std::option::Option< unsafe extern "C" fn( context: *mut ::std::os::raw::c_void, @@ -21896,108 +16332,41 @@ pub struct ACameraCaptureSession_captureCallbacks { pub onCaptureSequenceAborted: ACameraCaptureSession_captureCallback_sequenceAbort, pub onCaptureBufferLost: ACameraCaptureSession_captureCallback_bufferLost, } -#[test] -fn bindgen_test_layout_ACameraCaptureSession_captureCallbacks() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!( - "Size of: ", - stringify!(ACameraCaptureSession_captureCallbacks) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ACameraCaptureSession_captureCallbacks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).context) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_captureCallbacks), - "::", - stringify!(context) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureStarted) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_captureCallbacks), - "::", - stringify!(onCaptureStarted) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureProgressed) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_captureCallbacks), - "::", - stringify!(onCaptureProgressed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureCompleted) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_captureCallbacks), - "::", - stringify!(onCaptureCompleted) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureFailed) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_captureCallbacks), - "::", - stringify!(onCaptureFailed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureSequenceCompleted) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_captureCallbacks), - "::", - stringify!(onCaptureSequenceCompleted) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureSequenceAborted) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_captureCallbacks), - "::", - stringify!(onCaptureSequenceAborted) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureBufferLost) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_captureCallbacks), - "::", - stringify!(onCaptureBufferLost) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACameraCaptureSession_captureCallbacks"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of ACameraCaptureSession_captureCallbacks"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ACameraCaptureSession_captureCallbacks::context"] + [::std::mem::offset_of!(ACameraCaptureSession_captureCallbacks, context) - 0usize]; + ["Offset of field: ACameraCaptureSession_captureCallbacks::onCaptureStarted"] + [::std::mem::offset_of!(ACameraCaptureSession_captureCallbacks, onCaptureStarted) - 4usize]; + ["Offset of field: ACameraCaptureSession_captureCallbacks::onCaptureProgressed"][::std::mem::offset_of!( + ACameraCaptureSession_captureCallbacks, + onCaptureProgressed + ) - 8usize]; + ["Offset of field: ACameraCaptureSession_captureCallbacks::onCaptureCompleted"][::std::mem::offset_of!( + ACameraCaptureSession_captureCallbacks, + onCaptureCompleted + ) - 12usize]; + ["Offset of field: ACameraCaptureSession_captureCallbacks::onCaptureFailed"] + [::std::mem::offset_of!(ACameraCaptureSession_captureCallbacks, onCaptureFailed) - 16usize]; + ["Offset of field: ACameraCaptureSession_captureCallbacks::onCaptureSequenceCompleted"][::std::mem::offset_of!( + ACameraCaptureSession_captureCallbacks, + onCaptureSequenceCompleted + ) + - 20usize]; + ["Offset of field: ACameraCaptureSession_captureCallbacks::onCaptureSequenceAborted"][::std::mem::offset_of!( + ACameraCaptureSession_captureCallbacks, + onCaptureSequenceAborted + ) + - 24usize]; + ["Offset of field: ACameraCaptureSession_captureCallbacks::onCaptureBufferLost"][::std::mem::offset_of!( + ACameraCaptureSession_captureCallbacks, + onCaptureBufferLost + ) - 28usize]; +}; pub const CAPTURE_SEQUENCE_ID_NONE: _bindgen_ty_67 = -1; pub type _bindgen_ty_67 = ::std::os::raw::c_int; extern "C" { @@ -22070,42 +16439,17 @@ pub struct ALogicalCameraCaptureFailure { pub captureFailure: ACameraCaptureFailure, pub physicalCameraId: *const ::std::os::raw::c_char, } -#[test] -fn bindgen_test_layout_ALogicalCameraCaptureFailure() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(ALogicalCameraCaptureFailure)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(ALogicalCameraCaptureFailure)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).captureFailure) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ALogicalCameraCaptureFailure), - "::", - stringify!(captureFailure) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).physicalCameraId) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(ALogicalCameraCaptureFailure), - "::", - stringify!(physicalCameraId) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ALogicalCameraCaptureFailure"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of ALogicalCameraCaptureFailure"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: ALogicalCameraCaptureFailure::captureFailure"] + [::std::mem::offset_of!(ALogicalCameraCaptureFailure, captureFailure) - 0usize]; + ["Offset of field: ALogicalCameraCaptureFailure::physicalCameraId"] + [::std::mem::offset_of!(ALogicalCameraCaptureFailure, physicalCameraId) - 24usize]; +}; pub type ACameraCaptureSession_logicalCamera_captureCallback_failed = ::std::option::Option< unsafe extern "C" fn( context: *mut ::std::os::raw::c_void, @@ -22126,112 +16470,28 @@ pub struct ACameraCaptureSession_logicalCamera_captureCallbacks { pub onCaptureSequenceAborted: ACameraCaptureSession_captureCallback_sequenceAbort, pub onCaptureBufferLost: ACameraCaptureSession_captureCallback_bufferLost, } -#[test] -fn bindgen_test_layout_ACameraCaptureSession_logicalCamera_captureCallbacks() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!( - "Size of: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacks) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).context) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacks), - "::", - stringify!(context) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureStarted) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacks), - "::", - stringify!(onCaptureStarted) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureProgressed) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacks), - "::", - stringify!(onCaptureProgressed) - ) - ); - assert_eq!( - unsafe { - ::std::ptr::addr_of!((*ptr).onLogicalCameraCaptureCompleted) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacks), - "::", - stringify!(onLogicalCameraCaptureCompleted) - ) - ); - assert_eq!( - unsafe { - ::std::ptr::addr_of!((*ptr).onLogicalCameraCaptureFailed) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacks), - "::", - stringify!(onLogicalCameraCaptureFailed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureSequenceCompleted) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacks), - "::", - stringify!(onCaptureSequenceCompleted) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureSequenceAborted) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacks), - "::", - stringify!(onCaptureSequenceAborted) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureBufferLost) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacks), - "::", - stringify!(onCaptureBufferLost) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACameraCaptureSession_logicalCamera_captureCallbacks"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of ACameraCaptureSession_logicalCamera_captureCallbacks"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ACameraCaptureSession_logicalCamera_captureCallbacks::context"][::std::mem::offset_of!( + ACameraCaptureSession_logicalCamera_captureCallbacks, + context + ) - 0usize]; + ["Offset of field: ACameraCaptureSession_logicalCamera_captureCallbacks::onCaptureStarted"][::std::mem::offset_of!( + ACameraCaptureSession_logicalCamera_captureCallbacks, + onCaptureStarted + ) + - 4usize]; + ["Offset of field: ACameraCaptureSession_logicalCamera_captureCallbacks::onCaptureProgressed"] [:: std :: mem :: offset_of ! (ACameraCaptureSession_logicalCamera_captureCallbacks , onCaptureProgressed) - 8usize] ; + ["Offset of field: ACameraCaptureSession_logicalCamera_captureCallbacks::onLogicalCameraCaptureCompleted"] [:: std :: mem :: offset_of ! (ACameraCaptureSession_logicalCamera_captureCallbacks , onLogicalCameraCaptureCompleted) - 12usize] ; + ["Offset of field: ACameraCaptureSession_logicalCamera_captureCallbacks::onLogicalCameraCaptureFailed"] [:: std :: mem :: offset_of ! (ACameraCaptureSession_logicalCamera_captureCallbacks , onLogicalCameraCaptureFailed) - 16usize] ; + ["Offset of field: ACameraCaptureSession_logicalCamera_captureCallbacks::onCaptureSequenceCompleted"] [:: std :: mem :: offset_of ! (ACameraCaptureSession_logicalCamera_captureCallbacks , onCaptureSequenceCompleted) - 20usize] ; + ["Offset of field: ACameraCaptureSession_logicalCamera_captureCallbacks::onCaptureSequenceAborted"] [:: std :: mem :: offset_of ! (ACameraCaptureSession_logicalCamera_captureCallbacks , onCaptureSequenceAborted) - 24usize] ; + ["Offset of field: ACameraCaptureSession_logicalCamera_captureCallbacks::onCaptureBufferLost"] [:: std :: mem :: offset_of ! (ACameraCaptureSession_logicalCamera_captureCallbacks , onCaptureBufferLost) - 28usize] ; +}; extern "C" { pub fn ACameraCaptureSession_logicalCamera_capture( session: *mut ACameraCaptureSession, @@ -22271,108 +16531,45 @@ pub struct ACameraCaptureSession_captureCallbacksV2 { pub onCaptureSequenceAborted: ACameraCaptureSession_captureCallback_sequenceAbort, pub onCaptureBufferLost: ACameraCaptureSession_captureCallback_bufferLost, } -#[test] -fn bindgen_test_layout_ACameraCaptureSession_captureCallbacksV2() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!( - "Size of: ", - stringify!(ACameraCaptureSession_captureCallbacksV2) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ACameraCaptureSession_captureCallbacksV2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).context) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_captureCallbacksV2), - "::", - stringify!(context) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureStarted) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_captureCallbacksV2), - "::", - stringify!(onCaptureStarted) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureProgressed) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_captureCallbacksV2), - "::", - stringify!(onCaptureProgressed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureCompleted) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_captureCallbacksV2), - "::", - stringify!(onCaptureCompleted) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureFailed) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_captureCallbacksV2), - "::", - stringify!(onCaptureFailed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureSequenceCompleted) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_captureCallbacksV2), - "::", - stringify!(onCaptureSequenceCompleted) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureSequenceAborted) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_captureCallbacksV2), - "::", - stringify!(onCaptureSequenceAborted) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureBufferLost) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_captureCallbacksV2), - "::", - stringify!(onCaptureBufferLost) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACameraCaptureSession_captureCallbacksV2"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of ACameraCaptureSession_captureCallbacksV2"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ACameraCaptureSession_captureCallbacksV2::context"] + [::std::mem::offset_of!(ACameraCaptureSession_captureCallbacksV2, context) - 0usize]; + ["Offset of field: ACameraCaptureSession_captureCallbacksV2::onCaptureStarted"][::std::mem::offset_of!( + ACameraCaptureSession_captureCallbacksV2, + onCaptureStarted + ) - 4usize]; + ["Offset of field: ACameraCaptureSession_captureCallbacksV2::onCaptureProgressed"][::std::mem::offset_of!( + ACameraCaptureSession_captureCallbacksV2, + onCaptureProgressed + ) - 8usize]; + ["Offset of field: ACameraCaptureSession_captureCallbacksV2::onCaptureCompleted"][::std::mem::offset_of!( + ACameraCaptureSession_captureCallbacksV2, + onCaptureCompleted + ) - 12usize]; + ["Offset of field: ACameraCaptureSession_captureCallbacksV2::onCaptureFailed"][::std::mem::offset_of!( + ACameraCaptureSession_captureCallbacksV2, + onCaptureFailed + ) - 16usize]; + ["Offset of field: ACameraCaptureSession_captureCallbacksV2::onCaptureSequenceCompleted"][::std::mem::offset_of!( + ACameraCaptureSession_captureCallbacksV2, + onCaptureSequenceCompleted + ) + - 20usize]; + ["Offset of field: ACameraCaptureSession_captureCallbacksV2::onCaptureSequenceAborted"][::std::mem::offset_of!( + ACameraCaptureSession_captureCallbacksV2, + onCaptureSequenceAborted + ) + - 24usize]; + ["Offset of field: ACameraCaptureSession_captureCallbacksV2::onCaptureBufferLost"][::std::mem::offset_of!( + ACameraCaptureSession_captureCallbacksV2, + onCaptureBufferLost + ) - 28usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ACameraCaptureSession_logicalCamera_captureCallbacksV2 { @@ -22385,112 +16582,29 @@ pub struct ACameraCaptureSession_logicalCamera_captureCallbacksV2 { pub onCaptureSequenceAborted: ACameraCaptureSession_captureCallback_sequenceAbort, pub onCaptureBufferLost: ACameraCaptureSession_captureCallback_bufferLost, } -#[test] -fn bindgen_test_layout_ACameraCaptureSession_logicalCamera_captureCallbacksV2() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!( - "Size of: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacksV2) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacksV2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).context) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacksV2), - "::", - stringify!(context) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureStarted) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacksV2), - "::", - stringify!(onCaptureStarted) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureProgressed) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacksV2), - "::", - stringify!(onCaptureProgressed) - ) - ); - assert_eq!( - unsafe { - ::std::ptr::addr_of!((*ptr).onLogicalCameraCaptureCompleted) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacksV2), - "::", - stringify!(onLogicalCameraCaptureCompleted) - ) - ); - assert_eq!( - unsafe { - ::std::ptr::addr_of!((*ptr).onLogicalCameraCaptureFailed) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacksV2), - "::", - stringify!(onLogicalCameraCaptureFailed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureSequenceCompleted) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacksV2), - "::", - stringify!(onCaptureSequenceCompleted) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureSequenceAborted) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacksV2), - "::", - stringify!(onCaptureSequenceAborted) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureBufferLost) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacksV2), - "::", - stringify!(onCaptureBufferLost) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACameraCaptureSession_logicalCamera_captureCallbacksV2"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of ACameraCaptureSession_logicalCamera_captureCallbacksV2"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ACameraCaptureSession_logicalCamera_captureCallbacksV2::context"][::std::mem::offset_of!( + ACameraCaptureSession_logicalCamera_captureCallbacksV2, + context + ) + - 0usize]; + ["Offset of field: ACameraCaptureSession_logicalCamera_captureCallbacksV2::onCaptureStarted"][::std::mem::offset_of!( + ACameraCaptureSession_logicalCamera_captureCallbacksV2, + onCaptureStarted + ) + - 4usize]; + ["Offset of field: ACameraCaptureSession_logicalCamera_captureCallbacksV2::onCaptureProgressed"] [:: std :: mem :: offset_of ! (ACameraCaptureSession_logicalCamera_captureCallbacksV2 , onCaptureProgressed) - 8usize] ; + ["Offset of field: ACameraCaptureSession_logicalCamera_captureCallbacksV2::onLogicalCameraCaptureCompleted"] [:: std :: mem :: offset_of ! (ACameraCaptureSession_logicalCamera_captureCallbacksV2 , onLogicalCameraCaptureCompleted) - 12usize] ; + ["Offset of field: ACameraCaptureSession_logicalCamera_captureCallbacksV2::onLogicalCameraCaptureFailed"] [:: std :: mem :: offset_of ! (ACameraCaptureSession_logicalCamera_captureCallbacksV2 , onLogicalCameraCaptureFailed) - 16usize] ; + ["Offset of field: ACameraCaptureSession_logicalCamera_captureCallbacksV2::onCaptureSequenceCompleted"] [:: std :: mem :: offset_of ! (ACameraCaptureSession_logicalCamera_captureCallbacksV2 , onCaptureSequenceCompleted) - 20usize] ; + ["Offset of field: ACameraCaptureSession_logicalCamera_captureCallbacksV2::onCaptureSequenceAborted"] [:: std :: mem :: offset_of ! (ACameraCaptureSession_logicalCamera_captureCallbacksV2 , onCaptureSequenceAborted) - 24usize] ; + ["Offset of field: ACameraCaptureSession_logicalCamera_captureCallbacksV2::onCaptureBufferLost"] [:: std :: mem :: offset_of ! (ACameraCaptureSession_logicalCamera_captureCallbacksV2 , onCaptureBufferLost) - 28usize] ; +}; extern "C" { pub fn ACameraCaptureSession_captureV2( session: *mut ACameraCaptureSession, @@ -22546,41 +16660,15 @@ pub struct ACameraIdList { pub numCameras: ::std::os::raw::c_int, pub cameraIds: *mut *const ::std::os::raw::c_char, } -#[test] -fn bindgen_test_layout_ACameraIdList() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(ACameraIdList)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(ACameraIdList)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).numCameras) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraIdList), - "::", - stringify!(numCameras) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cameraIds) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ACameraIdList), - "::", - stringify!(cameraIds) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACameraIdList"][::std::mem::size_of::() - 8usize]; + ["Alignment of ACameraIdList"][::std::mem::align_of::() - 4usize]; + ["Offset of field: ACameraIdList::numCameras"] + [::std::mem::offset_of!(ACameraIdList, numCameras) - 0usize]; + ["Offset of field: ACameraIdList::cameraIds"] + [::std::mem::offset_of!(ACameraIdList, cameraIds) - 4usize]; +}; pub const ERROR_CAMERA_IN_USE: _bindgen_ty_68 = 1; pub const ERROR_MAX_CAMERAS_IN_USE: _bindgen_ty_68 = 2; pub const ERROR_CAMERA_DISABLED: _bindgen_ty_68 = 3; @@ -22604,52 +16692,19 @@ pub struct ACameraDevice_StateCallbacks { pub onDisconnected: ACameraDevice_StateCallback, pub onError: ACameraDevice_ErrorStateCallback, } -#[test] -fn bindgen_test_layout_ACameraDevice_StateCallbacks() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(ACameraDevice_StateCallbacks)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(ACameraDevice_StateCallbacks)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).context) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraDevice_StateCallbacks), - "::", - stringify!(context) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onDisconnected) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ACameraDevice_StateCallbacks), - "::", - stringify!(onDisconnected) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onError) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ACameraDevice_StateCallbacks), - "::", - stringify!(onError) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACameraDevice_StateCallbacks"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of ACameraDevice_StateCallbacks"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ACameraDevice_StateCallbacks::context"] + [::std::mem::offset_of!(ACameraDevice_StateCallbacks, context) - 0usize]; + ["Offset of field: ACameraDevice_StateCallbacks::onDisconnected"] + [::std::mem::offset_of!(ACameraDevice_StateCallbacks, onDisconnected) - 4usize]; + ["Offset of field: ACameraDevice_StateCallbacks::onError"] + [::std::mem::offset_of!(ACameraDevice_StateCallbacks, onError) - 8usize]; +}; pub type ACameraDevice_stateCallbacks = ACameraDevice_StateCallbacks; extern "C" { pub fn ACameraDevice_close(device: *mut ACameraDevice) -> camera_status_t; @@ -22818,55 +16873,19 @@ pub struct ACameraManager_AvailabilityListener { pub onCameraAvailable: ACameraManager_AvailabilityCallback, pub onCameraUnavailable: ACameraManager_AvailabilityCallback, } -#[test] -fn bindgen_test_layout_ACameraManager_AvailabilityListener() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(ACameraManager_AvailabilityListener)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ACameraManager_AvailabilityListener) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).context) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraManager_AvailabilityListener), - "::", - stringify!(context) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCameraAvailable) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ACameraManager_AvailabilityListener), - "::", - stringify!(onCameraAvailable) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCameraUnavailable) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ACameraManager_AvailabilityListener), - "::", - stringify!(onCameraUnavailable) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACameraManager_AvailabilityListener"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of ACameraManager_AvailabilityListener"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ACameraManager_AvailabilityListener::context"] + [::std::mem::offset_of!(ACameraManager_AvailabilityListener, context) - 0usize]; + ["Offset of field: ACameraManager_AvailabilityListener::onCameraAvailable"] + [::std::mem::offset_of!(ACameraManager_AvailabilityListener, onCameraAvailable) - 4usize]; + ["Offset of field: ACameraManager_AvailabilityListener::onCameraUnavailable"] + [::std::mem::offset_of!(ACameraManager_AvailabilityListener, onCameraUnavailable) - 8usize]; +}; pub type ACameraManager_AvailabilityCallbacks = ACameraManager_AvailabilityListener; extern "C" { pub fn ACameraManager_registerAvailabilityCallback( @@ -22906,80 +16925,31 @@ pub struct ACameraManager_ExtendedAvailabilityListener { pub onPhysicalCameraUnavailable: ACameraManager_PhysicalCameraAvailabilityCallback, pub reserved: [*mut ::std::os::raw::c_void; 4usize], } -#[test] -fn bindgen_test_layout_ACameraManager_ExtendedAvailabilityListener() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!( - "Size of: ", - stringify!(ACameraManager_ExtendedAvailabilityListener) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ACameraManager_ExtendedAvailabilityListener) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).availabilityCallbacks) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraManager_ExtendedAvailabilityListener), - "::", - stringify!(availabilityCallbacks) - ) - ); - assert_eq!( - unsafe { - ::std::ptr::addr_of!((*ptr).onCameraAccessPrioritiesChanged) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(ACameraManager_ExtendedAvailabilityListener), - "::", - stringify!(onCameraAccessPrioritiesChanged) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onPhysicalCameraAvailable) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(ACameraManager_ExtendedAvailabilityListener), - "::", - stringify!(onPhysicalCameraAvailable) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onPhysicalCameraUnavailable) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(ACameraManager_ExtendedAvailabilityListener), - "::", - stringify!(onPhysicalCameraUnavailable) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(ACameraManager_ExtendedAvailabilityListener), - "::", - stringify!(reserved) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACameraManager_ExtendedAvailabilityListener"] + [::std::mem::size_of::() - 40usize]; + ["Alignment of ACameraManager_ExtendedAvailabilityListener"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ACameraManager_ExtendedAvailabilityListener::availabilityCallbacks"][::std::mem::offset_of!( + ACameraManager_ExtendedAvailabilityListener, + availabilityCallbacks + ) + - 0usize]; + ["Offset of field: ACameraManager_ExtendedAvailabilityListener::onCameraAccessPrioritiesChanged"] [:: std :: mem :: offset_of ! (ACameraManager_ExtendedAvailabilityListener , onCameraAccessPrioritiesChanged) - 12usize] ; + ["Offset of field: ACameraManager_ExtendedAvailabilityListener::onPhysicalCameraAvailable"][::std::mem::offset_of!( + ACameraManager_ExtendedAvailabilityListener, + onPhysicalCameraAvailable + ) + - 16usize]; + ["Offset of field: ACameraManager_ExtendedAvailabilityListener::onPhysicalCameraUnavailable"][::std::mem::offset_of!( + ACameraManager_ExtendedAvailabilityListener, + onPhysicalCameraUnavailable + ) + - 20usize]; + ["Offset of field: ACameraManager_ExtendedAvailabilityListener::reserved"] + [::std::mem::offset_of!(ACameraManager_ExtendedAvailabilityListener, reserved) - 24usize]; +}; pub type ACameraManager_ExtendedAvailabilityCallbacks = ACameraManager_ExtendedAvailabilityListener; extern "C" { pub fn ACameraManager_registerExtendedAvailabilityCallback( @@ -23060,61 +17030,18 @@ pub struct AImageCropRect { pub right: i32, pub bottom: i32, } -#[test] -fn bindgen_test_layout_AImageCropRect() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(AImageCropRect)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AImageCropRect)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).left) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AImageCropRect), - "::", - stringify!(left) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).top) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AImageCropRect), - "::", - stringify!(top) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).right) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AImageCropRect), - "::", - stringify!(right) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bottom) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(AImageCropRect), - "::", - stringify!(bottom) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AImageCropRect"][::std::mem::size_of::() - 16usize]; + ["Alignment of AImageCropRect"][::std::mem::align_of::() - 4usize]; + ["Offset of field: AImageCropRect::left"] + [::std::mem::offset_of!(AImageCropRect, left) - 0usize]; + ["Offset of field: AImageCropRect::top"][::std::mem::offset_of!(AImageCropRect, top) - 4usize]; + ["Offset of field: AImageCropRect::right"] + [::std::mem::offset_of!(AImageCropRect, right) - 8usize]; + ["Offset of field: AImageCropRect::bottom"] + [::std::mem::offset_of!(AImageCropRect, bottom) - 12usize]; +}; extern "C" { pub fn AImage_delete(image: *mut AImage); } @@ -23229,42 +17156,17 @@ pub struct AImageReader_ImageListener { pub context: *mut ::std::os::raw::c_void, pub onImageAvailable: AImageReader_ImageCallback, } -#[test] -fn bindgen_test_layout_AImageReader_ImageListener() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(AImageReader_ImageListener)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AImageReader_ImageListener)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).context) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AImageReader_ImageListener), - "::", - stringify!(context) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onImageAvailable) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AImageReader_ImageListener), - "::", - stringify!(onImageAvailable) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AImageReader_ImageListener"] + [::std::mem::size_of::() - 8usize]; + ["Alignment of AImageReader_ImageListener"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: AImageReader_ImageListener::context"] + [::std::mem::offset_of!(AImageReader_ImageListener, context) - 0usize]; + ["Offset of field: AImageReader_ImageListener::onImageAvailable"] + [::std::mem::offset_of!(AImageReader_ImageListener, onImageAvailable) - 4usize]; +}; extern "C" { pub fn AImageReader_setImageListener( reader: *mut AImageReader, @@ -23319,45 +17221,17 @@ pub struct AImageReader_BufferRemovedListener { pub context: *mut ::std::os::raw::c_void, pub onBufferRemoved: AImageReader_BufferRemovedCallback, } -#[test] -fn bindgen_test_layout_AImageReader_BufferRemovedListener() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(AImageReader_BufferRemovedListener)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(AImageReader_BufferRemovedListener) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).context) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AImageReader_BufferRemovedListener), - "::", - stringify!(context) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onBufferRemoved) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AImageReader_BufferRemovedListener), - "::", - stringify!(onBufferRemoved) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AImageReader_BufferRemovedListener"] + [::std::mem::size_of::() - 8usize]; + ["Alignment of AImageReader_BufferRemovedListener"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: AImageReader_BufferRemovedListener::context"] + [::std::mem::offset_of!(AImageReader_BufferRemovedListener, context) - 0usize]; + ["Offset of field: AImageReader_BufferRemovedListener::onBufferRemoved"] + [::std::mem::offset_of!(AImageReader_BufferRemovedListener, onBufferRemoved) - 4usize]; +}; extern "C" { pub fn AImageReader_setBufferRemovedListener( reader: *mut AImageReader, @@ -23371,7 +17245,7 @@ pub struct AMediaCrypto { } pub type AMediaUUID = [u8; 16usize]; extern "C" { - pub fn AMediaCrypto_isCryptoSchemeSupported(uuid: *mut u8) -> bool; + pub fn AMediaCrypto_isCryptoSchemeSupported(uuid: *const u8) -> bool; } extern "C" { pub fn AMediaCrypto_requiresSecureDecoderComponent(mime: *const ::std::os::raw::c_char) @@ -23379,7 +17253,7 @@ extern "C" { } extern "C" { pub fn AMediaCrypto_new( - uuid: *mut u8, + uuid: *const u8, initData: *const ::std::os::raw::c_void, initDataSize: usize, ) -> *mut AMediaCrypto; @@ -23998,62 +17872,20 @@ pub struct AMediaCodecBufferInfo { pub presentationTimeUs: i64, pub flags: u32, } -#[test] -fn bindgen_test_layout_AMediaCodecBufferInfo() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(AMediaCodecBufferInfo)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AMediaCodecBufferInfo)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).offset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AMediaCodecBufferInfo), - "::", - stringify!(offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AMediaCodecBufferInfo), - "::", - stringify!(size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).presentationTimeUs) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AMediaCodecBufferInfo), - "::", - stringify!(presentationTimeUs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AMediaCodecBufferInfo), - "::", - stringify!(flags) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AMediaCodecBufferInfo"][::std::mem::size_of::() - 24usize]; + ["Alignment of AMediaCodecBufferInfo"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: AMediaCodecBufferInfo::offset"] + [::std::mem::offset_of!(AMediaCodecBufferInfo, offset) - 0usize]; + ["Offset of field: AMediaCodecBufferInfo::size"] + [::std::mem::offset_of!(AMediaCodecBufferInfo, size) - 4usize]; + ["Offset of field: AMediaCodecBufferInfo::presentationTimeUs"] + [::std::mem::offset_of!(AMediaCodecBufferInfo, presentationTimeUs) - 8usize]; + ["Offset of field: AMediaCodecBufferInfo::flags"] + [::std::mem::offset_of!(AMediaCodecBufferInfo, flags) - 16usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct AMediaCodecCryptoInfo { @@ -24110,65 +17942,21 @@ pub struct AMediaCodecOnAsyncNotifyCallback { pub onAsyncFormatChanged: AMediaCodecOnAsyncFormatChanged, pub onAsyncError: AMediaCodecOnAsyncError, } -#[test] -fn bindgen_test_layout_AMediaCodecOnAsyncNotifyCallback() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(AMediaCodecOnAsyncNotifyCallback)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(AMediaCodecOnAsyncNotifyCallback) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onAsyncInputAvailable) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AMediaCodecOnAsyncNotifyCallback), - "::", - stringify!(onAsyncInputAvailable) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onAsyncOutputAvailable) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AMediaCodecOnAsyncNotifyCallback), - "::", - stringify!(onAsyncOutputAvailable) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onAsyncFormatChanged) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AMediaCodecOnAsyncNotifyCallback), - "::", - stringify!(onAsyncFormatChanged) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onAsyncError) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(AMediaCodecOnAsyncNotifyCallback), - "::", - stringify!(onAsyncError) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AMediaCodecOnAsyncNotifyCallback"] + [::std::mem::size_of::() - 16usize]; + ["Alignment of AMediaCodecOnAsyncNotifyCallback"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: AMediaCodecOnAsyncNotifyCallback::onAsyncInputAvailable"] + [::std::mem::offset_of!(AMediaCodecOnAsyncNotifyCallback, onAsyncInputAvailable) - 0usize]; + ["Offset of field: AMediaCodecOnAsyncNotifyCallback::onAsyncOutputAvailable"] + [::std::mem::offset_of!(AMediaCodecOnAsyncNotifyCallback, onAsyncOutputAvailable) - 4usize]; + ["Offset of field: AMediaCodecOnAsyncNotifyCallback::onAsyncFormatChanged"] + [::std::mem::offset_of!(AMediaCodecOnAsyncNotifyCallback, onAsyncFormatChanged) - 8usize]; + ["Offset of field: AMediaCodecOnAsyncNotifyCallback::onAsyncError"] + [::std::mem::offset_of!(AMediaCodecOnAsyncNotifyCallback, onAsyncError) - 12usize]; +}; pub type AMediaCodecOnFrameRendered = ::std::option::Option< unsafe extern "C" fn( codec: *mut AMediaCodec, @@ -24378,41 +18166,15 @@ pub struct cryptoinfo_pattern_t { pub encryptBlocks: i32, pub skipBlocks: i32, } -#[test] -fn bindgen_test_layout_cryptoinfo_pattern_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(cryptoinfo_pattern_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(cryptoinfo_pattern_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).encryptBlocks) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cryptoinfo_pattern_t), - "::", - stringify!(encryptBlocks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).skipBlocks) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(cryptoinfo_pattern_t), - "::", - stringify!(skipBlocks) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cryptoinfo_pattern_t"][::std::mem::size_of::() - 8usize]; + ["Alignment of cryptoinfo_pattern_t"][::std::mem::align_of::() - 4usize]; + ["Offset of field: cryptoinfo_pattern_t::encryptBlocks"] + [::std::mem::offset_of!(cryptoinfo_pattern_t, encryptBlocks) - 0usize]; + ["Offset of field: cryptoinfo_pattern_t::skipBlocks"] + [::std::mem::offset_of!(cryptoinfo_pattern_t, skipBlocks) - 4usize]; +}; extern "C" { pub fn AMediaCodecCryptoInfo_new( numsubsamples: ::std::os::raw::c_int, @@ -24551,41 +18313,15 @@ pub struct AMediaDrmByteArray { pub ptr: *const u8, pub length: usize, } -#[test] -fn bindgen_test_layout_AMediaDrmByteArray() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(AMediaDrmByteArray)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AMediaDrmByteArray)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ptr) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AMediaDrmByteArray), - "::", - stringify!(ptr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AMediaDrmByteArray), - "::", - stringify!(length) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AMediaDrmByteArray"][::std::mem::size_of::() - 8usize]; + ["Alignment of AMediaDrmByteArray"][::std::mem::align_of::() - 4usize]; + ["Offset of field: AMediaDrmByteArray::ptr"] + [::std::mem::offset_of!(AMediaDrmByteArray, ptr) - 0usize]; + ["Offset of field: AMediaDrmByteArray::length"] + [::std::mem::offset_of!(AMediaDrmByteArray, length) - 4usize]; +}; pub type AMediaDrmSessionId = AMediaDrmByteArray; pub type AMediaDrmScope = AMediaDrmByteArray; pub type AMediaDrmKeySetId = AMediaDrmByteArray; @@ -24645,42 +18381,16 @@ pub struct AMediaDrmKeyValuePair { pub mKey: *const ::std::os::raw::c_char, pub mValue: *const ::std::os::raw::c_char, } -#[test] -fn bindgen_test_layout_AMediaDrmKeyValuePair() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(AMediaDrmKeyValuePair)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AMediaDrmKeyValuePair)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mKey) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AMediaDrmKeyValuePair), - "::", - stringify!(mKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mValue) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AMediaDrmKeyValuePair), - "::", - stringify!(mValue) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AMediaDrmKeyValuePair"][::std::mem::size_of::() - 8usize]; + ["Alignment of AMediaDrmKeyValuePair"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: AMediaDrmKeyValuePair::mKey"] + [::std::mem::offset_of!(AMediaDrmKeyValuePair, mKey) - 0usize]; + ["Offset of field: AMediaDrmKeyValuePair::mValue"] + [::std::mem::offset_of!(AMediaDrmKeyValuePair, mValue) - 4usize]; +}; pub type AMediaDrmKeyValue = AMediaDrmKeyValuePair; impl AMediaKeyStatusType { pub const KEY_STATUS_TYPE_USABLE: AMediaKeyStatusType = AMediaKeyStatusType(0); @@ -24707,41 +18417,15 @@ pub struct AMediaDrmKeyStatus { pub keyId: AMediaDrmKeyId, pub keyType: AMediaDrmKeyStatusType, } -#[test] -fn bindgen_test_layout_AMediaDrmKeyStatus() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(AMediaDrmKeyStatus)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AMediaDrmKeyStatus)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).keyId) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AMediaDrmKeyStatus), - "::", - stringify!(keyId) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).keyType) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AMediaDrmKeyStatus), - "::", - stringify!(keyType) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AMediaDrmKeyStatus"][::std::mem::size_of::() - 12usize]; + ["Alignment of AMediaDrmKeyStatus"][::std::mem::align_of::() - 4usize]; + ["Offset of field: AMediaDrmKeyStatus::keyId"] + [::std::mem::offset_of!(AMediaDrmKeyStatus, keyId) - 0usize]; + ["Offset of field: AMediaDrmKeyStatus::keyType"] + [::std::mem::offset_of!(AMediaDrmKeyStatus, keyType) - 8usize]; +}; pub type AMediaDrmEventListener = ::std::option::Option< unsafe extern "C" fn( arg1: *mut AMediaDrm, @@ -25067,92 +18751,28 @@ pub struct PsshEntry { pub datalen: usize, pub data: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout_PsshEntry() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(PsshEntry)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(PsshEntry)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uuid) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(PsshEntry), - "::", - stringify!(uuid) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).datalen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(PsshEntry), - "::", - stringify!(datalen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(PsshEntry), - "::", - stringify!(data) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of PsshEntry"][::std::mem::size_of::() - 24usize]; + ["Alignment of PsshEntry"][::std::mem::align_of::() - 4usize]; + ["Offset of field: PsshEntry::uuid"][::std::mem::offset_of!(PsshEntry, uuid) - 0usize]; + ["Offset of field: PsshEntry::datalen"][::std::mem::offset_of!(PsshEntry, datalen) - 16usize]; + ["Offset of field: PsshEntry::data"][::std::mem::offset_of!(PsshEntry, data) - 20usize]; +}; #[repr(C)] #[derive(Debug)] pub struct PsshInfo { pub numentries: usize, pub entries: __IncompleteArrayField, } -#[test] -fn bindgen_test_layout_PsshInfo() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(PsshInfo)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(PsshInfo)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).numentries) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(PsshInfo), - "::", - stringify!(numentries) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).entries) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(PsshInfo), - "::", - stringify!(entries) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of PsshInfo"][::std::mem::size_of::() - 4usize]; + ["Alignment of PsshInfo"][::std::mem::align_of::() - 4usize]; + ["Offset of field: PsshInfo::numentries"] + [::std::mem::offset_of!(PsshInfo, numentries) - 0usize]; + ["Offset of field: PsshInfo::entries"][::std::mem::offset_of!(PsshInfo, entries) - 4usize]; +}; extern "C" { pub fn AMediaExtractor_getPsshInfo(arg1: *mut AMediaExtractor) -> *mut PsshInfo; } diff --git a/ndk-sys/src/ffi_i686.rs b/ndk-sys/src/ffi_i686.rs index d060c2e7..e3e39a74 100644 --- a/ndk-sys/src/ffi_i686.rs +++ b/ndk-sys/src/ffi_i686.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.69.4 */ +/* automatically generated by rust-bindgen 0.70.1 */ #[repr(C)] #[derive(Default)] @@ -1341,41 +1341,15 @@ pub struct max_align_t { pub __clang_max_align_nonce1: ::std::os::raw::c_longlong, pub __clang_max_align_nonce2: f64, } -#[test] -fn bindgen_test_layout_max_align_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(max_align_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(max_align_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__clang_max_align_nonce1) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(max_align_t), - "::", - stringify!(__clang_max_align_nonce1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__clang_max_align_nonce2) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(max_align_t), - "::", - stringify!(__clang_max_align_nonce2) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of max_align_t"][::std::mem::size_of::() - 16usize]; + ["Alignment of max_align_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: max_align_t::__clang_max_align_nonce1"] + [::std::mem::offset_of!(max_align_t, __clang_max_align_nonce1) - 0usize]; + ["Offset of field: max_align_t::__clang_max_align_nonce2"] + [::std::mem::offset_of!(max_align_t, __clang_max_align_nonce2) - 8usize]; +}; pub type __int8_t = ::std::os::raw::c_schar; pub type __uint8_t = ::std::os::raw::c_uchar; pub type __int16_t = ::std::os::raw::c_short; @@ -1417,31 +1391,13 @@ pub type __u64 = ::std::os::raw::c_ulonglong; pub struct __kernel_fd_set { pub fds_bits: [::std::os::raw::c_ulong; 32usize], } -#[test] -fn bindgen_test_layout___kernel_fd_set() { - const UNINIT: ::std::mem::MaybeUninit<__kernel_fd_set> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__kernel_fd_set>(), - 128usize, - concat!("Size of: ", stringify!(__kernel_fd_set)) - ); - assert_eq!( - ::std::mem::align_of::<__kernel_fd_set>(), - 4usize, - concat!("Alignment of ", stringify!(__kernel_fd_set)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fds_bits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__kernel_fd_set), - "::", - stringify!(fds_bits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __kernel_fd_set"][::std::mem::size_of::<__kernel_fd_set>() - 128usize]; + ["Alignment of __kernel_fd_set"][::std::mem::align_of::<__kernel_fd_set>() - 4usize]; + ["Offset of field: __kernel_fd_set::fds_bits"] + [::std::mem::offset_of!(__kernel_fd_set, fds_bits) - 0usize]; +}; pub type __kernel_sighandler_t = ::std::option::Option; pub type __kernel_key_t = ::std::os::raw::c_int; @@ -1469,31 +1425,13 @@ pub type __kernel_ptrdiff_t = ::std::os::raw::c_int; pub struct __kernel_fsid_t { pub val: [::std::os::raw::c_int; 2usize], } -#[test] -fn bindgen_test_layout___kernel_fsid_t() { - const UNINIT: ::std::mem::MaybeUninit<__kernel_fsid_t> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__kernel_fsid_t>(), - 8usize, - concat!("Size of: ", stringify!(__kernel_fsid_t)) - ); - assert_eq!( - ::std::mem::align_of::<__kernel_fsid_t>(), - 4usize, - concat!("Alignment of ", stringify!(__kernel_fsid_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).val) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__kernel_fsid_t), - "::", - stringify!(val) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __kernel_fsid_t"][::std::mem::size_of::<__kernel_fsid_t>() - 8usize]; + ["Alignment of __kernel_fsid_t"][::std::mem::align_of::<__kernel_fsid_t>() - 4usize]; + ["Offset of field: __kernel_fsid_t::val"] + [::std::mem::offset_of!(__kernel_fsid_t, val) - 0usize]; +}; pub type __kernel_off_t = __kernel_long_t; pub type __kernel_loff_t = ::std::os::raw::c_longlong; pub type __kernel_old_time_t = __kernel_long_t; @@ -1524,142 +1462,48 @@ pub struct pthread_attr_t { pub sched_policy: i32, pub sched_priority: i32, } -#[test] -fn bindgen_test_layout_pthread_attr_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(pthread_attr_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(pthread_attr_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_attr_t), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).stack_base) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(pthread_attr_t), - "::", - stringify!(stack_base) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).stack_size) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(pthread_attr_t), - "::", - stringify!(stack_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).guard_size) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(pthread_attr_t), - "::", - stringify!(guard_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sched_policy) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(pthread_attr_t), - "::", - stringify!(sched_policy) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sched_priority) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(pthread_attr_t), - "::", - stringify!(sched_priority) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of pthread_attr_t"][::std::mem::size_of::() - 24usize]; + ["Alignment of pthread_attr_t"][::std::mem::align_of::() - 4usize]; + ["Offset of field: pthread_attr_t::flags"] + [::std::mem::offset_of!(pthread_attr_t, flags) - 0usize]; + ["Offset of field: pthread_attr_t::stack_base"] + [::std::mem::offset_of!(pthread_attr_t, stack_base) - 4usize]; + ["Offset of field: pthread_attr_t::stack_size"] + [::std::mem::offset_of!(pthread_attr_t, stack_size) - 8usize]; + ["Offset of field: pthread_attr_t::guard_size"] + [::std::mem::offset_of!(pthread_attr_t, guard_size) - 12usize]; + ["Offset of field: pthread_attr_t::sched_policy"] + [::std::mem::offset_of!(pthread_attr_t, sched_policy) - 16usize]; + ["Offset of field: pthread_attr_t::sched_priority"] + [::std::mem::offset_of!(pthread_attr_t, sched_priority) - 20usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct pthread_barrier_t { pub __private: [i32; 8usize], } -#[test] -fn bindgen_test_layout_pthread_barrier_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(pthread_barrier_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(pthread_barrier_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__private) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_barrier_t), - "::", - stringify!(__private) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of pthread_barrier_t"][::std::mem::size_of::() - 32usize]; + ["Alignment of pthread_barrier_t"][::std::mem::align_of::() - 4usize]; + ["Offset of field: pthread_barrier_t::__private"] + [::std::mem::offset_of!(pthread_barrier_t, __private) - 0usize]; +}; pub type pthread_barrierattr_t = ::std::os::raw::c_int; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct pthread_cond_t { pub __private: [i32; 1usize], } -#[test] -fn bindgen_test_layout_pthread_cond_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(pthread_cond_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(pthread_cond_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__private) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_cond_t), - "::", - stringify!(__private) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of pthread_cond_t"][::std::mem::size_of::() - 4usize]; + ["Alignment of pthread_cond_t"][::std::mem::align_of::() - 4usize]; + ["Offset of field: pthread_cond_t::__private"] + [::std::mem::offset_of!(pthread_cond_t, __private) - 0usize]; +}; pub type pthread_condattr_t = ::std::os::raw::c_long; pub type pthread_key_t = ::std::os::raw::c_int; #[repr(C)] @@ -1667,31 +1511,13 @@ pub type pthread_key_t = ::std::os::raw::c_int; pub struct pthread_mutex_t { pub __private: [i32; 1usize], } -#[test] -fn bindgen_test_layout_pthread_mutex_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(pthread_mutex_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(pthread_mutex_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__private) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_mutex_t), - "::", - stringify!(__private) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of pthread_mutex_t"][::std::mem::size_of::() - 4usize]; + ["Alignment of pthread_mutex_t"][::std::mem::align_of::() - 4usize]; + ["Offset of field: pthread_mutex_t::__private"] + [::std::mem::offset_of!(pthread_mutex_t, __private) - 0usize]; +}; pub type pthread_mutexattr_t = ::std::os::raw::c_long; pub type pthread_once_t = ::std::os::raw::c_int; #[repr(C)] @@ -1699,62 +1525,26 @@ pub type pthread_once_t = ::std::os::raw::c_int; pub struct pthread_rwlock_t { pub __private: [i32; 10usize], } -#[test] -fn bindgen_test_layout_pthread_rwlock_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(pthread_rwlock_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(pthread_rwlock_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__private) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_rwlock_t), - "::", - stringify!(__private) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of pthread_rwlock_t"][::std::mem::size_of::() - 40usize]; + ["Alignment of pthread_rwlock_t"][::std::mem::align_of::() - 4usize]; + ["Offset of field: pthread_rwlock_t::__private"] + [::std::mem::offset_of!(pthread_rwlock_t, __private) - 0usize]; +}; pub type pthread_rwlockattr_t = ::std::os::raw::c_long; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct pthread_spinlock_t { pub __private: [i32; 2usize], } -#[test] -fn bindgen_test_layout_pthread_spinlock_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(pthread_spinlock_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(pthread_spinlock_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__private) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_spinlock_t), - "::", - stringify!(__private) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of pthread_spinlock_t"][::std::mem::size_of::() - 8usize]; + ["Alignment of pthread_spinlock_t"][::std::mem::align_of::() - 4usize]; + ["Offset of field: pthread_spinlock_t::__private"] + [::std::mem::offset_of!(pthread_spinlock_t, __private) - 0usize]; +}; pub type pthread_t = ::std::os::raw::c_long; pub type __gid_t = __kernel_gid32_t; pub type gid_t = __gid_t; @@ -1909,92 +1699,32 @@ pub struct JavaVMAttachArgs { pub name: *const ::std::os::raw::c_char, pub group: jobject, } -#[test] -fn bindgen_test_layout_JavaVMAttachArgs() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(JavaVMAttachArgs)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(JavaVMAttachArgs)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(JavaVMAttachArgs), - "::", - stringify!(version) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(JavaVMAttachArgs), - "::", - stringify!(name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).group) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(JavaVMAttachArgs), - "::", - stringify!(group) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of JavaVMAttachArgs"][::std::mem::size_of::() - 12usize]; + ["Alignment of JavaVMAttachArgs"][::std::mem::align_of::() - 4usize]; + ["Offset of field: JavaVMAttachArgs::version"] + [::std::mem::offset_of!(JavaVMAttachArgs, version) - 0usize]; + ["Offset of field: JavaVMAttachArgs::name"] + [::std::mem::offset_of!(JavaVMAttachArgs, name) - 4usize]; + ["Offset of field: JavaVMAttachArgs::group"] + [::std::mem::offset_of!(JavaVMAttachArgs, group) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct JavaVMOption { pub optionString: *const ::std::os::raw::c_char, pub extraInfo: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout_JavaVMOption() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(JavaVMOption)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(JavaVMOption)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).optionString) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(JavaVMOption), - "::", - stringify!(optionString) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).extraInfo) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(JavaVMOption), - "::", - stringify!(extraInfo) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of JavaVMOption"][::std::mem::size_of::() - 8usize]; + ["Alignment of JavaVMOption"][::std::mem::align_of::() - 4usize]; + ["Offset of field: JavaVMOption::optionString"] + [::std::mem::offset_of!(JavaVMOption, optionString) - 0usize]; + ["Offset of field: JavaVMOption::extraInfo"] + [::std::mem::offset_of!(JavaVMOption, extraInfo) - 4usize]; +}; #[repr(C)] pub struct JavaVMInitArgs { pub version: jint, @@ -2002,61 +1732,19 @@ pub struct JavaVMInitArgs { pub options: *mut JavaVMOption, pub ignoreUnrecognized: jboolean, } -#[test] -fn bindgen_test_layout_JavaVMInitArgs() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(JavaVMInitArgs)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(JavaVMInitArgs)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(JavaVMInitArgs), - "::", - stringify!(version) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nOptions) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(JavaVMInitArgs), - "::", - stringify!(nOptions) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).options) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(JavaVMInitArgs), - "::", - stringify!(options) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ignoreUnrecognized) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(JavaVMInitArgs), - "::", - stringify!(ignoreUnrecognized) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of JavaVMInitArgs"][::std::mem::size_of::() - 16usize]; + ["Alignment of JavaVMInitArgs"][::std::mem::align_of::() - 4usize]; + ["Offset of field: JavaVMInitArgs::version"] + [::std::mem::offset_of!(JavaVMInitArgs, version) - 0usize]; + ["Offset of field: JavaVMInitArgs::nOptions"] + [::std::mem::offset_of!(JavaVMInitArgs, nOptions) - 4usize]; + ["Offset of field: JavaVMInitArgs::options"] + [::std::mem::offset_of!(JavaVMInitArgs, options) - 8usize]; + ["Offset of field: JavaVMInitArgs::ignoreUnrecognized"] + [::std::mem::offset_of!(JavaVMInitArgs, ignoreUnrecognized) - 12usize]; +}; extern "C" { pub fn AAssetManager_fromJava(env: *mut JNIEnv, assetManager: jobject) -> *mut AAssetManager; } @@ -2106,71 +1794,21 @@ pub struct AndroidBitmapInfo { pub format: i32, pub flags: u32, } -#[test] -fn bindgen_test_layout_AndroidBitmapInfo() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 20usize, - concat!("Size of: ", stringify!(AndroidBitmapInfo)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AndroidBitmapInfo)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AndroidBitmapInfo), - "::", - stringify!(width) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AndroidBitmapInfo), - "::", - stringify!(height) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).stride) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AndroidBitmapInfo), - "::", - stringify!(stride) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).format) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(AndroidBitmapInfo), - "::", - stringify!(format) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AndroidBitmapInfo), - "::", - stringify!(flags) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AndroidBitmapInfo"][::std::mem::size_of::() - 20usize]; + ["Alignment of AndroidBitmapInfo"][::std::mem::align_of::() - 4usize]; + ["Offset of field: AndroidBitmapInfo::width"] + [::std::mem::offset_of!(AndroidBitmapInfo, width) - 0usize]; + ["Offset of field: AndroidBitmapInfo::height"] + [::std::mem::offset_of!(AndroidBitmapInfo, height) - 4usize]; + ["Offset of field: AndroidBitmapInfo::stride"] + [::std::mem::offset_of!(AndroidBitmapInfo, stride) - 8usize]; + ["Offset of field: AndroidBitmapInfo::format"] + [::std::mem::offset_of!(AndroidBitmapInfo, format) - 12usize]; + ["Offset of field: AndroidBitmapInfo::flags"] + [::std::mem::offset_of!(AndroidBitmapInfo, flags) - 16usize]; +}; extern "C" { pub fn AndroidBitmap_getInfo( env: *mut JNIEnv, @@ -2625,41 +2263,13 @@ pub struct imaxdiv_t { pub quot: intmax_t, pub rem: intmax_t, } -#[test] -fn bindgen_test_layout_imaxdiv_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(imaxdiv_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(imaxdiv_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).quot) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(imaxdiv_t), - "::", - stringify!(quot) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rem) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(imaxdiv_t), - "::", - stringify!(rem) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of imaxdiv_t"][::std::mem::size_of::() - 16usize]; + ["Alignment of imaxdiv_t"][::std::mem::align_of::() - 4usize]; + ["Offset of field: imaxdiv_t::quot"][::std::mem::offset_of!(imaxdiv_t, quot) - 0usize]; + ["Offset of field: imaxdiv_t::rem"][::std::mem::offset_of!(imaxdiv_t, rem) - 8usize]; +}; extern "C" { pub fn imaxabs(__i: intmax_t) -> intmax_t; } @@ -2865,91 +2475,25 @@ pub struct android_dlextinfo { pub library_fd_offset: off64_t, pub library_namespace: *mut android_namespace_t, } -#[test] -fn bindgen_test_layout_android_dlextinfo() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 36usize, - concat!("Size of: ", stringify!(android_dlextinfo)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(android_dlextinfo)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(android_dlextinfo), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved_addr) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(android_dlextinfo), - "::", - stringify!(reserved_addr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved_size) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(android_dlextinfo), - "::", - stringify!(reserved_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).relro_fd) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(android_dlextinfo), - "::", - stringify!(relro_fd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).library_fd) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(android_dlextinfo), - "::", - stringify!(library_fd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).library_fd_offset) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(android_dlextinfo), - "::", - stringify!(library_fd_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).library_namespace) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(android_dlextinfo), - "::", - stringify!(library_namespace) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of android_dlextinfo"][::std::mem::size_of::() - 36usize]; + ["Alignment of android_dlextinfo"][::std::mem::align_of::() - 4usize]; + ["Offset of field: android_dlextinfo::flags"] + [::std::mem::offset_of!(android_dlextinfo, flags) - 0usize]; + ["Offset of field: android_dlextinfo::reserved_addr"] + [::std::mem::offset_of!(android_dlextinfo, reserved_addr) - 8usize]; + ["Offset of field: android_dlextinfo::reserved_size"] + [::std::mem::offset_of!(android_dlextinfo, reserved_size) - 12usize]; + ["Offset of field: android_dlextinfo::relro_fd"] + [::std::mem::offset_of!(android_dlextinfo, relro_fd) - 16usize]; + ["Offset of field: android_dlextinfo::library_fd"] + [::std::mem::offset_of!(android_dlextinfo, library_fd) - 20usize]; + ["Offset of field: android_dlextinfo::library_fd_offset"] + [::std::mem::offset_of!(android_dlextinfo, library_fd_offset) - 24usize]; + ["Offset of field: android_dlextinfo::library_namespace"] + [::std::mem::offset_of!(android_dlextinfo, library_namespace) - 32usize]; +}; extern "C" { pub fn android_dlopen_ext( __filename: *const ::std::os::raw::c_char, @@ -3183,61 +2727,15 @@ pub struct ARect { pub right: i32, pub bottom: i32, } -#[test] -fn bindgen_test_layout_ARect() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(ARect)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(ARect)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).left) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ARect), - "::", - stringify!(left) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).top) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ARect), - "::", - stringify!(top) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).right) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ARect), - "::", - stringify!(right) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bottom) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(ARect), - "::", - stringify!(bottom) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ARect"][::std::mem::size_of::() - 16usize]; + ["Alignment of ARect"][::std::mem::align_of::() - 4usize]; + ["Offset of field: ARect::left"][::std::mem::offset_of!(ARect, left) - 0usize]; + ["Offset of field: ARect::top"][::std::mem::offset_of!(ARect, top) - 4usize]; + ["Offset of field: ARect::right"][::std::mem::offset_of!(ARect, right) - 8usize]; + ["Offset of field: ARect::bottom"][::std::mem::offset_of!(ARect, bottom) - 12usize]; +}; impl AHardwareBuffer_Format { pub const AHARDWAREBUFFER_FORMAT_R8G8B8A8_UNORM: AHardwareBuffer_Format = AHardwareBuffer_Format(1); @@ -3481,101 +2979,27 @@ pub struct AHardwareBuffer_Desc { pub rfu0: u32, pub rfu1: u64, } -#[test] -fn bindgen_test_layout_AHardwareBuffer_Desc() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(AHardwareBuffer_Desc)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AHardwareBuffer_Desc)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Desc), - "::", - stringify!(width) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Desc), - "::", - stringify!(height) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).layers) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Desc), - "::", - stringify!(layers) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).format) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Desc), - "::", - stringify!(format) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).usage) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Desc), - "::", - stringify!(usage) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).stride) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Desc), - "::", - stringify!(stride) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rfu0) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Desc), - "::", - stringify!(rfu0) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rfu1) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Desc), - "::", - stringify!(rfu1) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AHardwareBuffer_Desc"][::std::mem::size_of::() - 40usize]; + ["Alignment of AHardwareBuffer_Desc"][::std::mem::align_of::() - 4usize]; + ["Offset of field: AHardwareBuffer_Desc::width"] + [::std::mem::offset_of!(AHardwareBuffer_Desc, width) - 0usize]; + ["Offset of field: AHardwareBuffer_Desc::height"] + [::std::mem::offset_of!(AHardwareBuffer_Desc, height) - 4usize]; + ["Offset of field: AHardwareBuffer_Desc::layers"] + [::std::mem::offset_of!(AHardwareBuffer_Desc, layers) - 8usize]; + ["Offset of field: AHardwareBuffer_Desc::format"] + [::std::mem::offset_of!(AHardwareBuffer_Desc, format) - 12usize]; + ["Offset of field: AHardwareBuffer_Desc::usage"] + [::std::mem::offset_of!(AHardwareBuffer_Desc, usage) - 16usize]; + ["Offset of field: AHardwareBuffer_Desc::stride"] + [::std::mem::offset_of!(AHardwareBuffer_Desc, stride) - 24usize]; + ["Offset of field: AHardwareBuffer_Desc::rfu0"] + [::std::mem::offset_of!(AHardwareBuffer_Desc, rfu0) - 28usize]; + ["Offset of field: AHardwareBuffer_Desc::rfu1"] + [::std::mem::offset_of!(AHardwareBuffer_Desc, rfu1) - 32usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct AHardwareBuffer_Plane { @@ -3583,94 +3007,34 @@ pub struct AHardwareBuffer_Plane { pub pixelStride: u32, pub rowStride: u32, } -#[test] -fn bindgen_test_layout_AHardwareBuffer_Plane() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(AHardwareBuffer_Plane)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AHardwareBuffer_Plane)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Plane), - "::", - stringify!(data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pixelStride) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Plane), - "::", - stringify!(pixelStride) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rowStride) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Plane), - "::", - stringify!(rowStride) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AHardwareBuffer_Plane"][::std::mem::size_of::() - 12usize]; + ["Alignment of AHardwareBuffer_Plane"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: AHardwareBuffer_Plane::data"] + [::std::mem::offset_of!(AHardwareBuffer_Plane, data) - 0usize]; + ["Offset of field: AHardwareBuffer_Plane::pixelStride"] + [::std::mem::offset_of!(AHardwareBuffer_Plane, pixelStride) - 4usize]; + ["Offset of field: AHardwareBuffer_Plane::rowStride"] + [::std::mem::offset_of!(AHardwareBuffer_Plane, rowStride) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct AHardwareBuffer_Planes { pub planeCount: u32, pub planes: [AHardwareBuffer_Plane; 4usize], } -#[test] -fn bindgen_test_layout_AHardwareBuffer_Planes() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 52usize, - concat!("Size of: ", stringify!(AHardwareBuffer_Planes)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AHardwareBuffer_Planes)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).planeCount) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Planes), - "::", - stringify!(planeCount) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).planes) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Planes), - "::", - stringify!(planes) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AHardwareBuffer_Planes"][::std::mem::size_of::() - 52usize]; + ["Alignment of AHardwareBuffer_Planes"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: AHardwareBuffer_Planes::planeCount"] + [::std::mem::offset_of!(AHardwareBuffer_Planes, planeCount) - 0usize]; + ["Offset of field: AHardwareBuffer_Planes::planes"] + [::std::mem::offset_of!(AHardwareBuffer_Planes, planes) - 4usize]; +}; extern "C" { pub fn AHardwareBuffer_allocate( desc: *const AHardwareBuffer_Desc, @@ -3775,41 +3139,13 @@ pub struct AColor_xy { pub x: f32, pub y: f32, } -#[test] -fn bindgen_test_layout_AColor_xy() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(AColor_xy)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AColor_xy)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AColor_xy), - "::", - stringify!(x) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AColor_xy), - "::", - stringify!(y) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AColor_xy"][::std::mem::size_of::() - 8usize]; + ["Alignment of AColor_xy"][::std::mem::align_of::() - 4usize]; + ["Offset of field: AColor_xy::x"][::std::mem::offset_of!(AColor_xy, x) - 0usize]; + ["Offset of field: AColor_xy::y"][::std::mem::offset_of!(AColor_xy, y) - 4usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct AHdrMetadata_smpte2086 { @@ -3820,124 +3156,40 @@ pub struct AHdrMetadata_smpte2086 { pub maxLuminance: f32, pub minLuminance: f32, } -#[test] -fn bindgen_test_layout_AHdrMetadata_smpte2086() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(AHdrMetadata_smpte2086)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AHdrMetadata_smpte2086)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).displayPrimaryRed) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AHdrMetadata_smpte2086), - "::", - stringify!(displayPrimaryRed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).displayPrimaryGreen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AHdrMetadata_smpte2086), - "::", - stringify!(displayPrimaryGreen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).displayPrimaryBlue) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AHdrMetadata_smpte2086), - "::", - stringify!(displayPrimaryBlue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).whitePoint) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(AHdrMetadata_smpte2086), - "::", - stringify!(whitePoint) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).maxLuminance) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(AHdrMetadata_smpte2086), - "::", - stringify!(maxLuminance) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).minLuminance) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(AHdrMetadata_smpte2086), - "::", - stringify!(minLuminance) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AHdrMetadata_smpte2086"][::std::mem::size_of::() - 40usize]; + ["Alignment of AHdrMetadata_smpte2086"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: AHdrMetadata_smpte2086::displayPrimaryRed"] + [::std::mem::offset_of!(AHdrMetadata_smpte2086, displayPrimaryRed) - 0usize]; + ["Offset of field: AHdrMetadata_smpte2086::displayPrimaryGreen"] + [::std::mem::offset_of!(AHdrMetadata_smpte2086, displayPrimaryGreen) - 8usize]; + ["Offset of field: AHdrMetadata_smpte2086::displayPrimaryBlue"] + [::std::mem::offset_of!(AHdrMetadata_smpte2086, displayPrimaryBlue) - 16usize]; + ["Offset of field: AHdrMetadata_smpte2086::whitePoint"] + [::std::mem::offset_of!(AHdrMetadata_smpte2086, whitePoint) - 24usize]; + ["Offset of field: AHdrMetadata_smpte2086::maxLuminance"] + [::std::mem::offset_of!(AHdrMetadata_smpte2086, maxLuminance) - 32usize]; + ["Offset of field: AHdrMetadata_smpte2086::minLuminance"] + [::std::mem::offset_of!(AHdrMetadata_smpte2086, minLuminance) - 36usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct AHdrMetadata_cta861_3 { pub maxContentLightLevel: f32, pub maxFrameAverageLightLevel: f32, } -#[test] -fn bindgen_test_layout_AHdrMetadata_cta861_3() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(AHdrMetadata_cta861_3)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AHdrMetadata_cta861_3)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).maxContentLightLevel) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AHdrMetadata_cta861_3), - "::", - stringify!(maxContentLightLevel) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).maxFrameAverageLightLevel) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AHdrMetadata_cta861_3), - "::", - stringify!(maxFrameAverageLightLevel) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AHdrMetadata_cta861_3"][::std::mem::size_of::() - 8usize]; + ["Alignment of AHdrMetadata_cta861_3"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: AHdrMetadata_cta861_3::maxContentLightLevel"] + [::std::mem::offset_of!(AHdrMetadata_cta861_3, maxContentLightLevel) - 0usize]; + ["Offset of field: AHdrMetadata_cta861_3::maxFrameAverageLightLevel"] + [::std::mem::offset_of!(AHdrMetadata_cta861_3, maxFrameAverageLightLevel) - 4usize]; +}; pub const ANDROID_IMAGE_DECODER_SUCCESS: _bindgen_ty_9 = 0; pub const ANDROID_IMAGE_DECODER_INCOMPLETE: _bindgen_ty_9 = -1; pub const ANDROID_IMAGE_DECODER_ERROR: _bindgen_ty_9 = -2; @@ -5122,92 +4374,26 @@ pub struct __android_log_message { pub line: u32, pub message: *const ::std::os::raw::c_char, } -#[test] -fn bindgen_test_layout___android_log_message() { - const UNINIT: ::std::mem::MaybeUninit<__android_log_message> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__android_log_message>(), - 28usize, - concat!("Size of: ", stringify!(__android_log_message)) - ); - assert_eq!( - ::std::mem::align_of::<__android_log_message>(), - 4usize, - concat!("Alignment of ", stringify!(__android_log_message)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).struct_size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__android_log_message), - "::", - stringify!(struct_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).buffer_id) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__android_log_message), - "::", - stringify!(buffer_id) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).priority) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__android_log_message), - "::", - stringify!(priority) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tag) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(__android_log_message), - "::", - stringify!(tag) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).file) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__android_log_message), - "::", - stringify!(file) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).line) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(__android_log_message), - "::", - stringify!(line) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).message) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(__android_log_message), - "::", - stringify!(message) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __android_log_message"][::std::mem::size_of::<__android_log_message>() - 28usize]; + ["Alignment of __android_log_message"] + [::std::mem::align_of::<__android_log_message>() - 4usize]; + ["Offset of field: __android_log_message::struct_size"] + [::std::mem::offset_of!(__android_log_message, struct_size) - 0usize]; + ["Offset of field: __android_log_message::buffer_id"] + [::std::mem::offset_of!(__android_log_message, buffer_id) - 4usize]; + ["Offset of field: __android_log_message::priority"] + [::std::mem::offset_of!(__android_log_message, priority) - 8usize]; + ["Offset of field: __android_log_message::tag"] + [::std::mem::offset_of!(__android_log_message, tag) - 12usize]; + ["Offset of field: __android_log_message::file"] + [::std::mem::offset_of!(__android_log_message, file) - 16usize]; + ["Offset of field: __android_log_message::line"] + [::std::mem::offset_of!(__android_log_message, line) - 20usize]; + ["Offset of field: __android_log_message::message"] + [::std::mem::offset_of!(__android_log_message, message) - 24usize]; +}; pub type __android_logger_function = ::std::option::Option; pub type __android_aborter_function = @@ -5266,71 +4452,16 @@ pub struct flock { pub l_len: off_t, pub l_pid: pid_t, } -#[test] -fn bindgen_test_layout_flock() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(flock)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(flock)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).l_type) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(flock), - "::", - stringify!(l_type) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).l_whence) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(flock), - "::", - stringify!(l_whence) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).l_start) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(flock), - "::", - stringify!(l_start) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).l_len) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(flock), - "::", - stringify!(l_len) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).l_pid) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(flock), - "::", - stringify!(l_pid) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of flock"][::std::mem::size_of::() - 16usize]; + ["Alignment of flock"][::std::mem::align_of::() - 4usize]; + ["Offset of field: flock::l_type"][::std::mem::offset_of!(flock, l_type) - 0usize]; + ["Offset of field: flock::l_whence"][::std::mem::offset_of!(flock, l_whence) - 2usize]; + ["Offset of field: flock::l_start"][::std::mem::offset_of!(flock, l_start) - 4usize]; + ["Offset of field: flock::l_len"][::std::mem::offset_of!(flock, l_len) - 8usize]; + ["Offset of field: flock::l_pid"][::std::mem::offset_of!(flock, l_pid) - 12usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct flock64 { @@ -5340,153 +4471,42 @@ pub struct flock64 { pub l_len: off64_t, pub l_pid: pid_t, } -#[test] -fn bindgen_test_layout_flock64() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(flock64)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(flock64)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).l_type) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(flock64), - "::", - stringify!(l_type) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).l_whence) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(flock64), - "::", - stringify!(l_whence) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).l_start) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(flock64), - "::", - stringify!(l_start) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).l_len) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(flock64), - "::", - stringify!(l_len) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).l_pid) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(flock64), - "::", - stringify!(l_pid) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of flock64"][::std::mem::size_of::() - 24usize]; + ["Alignment of flock64"][::std::mem::align_of::() - 4usize]; + ["Offset of field: flock64::l_type"][::std::mem::offset_of!(flock64, l_type) - 0usize]; + ["Offset of field: flock64::l_whence"][::std::mem::offset_of!(flock64, l_whence) - 2usize]; + ["Offset of field: flock64::l_start"][::std::mem::offset_of!(flock64, l_start) - 4usize]; + ["Offset of field: flock64::l_len"][::std::mem::offset_of!(flock64, l_len) - 12usize]; + ["Offset of field: flock64::l_pid"][::std::mem::offset_of!(flock64, l_pid) - 20usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct f_owner_ex { pub type_: ::std::os::raw::c_int, pub pid: __kernel_pid_t, } -#[test] -fn bindgen_test_layout_f_owner_ex() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(f_owner_ex)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(f_owner_ex)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(f_owner_ex), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pid) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(f_owner_ex), - "::", - stringify!(pid) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of f_owner_ex"][::std::mem::size_of::() - 8usize]; + ["Alignment of f_owner_ex"][::std::mem::align_of::() - 4usize]; + ["Offset of field: f_owner_ex::type_"][::std::mem::offset_of!(f_owner_ex, type_) - 0usize]; + ["Offset of field: f_owner_ex::pid"][::std::mem::offset_of!(f_owner_ex, pid) - 4usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct iovec { pub iov_base: *mut ::std::os::raw::c_void, pub iov_len: __kernel_size_t, } -#[test] -fn bindgen_test_layout_iovec() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(iovec)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(iovec)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iov_base) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(iovec), - "::", - stringify!(iov_base) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iov_len) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(iovec), - "::", - stringify!(iov_len) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of iovec"][::std::mem::size_of::() - 8usize]; + ["Alignment of iovec"][::std::mem::align_of::() - 4usize]; + ["Offset of field: iovec::iov_base"][::std::mem::offset_of!(iovec, iov_base) - 0usize]; + ["Offset of field: iovec::iov_len"][::std::mem::offset_of!(iovec, iov_len) - 4usize]; +}; pub type sa_family_t = ::std::os::raw::c_ushort; #[repr(C)] #[derive(Copy, Clone)] @@ -5505,87 +4525,31 @@ pub struct sockaddr_storage__bindgen_ty_1__bindgen_ty_1 { pub ss_family: sa_family_t, pub __data: [::std::os::raw::c_char; 126usize], } -#[test] -fn bindgen_test_layout_sockaddr_storage__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 128usize, - concat!( - "Size of: ", - stringify!(sockaddr_storage__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 2usize, - concat!( - "Alignment of ", - stringify!(sockaddr_storage__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ss_family) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sockaddr_storage__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(ss_family) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__data) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(sockaddr_storage__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(__data) - ) - ); -} -#[test] -fn bindgen_test_layout_sockaddr_storage__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 128usize, - concat!("Size of: ", stringify!(sockaddr_storage__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(sockaddr_storage__bindgen_ty_1)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__align) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sockaddr_storage__bindgen_ty_1), - "::", - stringify!(__align) - ) - ); -} -#[test] -fn bindgen_test_layout_sockaddr_storage() { - assert_eq!( - ::std::mem::size_of::(), - 128usize, - concat!("Size of: ", stringify!(sockaddr_storage)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(sockaddr_storage)) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sockaddr_storage__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::size_of::() - 128usize]; + ["Alignment of sockaddr_storage__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::align_of::() - 2usize]; + ["Offset of field: sockaddr_storage__bindgen_ty_1__bindgen_ty_1::ss_family"] + [::std::mem::offset_of!(sockaddr_storage__bindgen_ty_1__bindgen_ty_1, ss_family) - 0usize]; + ["Offset of field: sockaddr_storage__bindgen_ty_1__bindgen_ty_1::__data"] + [::std::mem::offset_of!(sockaddr_storage__bindgen_ty_1__bindgen_ty_1, __data) - 2usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sockaddr_storage__bindgen_ty_1"] + [::std::mem::size_of::() - 128usize]; + ["Alignment of sockaddr_storage__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: sockaddr_storage__bindgen_ty_1::__align"] + [::std::mem::offset_of!(sockaddr_storage__bindgen_ty_1, __align) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sockaddr_storage"][::std::mem::size_of::() - 128usize]; + ["Alignment of sockaddr_storage"][::std::mem::align_of::() - 4usize]; +}; pub const SHUT_RD: _bindgen_ty_32 = 0; pub const SHUT_WR: _bindgen_ty_32 = 1; pub const SHUT_RDWR: _bindgen_ty_32 = 2; @@ -5596,82 +4560,26 @@ pub struct sockaddr { pub sa_family: sa_family_t, pub sa_data: [::std::os::raw::c_char; 14usize], } -#[test] -fn bindgen_test_layout_sockaddr() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(sockaddr)) - ); - assert_eq!( - ::std::mem::align_of::(), - 2usize, - concat!("Alignment of ", stringify!(sockaddr)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sa_family) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sockaddr), - "::", - stringify!(sa_family) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sa_data) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(sockaddr), - "::", - stringify!(sa_data) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sockaddr"][::std::mem::size_of::() - 16usize]; + ["Alignment of sockaddr"][::std::mem::align_of::() - 2usize]; + ["Offset of field: sockaddr::sa_family"][::std::mem::offset_of!(sockaddr, sa_family) - 0usize]; + ["Offset of field: sockaddr::sa_data"][::std::mem::offset_of!(sockaddr, sa_data) - 2usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct linger { pub l_onoff: ::std::os::raw::c_int, pub l_linger: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_linger() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(linger)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(linger)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).l_onoff) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(linger), - "::", - stringify!(l_onoff) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).l_linger) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(linger), - "::", - stringify!(l_linger) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of linger"][::std::mem::size_of::() - 8usize]; + ["Alignment of linger"][::std::mem::align_of::() - 4usize]; + ["Offset of field: linger::l_onoff"][::std::mem::offset_of!(linger, l_onoff) - 0usize]; + ["Offset of field: linger::l_linger"][::std::mem::offset_of!(linger, l_linger) - 4usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct msghdr { @@ -5683,132 +4591,32 @@ pub struct msghdr { pub msg_controllen: usize, pub msg_flags: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_msghdr() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 28usize, - concat!("Size of: ", stringify!(msghdr)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(msghdr)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).msg_name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(msghdr), - "::", - stringify!(msg_name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).msg_namelen) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(msghdr), - "::", - stringify!(msg_namelen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).msg_iov) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(msghdr), - "::", - stringify!(msg_iov) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).msg_iovlen) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(msghdr), - "::", - stringify!(msg_iovlen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).msg_control) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(msghdr), - "::", - stringify!(msg_control) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).msg_controllen) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(msghdr), - "::", - stringify!(msg_controllen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).msg_flags) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(msghdr), - "::", - stringify!(msg_flags) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of msghdr"][::std::mem::size_of::() - 28usize]; + ["Alignment of msghdr"][::std::mem::align_of::() - 4usize]; + ["Offset of field: msghdr::msg_name"][::std::mem::offset_of!(msghdr, msg_name) - 0usize]; + ["Offset of field: msghdr::msg_namelen"][::std::mem::offset_of!(msghdr, msg_namelen) - 4usize]; + ["Offset of field: msghdr::msg_iov"][::std::mem::offset_of!(msghdr, msg_iov) - 8usize]; + ["Offset of field: msghdr::msg_iovlen"][::std::mem::offset_of!(msghdr, msg_iovlen) - 12usize]; + ["Offset of field: msghdr::msg_control"][::std::mem::offset_of!(msghdr, msg_control) - 16usize]; + ["Offset of field: msghdr::msg_controllen"] + [::std::mem::offset_of!(msghdr, msg_controllen) - 20usize]; + ["Offset of field: msghdr::msg_flags"][::std::mem::offset_of!(msghdr, msg_flags) - 24usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct mmsghdr { pub msg_hdr: msghdr, pub msg_len: ::std::os::raw::c_uint, } -#[test] -fn bindgen_test_layout_mmsghdr() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(mmsghdr)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(mmsghdr)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).msg_hdr) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(mmsghdr), - "::", - stringify!(msg_hdr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).msg_len) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(mmsghdr), - "::", - stringify!(msg_len) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of mmsghdr"][::std::mem::size_of::() - 32usize]; + ["Alignment of mmsghdr"][::std::mem::align_of::() - 4usize]; + ["Offset of field: mmsghdr::msg_hdr"][::std::mem::offset_of!(mmsghdr, msg_hdr) - 0usize]; + ["Offset of field: mmsghdr::msg_len"][::std::mem::offset_of!(mmsghdr, msg_len) - 28usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct cmsghdr { @@ -5816,51 +4624,14 @@ pub struct cmsghdr { pub cmsg_level: ::std::os::raw::c_int, pub cmsg_type: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_cmsghdr() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(cmsghdr)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(cmsghdr)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cmsg_len) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cmsghdr), - "::", - stringify!(cmsg_len) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cmsg_level) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(cmsghdr), - "::", - stringify!(cmsg_level) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cmsg_type) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cmsghdr), - "::", - stringify!(cmsg_type) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cmsghdr"][::std::mem::size_of::() - 12usize]; + ["Alignment of cmsghdr"][::std::mem::align_of::() - 4usize]; + ["Offset of field: cmsghdr::cmsg_len"][::std::mem::offset_of!(cmsghdr, cmsg_len) - 0usize]; + ["Offset of field: cmsghdr::cmsg_level"][::std::mem::offset_of!(cmsghdr, cmsg_level) - 4usize]; + ["Offset of field: cmsghdr::cmsg_type"][::std::mem::offset_of!(cmsghdr, cmsg_type) - 8usize]; +}; extern "C" { pub fn __cmsg_nxthdr(__msg: *mut msghdr, __cmsg: *mut cmsghdr) -> *mut cmsghdr; } @@ -5871,51 +4642,14 @@ pub struct ucred { pub uid: uid_t, pub gid: gid_t, } -#[test] -fn bindgen_test_layout_ucred() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(ucred)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(ucred)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pid) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ucred), - "::", - stringify!(pid) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uid) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ucred), - "::", - stringify!(uid) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gid) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ucred), - "::", - stringify!(gid) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ucred"][::std::mem::size_of::() - 12usize]; + ["Alignment of ucred"][::std::mem::align_of::() - 4usize]; + ["Offset of field: ucred::pid"][::std::mem::offset_of!(ucred, pid) - 0usize]; + ["Offset of field: ucred::uid"][::std::mem::offset_of!(ucred, uid) - 4usize]; + ["Offset of field: ucred::gid"][::std::mem::offset_of!(ucred, gid) - 8usize]; +}; extern "C" { pub fn accept( __fd: ::std::os::raw::c_int, @@ -6080,71 +4814,17 @@ pub struct hostent { pub h_length: ::std::os::raw::c_int, pub h_addr_list: *mut *mut ::std::os::raw::c_char, } -#[test] -fn bindgen_test_layout_hostent() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 20usize, - concat!("Size of: ", stringify!(hostent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(hostent)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).h_name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(hostent), - "::", - stringify!(h_name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).h_aliases) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(hostent), - "::", - stringify!(h_aliases) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).h_addrtype) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(hostent), - "::", - stringify!(h_addrtype) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).h_length) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(hostent), - "::", - stringify!(h_length) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).h_addr_list) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(hostent), - "::", - stringify!(h_addr_list) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of hostent"][::std::mem::size_of::() - 20usize]; + ["Alignment of hostent"][::std::mem::align_of::() - 4usize]; + ["Offset of field: hostent::h_name"][::std::mem::offset_of!(hostent, h_name) - 0usize]; + ["Offset of field: hostent::h_aliases"][::std::mem::offset_of!(hostent, h_aliases) - 4usize]; + ["Offset of field: hostent::h_addrtype"][::std::mem::offset_of!(hostent, h_addrtype) - 8usize]; + ["Offset of field: hostent::h_length"][::std::mem::offset_of!(hostent, h_length) - 12usize]; + ["Offset of field: hostent::h_addr_list"] + [::std::mem::offset_of!(hostent, h_addr_list) - 16usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct netent { @@ -6153,61 +4833,15 @@ pub struct netent { pub n_addrtype: ::std::os::raw::c_int, pub n_net: u32, } -#[test] -fn bindgen_test_layout_netent() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(netent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(netent)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).n_name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(netent), - "::", - stringify!(n_name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).n_aliases) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(netent), - "::", - stringify!(n_aliases) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).n_addrtype) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(netent), - "::", - stringify!(n_addrtype) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).n_net) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(netent), - "::", - stringify!(n_net) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of netent"][::std::mem::size_of::() - 16usize]; + ["Alignment of netent"][::std::mem::align_of::() - 4usize]; + ["Offset of field: netent::n_name"][::std::mem::offset_of!(netent, n_name) - 0usize]; + ["Offset of field: netent::n_aliases"][::std::mem::offset_of!(netent, n_aliases) - 4usize]; + ["Offset of field: netent::n_addrtype"][::std::mem::offset_of!(netent, n_addrtype) - 8usize]; + ["Offset of field: netent::n_net"][::std::mem::offset_of!(netent, n_net) - 12usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct servent { @@ -6216,61 +4850,15 @@ pub struct servent { pub s_port: ::std::os::raw::c_int, pub s_proto: *mut ::std::os::raw::c_char, } -#[test] -fn bindgen_test_layout_servent() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(servent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(servent)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).s_name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(servent), - "::", - stringify!(s_name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).s_aliases) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(servent), - "::", - stringify!(s_aliases) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).s_port) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(servent), - "::", - stringify!(s_port) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).s_proto) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(servent), - "::", - stringify!(s_proto) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of servent"][::std::mem::size_of::() - 16usize]; + ["Alignment of servent"][::std::mem::align_of::() - 4usize]; + ["Offset of field: servent::s_name"][::std::mem::offset_of!(servent, s_name) - 0usize]; + ["Offset of field: servent::s_aliases"][::std::mem::offset_of!(servent, s_aliases) - 4usize]; + ["Offset of field: servent::s_port"][::std::mem::offset_of!(servent, s_port) - 8usize]; + ["Offset of field: servent::s_proto"][::std::mem::offset_of!(servent, s_proto) - 12usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct protoent { @@ -6278,51 +4866,14 @@ pub struct protoent { pub p_aliases: *mut *mut ::std::os::raw::c_char, pub p_proto: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_protoent() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(protoent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(protoent)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).p_name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(protoent), - "::", - stringify!(p_name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).p_aliases) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(protoent), - "::", - stringify!(p_aliases) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).p_proto) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(protoent), - "::", - stringify!(p_proto) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of protoent"][::std::mem::size_of::() - 12usize]; + ["Alignment of protoent"][::std::mem::align_of::() - 4usize]; + ["Offset of field: protoent::p_name"][::std::mem::offset_of!(protoent, p_name) - 0usize]; + ["Offset of field: protoent::p_aliases"][::std::mem::offset_of!(protoent, p_aliases) - 4usize]; + ["Offset of field: protoent::p_proto"][::std::mem::offset_of!(protoent, p_proto) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct addrinfo { @@ -6335,101 +4886,23 @@ pub struct addrinfo { pub ai_addr: *mut sockaddr, pub ai_next: *mut addrinfo, } -#[test] -fn bindgen_test_layout_addrinfo() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(addrinfo)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(addrinfo)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ai_flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(addrinfo), - "::", - stringify!(ai_flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ai_family) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(addrinfo), - "::", - stringify!(ai_family) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ai_socktype) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(addrinfo), - "::", - stringify!(ai_socktype) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ai_protocol) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(addrinfo), - "::", - stringify!(ai_protocol) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ai_addrlen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(addrinfo), - "::", - stringify!(ai_addrlen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ai_canonname) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(addrinfo), - "::", - stringify!(ai_canonname) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ai_addr) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(addrinfo), - "::", - stringify!(ai_addr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ai_next) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(addrinfo), - "::", - stringify!(ai_next) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of addrinfo"][::std::mem::size_of::() - 32usize]; + ["Alignment of addrinfo"][::std::mem::align_of::() - 4usize]; + ["Offset of field: addrinfo::ai_flags"][::std::mem::offset_of!(addrinfo, ai_flags) - 0usize]; + ["Offset of field: addrinfo::ai_family"][::std::mem::offset_of!(addrinfo, ai_family) - 4usize]; + ["Offset of field: addrinfo::ai_socktype"] + [::std::mem::offset_of!(addrinfo, ai_socktype) - 8usize]; + ["Offset of field: addrinfo::ai_protocol"] + [::std::mem::offset_of!(addrinfo, ai_protocol) - 12usize]; + ["Offset of field: addrinfo::ai_addrlen"] + [::std::mem::offset_of!(addrinfo, ai_addrlen) - 16usize]; + ["Offset of field: addrinfo::ai_canonname"] + [::std::mem::offset_of!(addrinfo, ai_canonname) - 20usize]; + ["Offset of field: addrinfo::ai_addr"][::std::mem::offset_of!(addrinfo, ai_addr) - 24usize]; + ["Offset of field: addrinfo::ai_next"][::std::mem::offset_of!(addrinfo, ai_next) - 28usize]; +}; extern "C" { pub fn getaddrinfo( __node: *const ::std::os::raw::c_char, @@ -7033,121 +5506,21 @@ pub struct mallinfo { pub fordblks: usize, pub keepcost: usize, } -#[test] -fn bindgen_test_layout_mallinfo() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(mallinfo)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(mallinfo)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).arena) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(mallinfo), - "::", - stringify!(arena) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ordblks) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(mallinfo), - "::", - stringify!(ordblks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).smblks) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(mallinfo), - "::", - stringify!(smblks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hblks) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(mallinfo), - "::", - stringify!(hblks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hblkhd) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(mallinfo), - "::", - stringify!(hblkhd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).usmblks) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(mallinfo), - "::", - stringify!(usmblks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fsmblks) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(mallinfo), - "::", - stringify!(fsmblks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uordblks) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(mallinfo), - "::", - stringify!(uordblks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fordblks) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(mallinfo), - "::", - stringify!(fordblks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).keepcost) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(mallinfo), - "::", - stringify!(keepcost) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of mallinfo"][::std::mem::size_of::() - 40usize]; + ["Alignment of mallinfo"][::std::mem::align_of::() - 4usize]; + ["Offset of field: mallinfo::arena"][::std::mem::offset_of!(mallinfo, arena) - 0usize]; + ["Offset of field: mallinfo::ordblks"][::std::mem::offset_of!(mallinfo, ordblks) - 4usize]; + ["Offset of field: mallinfo::smblks"][::std::mem::offset_of!(mallinfo, smblks) - 8usize]; + ["Offset of field: mallinfo::hblks"][::std::mem::offset_of!(mallinfo, hblks) - 12usize]; + ["Offset of field: mallinfo::hblkhd"][::std::mem::offset_of!(mallinfo, hblkhd) - 16usize]; + ["Offset of field: mallinfo::usmblks"][::std::mem::offset_of!(mallinfo, usmblks) - 20usize]; + ["Offset of field: mallinfo::fsmblks"][::std::mem::offset_of!(mallinfo, fsmblks) - 24usize]; + ["Offset of field: mallinfo::uordblks"][::std::mem::offset_of!(mallinfo, uordblks) - 28usize]; + ["Offset of field: mallinfo::fordblks"][::std::mem::offset_of!(mallinfo, fordblks) - 32usize]; + ["Offset of field: mallinfo::keepcost"][::std::mem::offset_of!(mallinfo, keepcost) - 36usize]; +}; extern "C" { pub fn mallinfo() -> mallinfo; } @@ -7165,121 +5538,21 @@ pub struct mallinfo2 { pub fordblks: usize, pub keepcost: usize, } -#[test] -fn bindgen_test_layout_mallinfo2() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(mallinfo2)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(mallinfo2)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).arena) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(mallinfo2), - "::", - stringify!(arena) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ordblks) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(mallinfo2), - "::", - stringify!(ordblks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).smblks) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(mallinfo2), - "::", - stringify!(smblks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hblks) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(mallinfo2), - "::", - stringify!(hblks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hblkhd) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(mallinfo2), - "::", - stringify!(hblkhd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).usmblks) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(mallinfo2), - "::", - stringify!(usmblks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fsmblks) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(mallinfo2), - "::", - stringify!(fsmblks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uordblks) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(mallinfo2), - "::", - stringify!(uordblks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fordblks) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(mallinfo2), - "::", - stringify!(fordblks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).keepcost) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(mallinfo2), - "::", - stringify!(keepcost) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of mallinfo2"][::std::mem::size_of::() - 40usize]; + ["Alignment of mallinfo2"][::std::mem::align_of::() - 4usize]; + ["Offset of field: mallinfo2::arena"][::std::mem::offset_of!(mallinfo2, arena) - 0usize]; + ["Offset of field: mallinfo2::ordblks"][::std::mem::offset_of!(mallinfo2, ordblks) - 4usize]; + ["Offset of field: mallinfo2::smblks"][::std::mem::offset_of!(mallinfo2, smblks) - 8usize]; + ["Offset of field: mallinfo2::hblks"][::std::mem::offset_of!(mallinfo2, hblks) - 12usize]; + ["Offset of field: mallinfo2::hblkhd"][::std::mem::offset_of!(mallinfo2, hblkhd) - 16usize]; + ["Offset of field: mallinfo2::usmblks"][::std::mem::offset_of!(mallinfo2, usmblks) - 20usize]; + ["Offset of field: mallinfo2::fsmblks"][::std::mem::offset_of!(mallinfo2, fsmblks) - 24usize]; + ["Offset of field: mallinfo2::uordblks"][::std::mem::offset_of!(mallinfo2, uordblks) - 28usize]; + ["Offset of field: mallinfo2::fordblks"][::std::mem::offset_of!(mallinfo2, fordblks) - 32usize]; + ["Offset of field: mallinfo2::keepcost"][::std::mem::offset_of!(mallinfo2, keepcost) - 36usize]; +}; extern "C" { pub fn malloc_info( __must_be_zero: ::std::os::raw::c_int, @@ -7620,41 +5893,13 @@ pub struct div_t { pub quot: ::std::os::raw::c_int, pub rem: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_div_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(div_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(div_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).quot) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(div_t), - "::", - stringify!(quot) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rem) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(div_t), - "::", - stringify!(rem) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of div_t"][::std::mem::size_of::() - 8usize]; + ["Alignment of div_t"][::std::mem::align_of::() - 4usize]; + ["Offset of field: div_t::quot"][::std::mem::offset_of!(div_t, quot) - 0usize]; + ["Offset of field: div_t::rem"][::std::mem::offset_of!(div_t, rem) - 4usize]; +}; extern "C" { pub fn div(__numerator: ::std::os::raw::c_int, __denominator: ::std::os::raw::c_int) -> div_t; } @@ -7664,41 +5909,13 @@ pub struct ldiv_t { pub quot: ::std::os::raw::c_long, pub rem: ::std::os::raw::c_long, } -#[test] -fn bindgen_test_layout_ldiv_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(ldiv_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(ldiv_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).quot) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ldiv_t), - "::", - stringify!(quot) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rem) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ldiv_t), - "::", - stringify!(rem) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ldiv_t"][::std::mem::size_of::() - 8usize]; + ["Alignment of ldiv_t"][::std::mem::align_of::() - 4usize]; + ["Offset of field: ldiv_t::quot"][::std::mem::offset_of!(ldiv_t, quot) - 0usize]; + ["Offset of field: ldiv_t::rem"][::std::mem::offset_of!(ldiv_t, rem) - 4usize]; +}; extern "C" { pub fn ldiv( __numerator: ::std::os::raw::c_long, @@ -7711,41 +5928,13 @@ pub struct lldiv_t { pub quot: ::std::os::raw::c_longlong, pub rem: ::std::os::raw::c_longlong, } -#[test] -fn bindgen_test_layout_lldiv_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(lldiv_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(lldiv_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).quot) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(lldiv_t), - "::", - stringify!(quot) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rem) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(lldiv_t), - "::", - stringify!(rem) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of lldiv_t"][::std::mem::size_of::() - 16usize]; + ["Alignment of lldiv_t"][::std::mem::align_of::() - 4usize]; + ["Offset of field: lldiv_t::quot"][::std::mem::offset_of!(lldiv_t, quot) - 0usize]; + ["Offset of field: lldiv_t::rem"][::std::mem::offset_of!(lldiv_t, rem) - 8usize]; +}; extern "C" { pub fn lldiv( __numerator: ::std::os::raw::c_longlong, @@ -7996,81 +6185,23 @@ pub struct ANativeWindow_Buffer { pub bits: *mut ::std::os::raw::c_void, pub reserved: [u32; 6usize], } -#[test] -fn bindgen_test_layout_ANativeWindow_Buffer() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 44usize, - concat!("Size of: ", stringify!(ANativeWindow_Buffer)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(ANativeWindow_Buffer)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ANativeWindow_Buffer), - "::", - stringify!(width) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ANativeWindow_Buffer), - "::", - stringify!(height) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).stride) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ANativeWindow_Buffer), - "::", - stringify!(stride) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).format) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(ANativeWindow_Buffer), - "::", - stringify!(format) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bits) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(ANativeWindow_Buffer), - "::", - stringify!(bits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(ANativeWindow_Buffer), - "::", - stringify!(reserved) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ANativeWindow_Buffer"][::std::mem::size_of::() - 44usize]; + ["Alignment of ANativeWindow_Buffer"][::std::mem::align_of::() - 4usize]; + ["Offset of field: ANativeWindow_Buffer::width"] + [::std::mem::offset_of!(ANativeWindow_Buffer, width) - 0usize]; + ["Offset of field: ANativeWindow_Buffer::height"] + [::std::mem::offset_of!(ANativeWindow_Buffer, height) - 4usize]; + ["Offset of field: ANativeWindow_Buffer::stride"] + [::std::mem::offset_of!(ANativeWindow_Buffer, stride) - 8usize]; + ["Offset of field: ANativeWindow_Buffer::format"] + [::std::mem::offset_of!(ANativeWindow_Buffer, format) - 12usize]; + ["Offset of field: ANativeWindow_Buffer::bits"] + [::std::mem::offset_of!(ANativeWindow_Buffer, bits) - 16usize]; + ["Offset of field: ANativeWindow_Buffer::reserved"] + [::std::mem::offset_of!(ANativeWindow_Buffer, reserved) - 20usize]; +}; extern "C" { pub fn ANativeWindow_acquire(window: *mut ANativeWindow); } @@ -8169,121 +6300,30 @@ pub struct ANativeActivity { pub assetManager: *mut AAssetManager, pub obbPath: *const ::std::os::raw::c_char, } -#[test] -fn bindgen_test_layout_ANativeActivity() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(ANativeActivity)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(ANativeActivity)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).callbacks) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivity), - "::", - stringify!(callbacks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).vm) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivity), - "::", - stringify!(vm) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).env) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivity), - "::", - stringify!(env) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clazz) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivity), - "::", - stringify!(clazz) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).internalDataPath) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivity), - "::", - stringify!(internalDataPath) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).externalDataPath) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivity), - "::", - stringify!(externalDataPath) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sdkVersion) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivity), - "::", - stringify!(sdkVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).instance) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivity), - "::", - stringify!(instance) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).assetManager) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivity), - "::", - stringify!(assetManager) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).obbPath) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivity), - "::", - stringify!(obbPath) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ANativeActivity"][::std::mem::size_of::() - 40usize]; + ["Alignment of ANativeActivity"][::std::mem::align_of::() - 4usize]; + ["Offset of field: ANativeActivity::callbacks"] + [::std::mem::offset_of!(ANativeActivity, callbacks) - 0usize]; + ["Offset of field: ANativeActivity::vm"][::std::mem::offset_of!(ANativeActivity, vm) - 4usize]; + ["Offset of field: ANativeActivity::env"] + [::std::mem::offset_of!(ANativeActivity, env) - 8usize]; + ["Offset of field: ANativeActivity::clazz"] + [::std::mem::offset_of!(ANativeActivity, clazz) - 12usize]; + ["Offset of field: ANativeActivity::internalDataPath"] + [::std::mem::offset_of!(ANativeActivity, internalDataPath) - 16usize]; + ["Offset of field: ANativeActivity::externalDataPath"] + [::std::mem::offset_of!(ANativeActivity, externalDataPath) - 20usize]; + ["Offset of field: ANativeActivity::sdkVersion"] + [::std::mem::offset_of!(ANativeActivity, sdkVersion) - 24usize]; + ["Offset of field: ANativeActivity::instance"] + [::std::mem::offset_of!(ANativeActivity, instance) - 28usize]; + ["Offset of field: ANativeActivity::assetManager"] + [::std::mem::offset_of!(ANativeActivity, assetManager) - 32usize]; + ["Offset of field: ANativeActivity::obbPath"] + [::std::mem::offset_of!(ANativeActivity, obbPath) - 36usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ANativeActivityCallbacks { @@ -8326,182 +6366,45 @@ pub struct ANativeActivityCallbacks { ::std::option::Option, pub onLowMemory: ::std::option::Option, } -#[test] -fn bindgen_test_layout_ANativeActivityCallbacks() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(ANativeActivityCallbacks)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(ANativeActivityCallbacks)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onStart) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivityCallbacks), - "::", - stringify!(onStart) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onResume) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivityCallbacks), - "::", - stringify!(onResume) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onSaveInstanceState) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivityCallbacks), - "::", - stringify!(onSaveInstanceState) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onPause) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivityCallbacks), - "::", - stringify!(onPause) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onStop) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivityCallbacks), - "::", - stringify!(onStop) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onDestroy) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivityCallbacks), - "::", - stringify!(onDestroy) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onWindowFocusChanged) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivityCallbacks), - "::", - stringify!(onWindowFocusChanged) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onNativeWindowCreated) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivityCallbacks), - "::", - stringify!(onNativeWindowCreated) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onNativeWindowResized) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivityCallbacks), - "::", - stringify!(onNativeWindowResized) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onNativeWindowRedrawNeeded) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivityCallbacks), - "::", - stringify!(onNativeWindowRedrawNeeded) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onNativeWindowDestroyed) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivityCallbacks), - "::", - stringify!(onNativeWindowDestroyed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onInputQueueCreated) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivityCallbacks), - "::", - stringify!(onInputQueueCreated) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onInputQueueDestroyed) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivityCallbacks), - "::", - stringify!(onInputQueueDestroyed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onContentRectChanged) as usize - ptr as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivityCallbacks), - "::", - stringify!(onContentRectChanged) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onConfigurationChanged) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivityCallbacks), - "::", - stringify!(onConfigurationChanged) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onLowMemory) as usize - ptr as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivityCallbacks), - "::", - stringify!(onLowMemory) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ANativeActivityCallbacks"] + [::std::mem::size_of::() - 64usize]; + ["Alignment of ANativeActivityCallbacks"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ANativeActivityCallbacks::onStart"] + [::std::mem::offset_of!(ANativeActivityCallbacks, onStart) - 0usize]; + ["Offset of field: ANativeActivityCallbacks::onResume"] + [::std::mem::offset_of!(ANativeActivityCallbacks, onResume) - 4usize]; + ["Offset of field: ANativeActivityCallbacks::onSaveInstanceState"] + [::std::mem::offset_of!(ANativeActivityCallbacks, onSaveInstanceState) - 8usize]; + ["Offset of field: ANativeActivityCallbacks::onPause"] + [::std::mem::offset_of!(ANativeActivityCallbacks, onPause) - 12usize]; + ["Offset of field: ANativeActivityCallbacks::onStop"] + [::std::mem::offset_of!(ANativeActivityCallbacks, onStop) - 16usize]; + ["Offset of field: ANativeActivityCallbacks::onDestroy"] + [::std::mem::offset_of!(ANativeActivityCallbacks, onDestroy) - 20usize]; + ["Offset of field: ANativeActivityCallbacks::onWindowFocusChanged"] + [::std::mem::offset_of!(ANativeActivityCallbacks, onWindowFocusChanged) - 24usize]; + ["Offset of field: ANativeActivityCallbacks::onNativeWindowCreated"] + [::std::mem::offset_of!(ANativeActivityCallbacks, onNativeWindowCreated) - 28usize]; + ["Offset of field: ANativeActivityCallbacks::onNativeWindowResized"] + [::std::mem::offset_of!(ANativeActivityCallbacks, onNativeWindowResized) - 32usize]; + ["Offset of field: ANativeActivityCallbacks::onNativeWindowRedrawNeeded"] + [::std::mem::offset_of!(ANativeActivityCallbacks, onNativeWindowRedrawNeeded) - 36usize]; + ["Offset of field: ANativeActivityCallbacks::onNativeWindowDestroyed"] + [::std::mem::offset_of!(ANativeActivityCallbacks, onNativeWindowDestroyed) - 40usize]; + ["Offset of field: ANativeActivityCallbacks::onInputQueueCreated"] + [::std::mem::offset_of!(ANativeActivityCallbacks, onInputQueueCreated) - 44usize]; + ["Offset of field: ANativeActivityCallbacks::onInputQueueDestroyed"] + [::std::mem::offset_of!(ANativeActivityCallbacks, onInputQueueDestroyed) - 48usize]; + ["Offset of field: ANativeActivityCallbacks::onContentRectChanged"] + [::std::mem::offset_of!(ANativeActivityCallbacks, onContentRectChanged) - 52usize]; + ["Offset of field: ANativeActivityCallbacks::onConfigurationChanged"] + [::std::mem::offset_of!(ANativeActivityCallbacks, onConfigurationChanged) - 56usize]; + ["Offset of field: ANativeActivityCallbacks::onLowMemory"] + [::std::mem::offset_of!(ANativeActivityCallbacks, onLowMemory) - 60usize]; +}; pub type ANativeActivity_createFunc = ::std::option::Option< unsafe extern "C" fn( activity: *mut ANativeActivity, @@ -9109,58 +7012,19 @@ pub struct ANeuralNetworksSymmPerChannelQuantParams { pub scaleCount: u32, pub scales: *const f32, } -#[test] -fn bindgen_test_layout_ANeuralNetworksSymmPerChannelQuantParams() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!( - "Size of: ", - stringify!(ANeuralNetworksSymmPerChannelQuantParams) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ANeuralNetworksSymmPerChannelQuantParams) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).channelDim) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ANeuralNetworksSymmPerChannelQuantParams), - "::", - stringify!(channelDim) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).scaleCount) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ANeuralNetworksSymmPerChannelQuantParams), - "::", - stringify!(scaleCount) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).scales) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ANeuralNetworksSymmPerChannelQuantParams), - "::", - stringify!(scales) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ANeuralNetworksSymmPerChannelQuantParams"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of ANeuralNetworksSymmPerChannelQuantParams"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ANeuralNetworksSymmPerChannelQuantParams::channelDim"] + [::std::mem::offset_of!(ANeuralNetworksSymmPerChannelQuantParams, channelDim) - 0usize]; + ["Offset of field: ANeuralNetworksSymmPerChannelQuantParams::scaleCount"] + [::std::mem::offset_of!(ANeuralNetworksSymmPerChannelQuantParams, scaleCount) - 4usize]; + ["Offset of field: ANeuralNetworksSymmPerChannelQuantParams::scales"] + [::std::mem::offset_of!(ANeuralNetworksSymmPerChannelQuantParams, scales) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ANeuralNetworksBurst { @@ -9175,72 +7039,23 @@ pub struct ANeuralNetworksOperandType { pub scale: f32, pub zeroPoint: i32, } -#[test] -fn bindgen_test_layout_ANeuralNetworksOperandType() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 20usize, - concat!("Size of: ", stringify!(ANeuralNetworksOperandType)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(ANeuralNetworksOperandType)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ANeuralNetworksOperandType), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dimensionCount) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ANeuralNetworksOperandType), - "::", - stringify!(dimensionCount) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dimensions) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ANeuralNetworksOperandType), - "::", - stringify!(dimensions) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).scale) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(ANeuralNetworksOperandType), - "::", - stringify!(scale) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).zeroPoint) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(ANeuralNetworksOperandType), - "::", - stringify!(zeroPoint) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ANeuralNetworksOperandType"] + [::std::mem::size_of::() - 20usize]; + ["Alignment of ANeuralNetworksOperandType"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ANeuralNetworksOperandType::type_"] + [::std::mem::offset_of!(ANeuralNetworksOperandType, type_) - 0usize]; + ["Offset of field: ANeuralNetworksOperandType::dimensionCount"] + [::std::mem::offset_of!(ANeuralNetworksOperandType, dimensionCount) - 4usize]; + ["Offset of field: ANeuralNetworksOperandType::dimensions"] + [::std::mem::offset_of!(ANeuralNetworksOperandType, dimensions) - 8usize]; + ["Offset of field: ANeuralNetworksOperandType::scale"] + [::std::mem::offset_of!(ANeuralNetworksOperandType, scale) - 12usize]; + ["Offset of field: ANeuralNetworksOperandType::zeroPoint"] + [::std::mem::offset_of!(ANeuralNetworksOperandType, zeroPoint) - 16usize]; +}; pub type ANeuralNetworksOperationType = i32; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -9705,371 +7520,132 @@ pub struct timespec { pub tv_sec: time_t, pub tv_nsec: ::std::os::raw::c_long, } -#[test] -fn bindgen_test_layout_timespec() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(timespec)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(timespec)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tv_sec) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(timespec), - "::", - stringify!(tv_sec) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tv_nsec) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(timespec), - "::", - stringify!(tv_nsec) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of timespec"][::std::mem::size_of::() - 8usize]; + ["Alignment of timespec"][::std::mem::align_of::() - 4usize]; + ["Offset of field: timespec::tv_sec"][::std::mem::offset_of!(timespec, tv_sec) - 0usize]; + ["Offset of field: timespec::tv_nsec"][::std::mem::offset_of!(timespec, tv_nsec) - 4usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __kernel_timespec { pub tv_sec: __kernel_time64_t, pub tv_nsec: ::std::os::raw::c_longlong, } -#[test] -fn bindgen_test_layout___kernel_timespec() { - const UNINIT: ::std::mem::MaybeUninit<__kernel_timespec> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__kernel_timespec>(), - 16usize, - concat!("Size of: ", stringify!(__kernel_timespec)) - ); - assert_eq!( - ::std::mem::align_of::<__kernel_timespec>(), - 4usize, - concat!("Alignment of ", stringify!(__kernel_timespec)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tv_sec) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__kernel_timespec), - "::", - stringify!(tv_sec) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tv_nsec) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__kernel_timespec), - "::", - stringify!(tv_nsec) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __kernel_timespec"][::std::mem::size_of::<__kernel_timespec>() - 16usize]; + ["Alignment of __kernel_timespec"][::std::mem::align_of::<__kernel_timespec>() - 4usize]; + ["Offset of field: __kernel_timespec::tv_sec"] + [::std::mem::offset_of!(__kernel_timespec, tv_sec) - 0usize]; + ["Offset of field: __kernel_timespec::tv_nsec"] + [::std::mem::offset_of!(__kernel_timespec, tv_nsec) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __kernel_itimerspec { pub it_interval: __kernel_timespec, pub it_value: __kernel_timespec, } -#[test] -fn bindgen_test_layout___kernel_itimerspec() { - const UNINIT: ::std::mem::MaybeUninit<__kernel_itimerspec> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__kernel_itimerspec>(), - 32usize, - concat!("Size of: ", stringify!(__kernel_itimerspec)) - ); - assert_eq!( - ::std::mem::align_of::<__kernel_itimerspec>(), - 4usize, - concat!("Alignment of ", stringify!(__kernel_itimerspec)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).it_interval) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__kernel_itimerspec), - "::", - stringify!(it_interval) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).it_value) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__kernel_itimerspec), - "::", - stringify!(it_value) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __kernel_itimerspec"][::std::mem::size_of::<__kernel_itimerspec>() - 32usize]; + ["Alignment of __kernel_itimerspec"][::std::mem::align_of::<__kernel_itimerspec>() - 4usize]; + ["Offset of field: __kernel_itimerspec::it_interval"] + [::std::mem::offset_of!(__kernel_itimerspec, it_interval) - 0usize]; + ["Offset of field: __kernel_itimerspec::it_value"] + [::std::mem::offset_of!(__kernel_itimerspec, it_value) - 16usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __kernel_old_timespec { pub tv_sec: __kernel_old_time_t, pub tv_nsec: ::std::os::raw::c_long, } -#[test] -fn bindgen_test_layout___kernel_old_timespec() { - const UNINIT: ::std::mem::MaybeUninit<__kernel_old_timespec> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__kernel_old_timespec>(), - 8usize, - concat!("Size of: ", stringify!(__kernel_old_timespec)) - ); - assert_eq!( - ::std::mem::align_of::<__kernel_old_timespec>(), - 4usize, - concat!("Alignment of ", stringify!(__kernel_old_timespec)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tv_sec) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__kernel_old_timespec), - "::", - stringify!(tv_sec) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tv_nsec) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__kernel_old_timespec), - "::", - stringify!(tv_nsec) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __kernel_old_timespec"][::std::mem::size_of::<__kernel_old_timespec>() - 8usize]; + ["Alignment of __kernel_old_timespec"] + [::std::mem::align_of::<__kernel_old_timespec>() - 4usize]; + ["Offset of field: __kernel_old_timespec::tv_sec"] + [::std::mem::offset_of!(__kernel_old_timespec, tv_sec) - 0usize]; + ["Offset of field: __kernel_old_timespec::tv_nsec"] + [::std::mem::offset_of!(__kernel_old_timespec, tv_nsec) - 4usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __kernel_sock_timeval { pub tv_sec: __s64, pub tv_usec: __s64, } -#[test] -fn bindgen_test_layout___kernel_sock_timeval() { - const UNINIT: ::std::mem::MaybeUninit<__kernel_sock_timeval> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__kernel_sock_timeval>(), - 16usize, - concat!("Size of: ", stringify!(__kernel_sock_timeval)) - ); - assert_eq!( - ::std::mem::align_of::<__kernel_sock_timeval>(), - 4usize, - concat!("Alignment of ", stringify!(__kernel_sock_timeval)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tv_sec) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__kernel_sock_timeval), - "::", - stringify!(tv_sec) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tv_usec) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__kernel_sock_timeval), - "::", - stringify!(tv_usec) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __kernel_sock_timeval"][::std::mem::size_of::<__kernel_sock_timeval>() - 16usize]; + ["Alignment of __kernel_sock_timeval"] + [::std::mem::align_of::<__kernel_sock_timeval>() - 4usize]; + ["Offset of field: __kernel_sock_timeval::tv_sec"] + [::std::mem::offset_of!(__kernel_sock_timeval, tv_sec) - 0usize]; + ["Offset of field: __kernel_sock_timeval::tv_usec"] + [::std::mem::offset_of!(__kernel_sock_timeval, tv_usec) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct timeval { pub tv_sec: __kernel_old_time_t, pub tv_usec: __kernel_suseconds_t, } -#[test] -fn bindgen_test_layout_timeval() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(timeval)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(timeval)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tv_sec) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(timeval), - "::", - stringify!(tv_sec) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tv_usec) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(timeval), - "::", - stringify!(tv_usec) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of timeval"][::std::mem::size_of::() - 8usize]; + ["Alignment of timeval"][::std::mem::align_of::() - 4usize]; + ["Offset of field: timeval::tv_sec"][::std::mem::offset_of!(timeval, tv_sec) - 0usize]; + ["Offset of field: timeval::tv_usec"][::std::mem::offset_of!(timeval, tv_usec) - 4usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct itimerspec { pub it_interval: timespec, pub it_value: timespec, } -#[test] -fn bindgen_test_layout_itimerspec() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(itimerspec)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(itimerspec)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).it_interval) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(itimerspec), - "::", - stringify!(it_interval) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).it_value) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(itimerspec), - "::", - stringify!(it_value) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of itimerspec"][::std::mem::size_of::() - 16usize]; + ["Alignment of itimerspec"][::std::mem::align_of::() - 4usize]; + ["Offset of field: itimerspec::it_interval"] + [::std::mem::offset_of!(itimerspec, it_interval) - 0usize]; + ["Offset of field: itimerspec::it_value"] + [::std::mem::offset_of!(itimerspec, it_value) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct itimerval { pub it_interval: timeval, pub it_value: timeval, } -#[test] -fn bindgen_test_layout_itimerval() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(itimerval)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(itimerval)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).it_interval) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(itimerval), - "::", - stringify!(it_interval) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).it_value) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(itimerval), - "::", - stringify!(it_value) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of itimerval"][::std::mem::size_of::() - 16usize]; + ["Alignment of itimerval"][::std::mem::align_of::() - 4usize]; + ["Offset of field: itimerval::it_interval"] + [::std::mem::offset_of!(itimerval, it_interval) - 0usize]; + ["Offset of field: itimerval::it_value"][::std::mem::offset_of!(itimerval, it_value) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct timezone { pub tz_minuteswest: ::std::os::raw::c_int, pub tz_dsttime: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_timezone() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(timezone)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(timezone)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tz_minuteswest) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(timezone), - "::", - stringify!(tz_minuteswest) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tz_dsttime) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(timezone), - "::", - stringify!(tz_dsttime) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of timezone"][::std::mem::size_of::() - 8usize]; + ["Alignment of timezone"][::std::mem::align_of::() - 4usize]; + ["Offset of field: timezone::tz_minuteswest"] + [::std::mem::offset_of!(timezone, tz_minuteswest) - 0usize]; + ["Offset of field: timezone::tz_dsttime"] + [::std::mem::offset_of!(timezone, tz_dsttime) - 4usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _fpx_sw_bytes { @@ -10079,112 +7655,34 @@ pub struct _fpx_sw_bytes { pub xstate_size: __u32, pub padding: [__u32; 7usize], } -#[test] -fn bindgen_test_layout__fpx_sw_bytes() { - const UNINIT: ::std::mem::MaybeUninit<_fpx_sw_bytes> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_fpx_sw_bytes>(), - 48usize, - concat!("Size of: ", stringify!(_fpx_sw_bytes)) - ); - assert_eq!( - ::std::mem::align_of::<_fpx_sw_bytes>(), - 4usize, - concat!("Alignment of ", stringify!(_fpx_sw_bytes)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).magic1) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_fpx_sw_bytes), - "::", - stringify!(magic1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).extended_size) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_fpx_sw_bytes), - "::", - stringify!(extended_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).xfeatures) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_fpx_sw_bytes), - "::", - stringify!(xfeatures) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).xstate_size) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_fpx_sw_bytes), - "::", - stringify!(xstate_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).padding) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_fpx_sw_bytes), - "::", - stringify!(padding) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of _fpx_sw_bytes"][::std::mem::size_of::<_fpx_sw_bytes>() - 48usize]; + ["Alignment of _fpx_sw_bytes"][::std::mem::align_of::<_fpx_sw_bytes>() - 4usize]; + ["Offset of field: _fpx_sw_bytes::magic1"] + [::std::mem::offset_of!(_fpx_sw_bytes, magic1) - 0usize]; + ["Offset of field: _fpx_sw_bytes::extended_size"] + [::std::mem::offset_of!(_fpx_sw_bytes, extended_size) - 4usize]; + ["Offset of field: _fpx_sw_bytes::xfeatures"] + [::std::mem::offset_of!(_fpx_sw_bytes, xfeatures) - 8usize]; + ["Offset of field: _fpx_sw_bytes::xstate_size"] + [::std::mem::offset_of!(_fpx_sw_bytes, xstate_size) - 16usize]; + ["Offset of field: _fpx_sw_bytes::padding"] + [::std::mem::offset_of!(_fpx_sw_bytes, padding) - 20usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _fpreg { pub significand: [__u16; 4usize], pub exponent: __u16, } -#[test] -fn bindgen_test_layout__fpreg() { - const UNINIT: ::std::mem::MaybeUninit<_fpreg> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_fpreg>(), - 10usize, - concat!("Size of: ", stringify!(_fpreg)) - ); - assert_eq!( - ::std::mem::align_of::<_fpreg>(), - 2usize, - concat!("Alignment of ", stringify!(_fpreg)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).significand) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_fpreg), - "::", - stringify!(significand) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).exponent) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_fpreg), - "::", - stringify!(exponent) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of _fpreg"][::std::mem::size_of::<_fpreg>() - 10usize]; + ["Alignment of _fpreg"][::std::mem::align_of::<_fpreg>() - 2usize]; + ["Offset of field: _fpreg::significand"][::std::mem::offset_of!(_fpreg, significand) - 0usize]; + ["Offset of field: _fpreg::exponent"][::std::mem::offset_of!(_fpreg, exponent) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _fpxreg { @@ -10192,81 +7690,26 @@ pub struct _fpxreg { pub exponent: __u16, pub padding: [__u16; 3usize], } -#[test] -fn bindgen_test_layout__fpxreg() { - const UNINIT: ::std::mem::MaybeUninit<_fpxreg> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_fpxreg>(), - 16usize, - concat!("Size of: ", stringify!(_fpxreg)) - ); - assert_eq!( - ::std::mem::align_of::<_fpxreg>(), - 2usize, - concat!("Alignment of ", stringify!(_fpxreg)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).significand) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_fpxreg), - "::", - stringify!(significand) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).exponent) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_fpxreg), - "::", - stringify!(exponent) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).padding) as usize - ptr as usize }, - 10usize, - concat!( - "Offset of field: ", - stringify!(_fpxreg), - "::", - stringify!(padding) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of _fpxreg"][::std::mem::size_of::<_fpxreg>() - 16usize]; + ["Alignment of _fpxreg"][::std::mem::align_of::<_fpxreg>() - 2usize]; + ["Offset of field: _fpxreg::significand"] + [::std::mem::offset_of!(_fpxreg, significand) - 0usize]; + ["Offset of field: _fpxreg::exponent"][::std::mem::offset_of!(_fpxreg, exponent) - 8usize]; + ["Offset of field: _fpxreg::padding"][::std::mem::offset_of!(_fpxreg, padding) - 10usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _xmmreg { pub element: [__u32; 4usize], } -#[test] -fn bindgen_test_layout__xmmreg() { - const UNINIT: ::std::mem::MaybeUninit<_xmmreg> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_xmmreg>(), - 16usize, - concat!("Size of: ", stringify!(_xmmreg)) - ); - assert_eq!( - ::std::mem::align_of::<_xmmreg>(), - 4usize, - concat!("Alignment of ", stringify!(_xmmreg)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).element) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_xmmreg), - "::", - stringify!(element) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of _xmmreg"][::std::mem::size_of::<_xmmreg>() - 16usize]; + ["Alignment of _xmmreg"][::std::mem::align_of::<_xmmreg>() - 4usize]; + ["Offset of field: _xmmreg::element"][::std::mem::offset_of!(_xmmreg, element) - 0usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub struct _fpstate_32 { @@ -10294,249 +7737,60 @@ pub union _fpstate_32__bindgen_ty_1 { pub padding1: [__u32; 44usize], pub padding: [__u32; 44usize], } -#[test] -fn bindgen_test_layout__fpstate_32__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit<_fpstate_32__bindgen_ty_1> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_fpstate_32__bindgen_ty_1>(), - 176usize, - concat!("Size of: ", stringify!(_fpstate_32__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::<_fpstate_32__bindgen_ty_1>(), - 4usize, - concat!("Alignment of ", stringify!(_fpstate_32__bindgen_ty_1)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).padding1) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32__bindgen_ty_1), - "::", - stringify!(padding1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).padding) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32__bindgen_ty_1), - "::", - stringify!(padding) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of _fpstate_32__bindgen_ty_1"] + [::std::mem::size_of::<_fpstate_32__bindgen_ty_1>() - 176usize]; + ["Alignment of _fpstate_32__bindgen_ty_1"] + [::std::mem::align_of::<_fpstate_32__bindgen_ty_1>() - 4usize]; + ["Offset of field: _fpstate_32__bindgen_ty_1::padding1"] + [::std::mem::offset_of!(_fpstate_32__bindgen_ty_1, padding1) - 0usize]; + ["Offset of field: _fpstate_32__bindgen_ty_1::padding"] + [::std::mem::offset_of!(_fpstate_32__bindgen_ty_1, padding) - 0usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub union _fpstate_32__bindgen_ty_2 { pub padding2: [__u32; 12usize], pub sw_reserved: _fpx_sw_bytes, } -#[test] -fn bindgen_test_layout__fpstate_32__bindgen_ty_2() { - const UNINIT: ::std::mem::MaybeUninit<_fpstate_32__bindgen_ty_2> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_fpstate_32__bindgen_ty_2>(), - 48usize, - concat!("Size of: ", stringify!(_fpstate_32__bindgen_ty_2)) - ); - assert_eq!( - ::std::mem::align_of::<_fpstate_32__bindgen_ty_2>(), - 4usize, - concat!("Alignment of ", stringify!(_fpstate_32__bindgen_ty_2)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).padding2) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32__bindgen_ty_2), - "::", - stringify!(padding2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sw_reserved) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32__bindgen_ty_2), - "::", - stringify!(sw_reserved) - ) - ); -} -#[test] -fn bindgen_test_layout__fpstate_32() { - const UNINIT: ::std::mem::MaybeUninit<_fpstate_32> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_fpstate_32>(), - 624usize, - concat!("Size of: ", stringify!(_fpstate_32)) - ); - assert_eq!( - ::std::mem::align_of::<_fpstate_32>(), - 4usize, - concat!("Alignment of ", stringify!(_fpstate_32)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cw) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32), - "::", - stringify!(cw) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sw) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32), - "::", - stringify!(sw) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tag) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32), - "::", - stringify!(tag) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ipoff) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32), - "::", - stringify!(ipoff) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cssel) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32), - "::", - stringify!(cssel) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dataoff) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32), - "::", - stringify!(dataoff) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).datasel) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32), - "::", - stringify!(datasel) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._st) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32), - "::", - stringify!(_st) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).status) as usize - ptr as usize }, - 108usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32), - "::", - stringify!(status) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).magic) as usize - ptr as usize }, - 110usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32), - "::", - stringify!(magic) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._fxsr_env) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32), - "::", - stringify!(_fxsr_env) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mxcsr) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32), - "::", - stringify!(mxcsr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, - 140usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32), - "::", - stringify!(reserved) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._fxsr_st) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32), - "::", - stringify!(_fxsr_st) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._xmm) as usize - ptr as usize }, - 272usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32), - "::", - stringify!(_xmm) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of _fpstate_32__bindgen_ty_2"] + [::std::mem::size_of::<_fpstate_32__bindgen_ty_2>() - 48usize]; + ["Alignment of _fpstate_32__bindgen_ty_2"] + [::std::mem::align_of::<_fpstate_32__bindgen_ty_2>() - 4usize]; + ["Offset of field: _fpstate_32__bindgen_ty_2::padding2"] + [::std::mem::offset_of!(_fpstate_32__bindgen_ty_2, padding2) - 0usize]; + ["Offset of field: _fpstate_32__bindgen_ty_2::sw_reserved"] + [::std::mem::offset_of!(_fpstate_32__bindgen_ty_2, sw_reserved) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of _fpstate_32"][::std::mem::size_of::<_fpstate_32>() - 624usize]; + ["Alignment of _fpstate_32"][::std::mem::align_of::<_fpstate_32>() - 4usize]; + ["Offset of field: _fpstate_32::cw"][::std::mem::offset_of!(_fpstate_32, cw) - 0usize]; + ["Offset of field: _fpstate_32::sw"][::std::mem::offset_of!(_fpstate_32, sw) - 4usize]; + ["Offset of field: _fpstate_32::tag"][::std::mem::offset_of!(_fpstate_32, tag) - 8usize]; + ["Offset of field: _fpstate_32::ipoff"][::std::mem::offset_of!(_fpstate_32, ipoff) - 12usize]; + ["Offset of field: _fpstate_32::cssel"][::std::mem::offset_of!(_fpstate_32, cssel) - 16usize]; + ["Offset of field: _fpstate_32::dataoff"] + [::std::mem::offset_of!(_fpstate_32, dataoff) - 20usize]; + ["Offset of field: _fpstate_32::datasel"] + [::std::mem::offset_of!(_fpstate_32, datasel) - 24usize]; + ["Offset of field: _fpstate_32::_st"][::std::mem::offset_of!(_fpstate_32, _st) - 28usize]; + ["Offset of field: _fpstate_32::status"] + [::std::mem::offset_of!(_fpstate_32, status) - 108usize]; + ["Offset of field: _fpstate_32::magic"][::std::mem::offset_of!(_fpstate_32, magic) - 110usize]; + ["Offset of field: _fpstate_32::_fxsr_env"] + [::std::mem::offset_of!(_fpstate_32, _fxsr_env) - 112usize]; + ["Offset of field: _fpstate_32::mxcsr"][::std::mem::offset_of!(_fpstate_32, mxcsr) - 136usize]; + ["Offset of field: _fpstate_32::reserved"] + [::std::mem::offset_of!(_fpstate_32, reserved) - 140usize]; + ["Offset of field: _fpstate_32::_fxsr_st"] + [::std::mem::offset_of!(_fpstate_32, _fxsr_st) - 144usize]; + ["Offset of field: _fpstate_32::_xmm"][::std::mem::offset_of!(_fpstate_32, _xmm) - 272usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub struct _fpstate_64 { @@ -10559,167 +7813,37 @@ pub union _fpstate_64__bindgen_ty_1 { pub reserved3: [__u32; 12usize], pub sw_reserved: _fpx_sw_bytes, } -#[test] -fn bindgen_test_layout__fpstate_64__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit<_fpstate_64__bindgen_ty_1> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_fpstate_64__bindgen_ty_1>(), - 48usize, - concat!("Size of: ", stringify!(_fpstate_64__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::<_fpstate_64__bindgen_ty_1>(), - 4usize, - concat!("Alignment of ", stringify!(_fpstate_64__bindgen_ty_1)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved3) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_64__bindgen_ty_1), - "::", - stringify!(reserved3) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sw_reserved) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_64__bindgen_ty_1), - "::", - stringify!(sw_reserved) - ) - ); -} -#[test] -fn bindgen_test_layout__fpstate_64() { - const UNINIT: ::std::mem::MaybeUninit<_fpstate_64> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_fpstate_64>(), - 512usize, - concat!("Size of: ", stringify!(_fpstate_64)) - ); - assert_eq!( - ::std::mem::align_of::<_fpstate_64>(), - 4usize, - concat!("Alignment of ", stringify!(_fpstate_64)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cwd) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_64), - "::", - stringify!(cwd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).swd) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_64), - "::", - stringify!(swd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).twd) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_64), - "::", - stringify!(twd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fop) as usize - ptr as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_64), - "::", - stringify!(fop) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rip) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_64), - "::", - stringify!(rip) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rdp) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_64), - "::", - stringify!(rdp) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mxcsr) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_64), - "::", - stringify!(mxcsr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mxcsr_mask) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_64), - "::", - stringify!(mxcsr_mask) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).st_space) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_64), - "::", - stringify!(st_space) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).xmm_space) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_64), - "::", - stringify!(xmm_space) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved2) as usize - ptr as usize }, - 416usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_64), - "::", - stringify!(reserved2) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of _fpstate_64__bindgen_ty_1"] + [::std::mem::size_of::<_fpstate_64__bindgen_ty_1>() - 48usize]; + ["Alignment of _fpstate_64__bindgen_ty_1"] + [::std::mem::align_of::<_fpstate_64__bindgen_ty_1>() - 4usize]; + ["Offset of field: _fpstate_64__bindgen_ty_1::reserved3"] + [::std::mem::offset_of!(_fpstate_64__bindgen_ty_1, reserved3) - 0usize]; + ["Offset of field: _fpstate_64__bindgen_ty_1::sw_reserved"] + [::std::mem::offset_of!(_fpstate_64__bindgen_ty_1, sw_reserved) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of _fpstate_64"][::std::mem::size_of::<_fpstate_64>() - 512usize]; + ["Alignment of _fpstate_64"][::std::mem::align_of::<_fpstate_64>() - 4usize]; + ["Offset of field: _fpstate_64::cwd"][::std::mem::offset_of!(_fpstate_64, cwd) - 0usize]; + ["Offset of field: _fpstate_64::swd"][::std::mem::offset_of!(_fpstate_64, swd) - 2usize]; + ["Offset of field: _fpstate_64::twd"][::std::mem::offset_of!(_fpstate_64, twd) - 4usize]; + ["Offset of field: _fpstate_64::fop"][::std::mem::offset_of!(_fpstate_64, fop) - 6usize]; + ["Offset of field: _fpstate_64::rip"][::std::mem::offset_of!(_fpstate_64, rip) - 8usize]; + ["Offset of field: _fpstate_64::rdp"][::std::mem::offset_of!(_fpstate_64, rdp) - 16usize]; + ["Offset of field: _fpstate_64::mxcsr"][::std::mem::offset_of!(_fpstate_64, mxcsr) - 24usize]; + ["Offset of field: _fpstate_64::mxcsr_mask"] + [::std::mem::offset_of!(_fpstate_64, mxcsr_mask) - 28usize]; + ["Offset of field: _fpstate_64::st_space"] + [::std::mem::offset_of!(_fpstate_64, st_space) - 32usize]; + ["Offset of field: _fpstate_64::xmm_space"] + [::std::mem::offset_of!(_fpstate_64, xmm_space) - 160usize]; + ["Offset of field: _fpstate_64::reserved2"] + [::std::mem::offset_of!(_fpstate_64, reserved2) - 416usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _header { @@ -10727,81 +7851,26 @@ pub struct _header { pub reserved1: [__u64; 2usize], pub reserved2: [__u64; 5usize], } -#[test] -fn bindgen_test_layout__header() { - const UNINIT: ::std::mem::MaybeUninit<_header> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_header>(), - 64usize, - concat!("Size of: ", stringify!(_header)) - ); - assert_eq!( - ::std::mem::align_of::<_header>(), - 4usize, - concat!("Alignment of ", stringify!(_header)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).xfeatures) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_header), - "::", - stringify!(xfeatures) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved1) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_header), - "::", - stringify!(reserved1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved2) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_header), - "::", - stringify!(reserved2) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of _header"][::std::mem::size_of::<_header>() - 64usize]; + ["Alignment of _header"][::std::mem::align_of::<_header>() - 4usize]; + ["Offset of field: _header::xfeatures"][::std::mem::offset_of!(_header, xfeatures) - 0usize]; + ["Offset of field: _header::reserved1"][::std::mem::offset_of!(_header, reserved1) - 8usize]; + ["Offset of field: _header::reserved2"][::std::mem::offset_of!(_header, reserved2) - 24usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _ymmh_state { pub ymmh_space: [__u32; 64usize], } -#[test] -fn bindgen_test_layout__ymmh_state() { - const UNINIT: ::std::mem::MaybeUninit<_ymmh_state> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_ymmh_state>(), - 256usize, - concat!("Size of: ", stringify!(_ymmh_state)) - ); - assert_eq!( - ::std::mem::align_of::<_ymmh_state>(), - 4usize, - concat!("Alignment of ", stringify!(_ymmh_state)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ymmh_space) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_ymmh_state), - "::", - stringify!(ymmh_space) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of _ymmh_state"][::std::mem::size_of::<_ymmh_state>() - 256usize]; + ["Alignment of _ymmh_state"][::std::mem::align_of::<_ymmh_state>() - 4usize]; + ["Offset of field: _ymmh_state::ymmh_space"] + [::std::mem::offset_of!(_ymmh_state, ymmh_space) - 0usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub struct _xstate { @@ -10809,51 +7878,15 @@ pub struct _xstate { pub xstate_hdr: _header, pub ymmh: _ymmh_state, } -#[test] -fn bindgen_test_layout__xstate() { - const UNINIT: ::std::mem::MaybeUninit<_xstate> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_xstate>(), - 944usize, - concat!("Size of: ", stringify!(_xstate)) - ); - assert_eq!( - ::std::mem::align_of::<_xstate>(), - 4usize, - concat!("Alignment of ", stringify!(_xstate)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fpstate) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_xstate), - "::", - stringify!(fpstate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).xstate_hdr) as usize - ptr as usize }, - 624usize, - concat!( - "Offset of field: ", - stringify!(_xstate), - "::", - stringify!(xstate_hdr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ymmh) as usize - ptr as usize }, - 688usize, - concat!( - "Offset of field: ", - stringify!(_xstate), - "::", - stringify!(ymmh) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of _xstate"][::std::mem::size_of::<_xstate>() - 944usize]; + ["Alignment of _xstate"][::std::mem::align_of::<_xstate>() - 4usize]; + ["Offset of field: _xstate::fpstate"][::std::mem::offset_of!(_xstate, fpstate) - 0usize]; + ["Offset of field: _xstate::xstate_hdr"] + [::std::mem::offset_of!(_xstate, xstate_hdr) - 624usize]; + ["Offset of field: _xstate::ymmh"][::std::mem::offset_of!(_xstate, ymmh) - 688usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct sigcontext_32 { @@ -10886,301 +7919,50 @@ pub struct sigcontext_32 { pub oldmask: __u32, pub cr2: __u32, } -#[test] -fn bindgen_test_layout_sigcontext_32() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 88usize, - concat!("Size of: ", stringify!(sigcontext_32)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(sigcontext_32)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gs) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(gs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__gsh) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(__gsh) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fs) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(fs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__fsh) as usize - ptr as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(__fsh) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).es) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(es) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__esh) as usize - ptr as usize }, - 10usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(__esh) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ds) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(ds) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__dsh) as usize - ptr as usize }, - 14usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(__dsh) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).di) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(di) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).si) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(si) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bp) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(bp) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sp) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(sp) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bx) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(bx) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dx) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(dx) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cx) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(cx) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ax) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(ax) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).trapno) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(trapno) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).err) as usize - ptr as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(err) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ip) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(ip) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cs) as usize - ptr as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(cs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__csh) as usize - ptr as usize }, - 62usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(__csh) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sp_at_signal) as usize - ptr as usize }, - 68usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(sp_at_signal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ss) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(ss) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__ssh) as usize - ptr as usize }, - 74usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(__ssh) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fpstate) as usize - ptr as usize }, - 76usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(fpstate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).oldmask) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(oldmask) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cr2) as usize - ptr as usize }, - 84usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(cr2) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sigcontext_32"][::std::mem::size_of::() - 88usize]; + ["Alignment of sigcontext_32"][::std::mem::align_of::() - 4usize]; + ["Offset of field: sigcontext_32::gs"][::std::mem::offset_of!(sigcontext_32, gs) - 0usize]; + ["Offset of field: sigcontext_32::__gsh"] + [::std::mem::offset_of!(sigcontext_32, __gsh) - 2usize]; + ["Offset of field: sigcontext_32::fs"][::std::mem::offset_of!(sigcontext_32, fs) - 4usize]; + ["Offset of field: sigcontext_32::__fsh"] + [::std::mem::offset_of!(sigcontext_32, __fsh) - 6usize]; + ["Offset of field: sigcontext_32::es"][::std::mem::offset_of!(sigcontext_32, es) - 8usize]; + ["Offset of field: sigcontext_32::__esh"] + [::std::mem::offset_of!(sigcontext_32, __esh) - 10usize]; + ["Offset of field: sigcontext_32::ds"][::std::mem::offset_of!(sigcontext_32, ds) - 12usize]; + ["Offset of field: sigcontext_32::__dsh"] + [::std::mem::offset_of!(sigcontext_32, __dsh) - 14usize]; + ["Offset of field: sigcontext_32::di"][::std::mem::offset_of!(sigcontext_32, di) - 16usize]; + ["Offset of field: sigcontext_32::si"][::std::mem::offset_of!(sigcontext_32, si) - 20usize]; + ["Offset of field: sigcontext_32::bp"][::std::mem::offset_of!(sigcontext_32, bp) - 24usize]; + ["Offset of field: sigcontext_32::sp"][::std::mem::offset_of!(sigcontext_32, sp) - 28usize]; + ["Offset of field: sigcontext_32::bx"][::std::mem::offset_of!(sigcontext_32, bx) - 32usize]; + ["Offset of field: sigcontext_32::dx"][::std::mem::offset_of!(sigcontext_32, dx) - 36usize]; + ["Offset of field: sigcontext_32::cx"][::std::mem::offset_of!(sigcontext_32, cx) - 40usize]; + ["Offset of field: sigcontext_32::ax"][::std::mem::offset_of!(sigcontext_32, ax) - 44usize]; + ["Offset of field: sigcontext_32::trapno"] + [::std::mem::offset_of!(sigcontext_32, trapno) - 48usize]; + ["Offset of field: sigcontext_32::err"][::std::mem::offset_of!(sigcontext_32, err) - 52usize]; + ["Offset of field: sigcontext_32::ip"][::std::mem::offset_of!(sigcontext_32, ip) - 56usize]; + ["Offset of field: sigcontext_32::cs"][::std::mem::offset_of!(sigcontext_32, cs) - 60usize]; + ["Offset of field: sigcontext_32::__csh"] + [::std::mem::offset_of!(sigcontext_32, __csh) - 62usize]; + ["Offset of field: sigcontext_32::flags"] + [::std::mem::offset_of!(sigcontext_32, flags) - 64usize]; + ["Offset of field: sigcontext_32::sp_at_signal"] + [::std::mem::offset_of!(sigcontext_32, sp_at_signal) - 68usize]; + ["Offset of field: sigcontext_32::ss"][::std::mem::offset_of!(sigcontext_32, ss) - 72usize]; + ["Offset of field: sigcontext_32::__ssh"] + [::std::mem::offset_of!(sigcontext_32, __ssh) - 74usize]; + ["Offset of field: sigcontext_32::fpstate"] + [::std::mem::offset_of!(sigcontext_32, fpstate) - 76usize]; + ["Offset of field: sigcontext_32::oldmask"] + [::std::mem::offset_of!(sigcontext_32, oldmask) - 80usize]; + ["Offset of field: sigcontext_32::cr2"][::std::mem::offset_of!(sigcontext_32, cr2) - 84usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct sigcontext_64 { @@ -11213,301 +7995,44 @@ pub struct sigcontext_64 { pub fpstate: __u64, pub reserved1: [__u64; 8usize], } -#[test] -fn bindgen_test_layout_sigcontext_64() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 256usize, - concat!("Size of: ", stringify!(sigcontext_64)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(sigcontext_64)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).r8) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(r8) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).r9) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(r9) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).r10) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(r10) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).r11) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(r11) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).r12) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(r12) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).r13) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(r13) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).r14) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(r14) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).r15) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(r15) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).di) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(di) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).si) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(si) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bp) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(bp) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bx) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(bx) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dx) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(dx) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ax) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(ax) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cx) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(cx) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sp) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(sp) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ip) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(ip) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cs) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(cs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gs) as usize - ptr as usize }, - 146usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(gs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fs) as usize - ptr as usize }, - 148usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(fs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ss) as usize - ptr as usize }, - 150usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(ss) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).err) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(err) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).trapno) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(trapno) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).oldmask) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(oldmask) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cr2) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(cr2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fpstate) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(fpstate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved1) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(reserved1) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sigcontext_64"][::std::mem::size_of::() - 256usize]; + ["Alignment of sigcontext_64"][::std::mem::align_of::() - 4usize]; + ["Offset of field: sigcontext_64::r8"][::std::mem::offset_of!(sigcontext_64, r8) - 0usize]; + ["Offset of field: sigcontext_64::r9"][::std::mem::offset_of!(sigcontext_64, r9) - 8usize]; + ["Offset of field: sigcontext_64::r10"][::std::mem::offset_of!(sigcontext_64, r10) - 16usize]; + ["Offset of field: sigcontext_64::r11"][::std::mem::offset_of!(sigcontext_64, r11) - 24usize]; + ["Offset of field: sigcontext_64::r12"][::std::mem::offset_of!(sigcontext_64, r12) - 32usize]; + ["Offset of field: sigcontext_64::r13"][::std::mem::offset_of!(sigcontext_64, r13) - 40usize]; + ["Offset of field: sigcontext_64::r14"][::std::mem::offset_of!(sigcontext_64, r14) - 48usize]; + ["Offset of field: sigcontext_64::r15"][::std::mem::offset_of!(sigcontext_64, r15) - 56usize]; + ["Offset of field: sigcontext_64::di"][::std::mem::offset_of!(sigcontext_64, di) - 64usize]; + ["Offset of field: sigcontext_64::si"][::std::mem::offset_of!(sigcontext_64, si) - 72usize]; + ["Offset of field: sigcontext_64::bp"][::std::mem::offset_of!(sigcontext_64, bp) - 80usize]; + ["Offset of field: sigcontext_64::bx"][::std::mem::offset_of!(sigcontext_64, bx) - 88usize]; + ["Offset of field: sigcontext_64::dx"][::std::mem::offset_of!(sigcontext_64, dx) - 96usize]; + ["Offset of field: sigcontext_64::ax"][::std::mem::offset_of!(sigcontext_64, ax) - 104usize]; + ["Offset of field: sigcontext_64::cx"][::std::mem::offset_of!(sigcontext_64, cx) - 112usize]; + ["Offset of field: sigcontext_64::sp"][::std::mem::offset_of!(sigcontext_64, sp) - 120usize]; + ["Offset of field: sigcontext_64::ip"][::std::mem::offset_of!(sigcontext_64, ip) - 128usize]; + ["Offset of field: sigcontext_64::flags"] + [::std::mem::offset_of!(sigcontext_64, flags) - 136usize]; + ["Offset of field: sigcontext_64::cs"][::std::mem::offset_of!(sigcontext_64, cs) - 144usize]; + ["Offset of field: sigcontext_64::gs"][::std::mem::offset_of!(sigcontext_64, gs) - 146usize]; + ["Offset of field: sigcontext_64::fs"][::std::mem::offset_of!(sigcontext_64, fs) - 148usize]; + ["Offset of field: sigcontext_64::ss"][::std::mem::offset_of!(sigcontext_64, ss) - 150usize]; + ["Offset of field: sigcontext_64::err"][::std::mem::offset_of!(sigcontext_64, err) - 152usize]; + ["Offset of field: sigcontext_64::trapno"] + [::std::mem::offset_of!(sigcontext_64, trapno) - 160usize]; + ["Offset of field: sigcontext_64::oldmask"] + [::std::mem::offset_of!(sigcontext_64, oldmask) - 168usize]; + ["Offset of field: sigcontext_64::cr2"][::std::mem::offset_of!(sigcontext_64, cr2) - 176usize]; + ["Offset of field: sigcontext_64::fpstate"] + [::std::mem::offset_of!(sigcontext_64, fpstate) - 184usize]; + ["Offset of field: sigcontext_64::reserved1"] + [::std::mem::offset_of!(sigcontext_64, reserved1) - 192usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct sigcontext { @@ -11540,301 +8065,40 @@ pub struct sigcontext { pub oldmask: __u32, pub cr2: __u32, } -#[test] -fn bindgen_test_layout_sigcontext() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 88usize, - concat!("Size of: ", stringify!(sigcontext)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(sigcontext)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gs) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(gs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__gsh) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(__gsh) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fs) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(fs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__fsh) as usize - ptr as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(__fsh) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).es) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(es) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__esh) as usize - ptr as usize }, - 10usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(__esh) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ds) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(ds) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__dsh) as usize - ptr as usize }, - 14usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(__dsh) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).edi) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(edi) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).esi) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(esi) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ebp) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(ebp) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).esp) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(esp) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ebx) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(ebx) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).edx) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(edx) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ecx) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(ecx) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).eax) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(eax) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).trapno) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(trapno) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).err) as usize - ptr as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(err) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).eip) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(eip) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cs) as usize - ptr as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(cs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__csh) as usize - ptr as usize }, - 62usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(__csh) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).eflags) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(eflags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).esp_at_signal) as usize - ptr as usize }, - 68usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(esp_at_signal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ss) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(ss) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__ssh) as usize - ptr as usize }, - 74usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(__ssh) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fpstate) as usize - ptr as usize }, - 76usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(fpstate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).oldmask) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(oldmask) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cr2) as usize - ptr as usize }, - 84usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(cr2) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sigcontext"][::std::mem::size_of::() - 88usize]; + ["Alignment of sigcontext"][::std::mem::align_of::() - 4usize]; + ["Offset of field: sigcontext::gs"][::std::mem::offset_of!(sigcontext, gs) - 0usize]; + ["Offset of field: sigcontext::__gsh"][::std::mem::offset_of!(sigcontext, __gsh) - 2usize]; + ["Offset of field: sigcontext::fs"][::std::mem::offset_of!(sigcontext, fs) - 4usize]; + ["Offset of field: sigcontext::__fsh"][::std::mem::offset_of!(sigcontext, __fsh) - 6usize]; + ["Offset of field: sigcontext::es"][::std::mem::offset_of!(sigcontext, es) - 8usize]; + ["Offset of field: sigcontext::__esh"][::std::mem::offset_of!(sigcontext, __esh) - 10usize]; + ["Offset of field: sigcontext::ds"][::std::mem::offset_of!(sigcontext, ds) - 12usize]; + ["Offset of field: sigcontext::__dsh"][::std::mem::offset_of!(sigcontext, __dsh) - 14usize]; + ["Offset of field: sigcontext::edi"][::std::mem::offset_of!(sigcontext, edi) - 16usize]; + ["Offset of field: sigcontext::esi"][::std::mem::offset_of!(sigcontext, esi) - 20usize]; + ["Offset of field: sigcontext::ebp"][::std::mem::offset_of!(sigcontext, ebp) - 24usize]; + ["Offset of field: sigcontext::esp"][::std::mem::offset_of!(sigcontext, esp) - 28usize]; + ["Offset of field: sigcontext::ebx"][::std::mem::offset_of!(sigcontext, ebx) - 32usize]; + ["Offset of field: sigcontext::edx"][::std::mem::offset_of!(sigcontext, edx) - 36usize]; + ["Offset of field: sigcontext::ecx"][::std::mem::offset_of!(sigcontext, ecx) - 40usize]; + ["Offset of field: sigcontext::eax"][::std::mem::offset_of!(sigcontext, eax) - 44usize]; + ["Offset of field: sigcontext::trapno"][::std::mem::offset_of!(sigcontext, trapno) - 48usize]; + ["Offset of field: sigcontext::err"][::std::mem::offset_of!(sigcontext, err) - 52usize]; + ["Offset of field: sigcontext::eip"][::std::mem::offset_of!(sigcontext, eip) - 56usize]; + ["Offset of field: sigcontext::cs"][::std::mem::offset_of!(sigcontext, cs) - 60usize]; + ["Offset of field: sigcontext::__csh"][::std::mem::offset_of!(sigcontext, __csh) - 62usize]; + ["Offset of field: sigcontext::eflags"][::std::mem::offset_of!(sigcontext, eflags) - 64usize]; + ["Offset of field: sigcontext::esp_at_signal"] + [::std::mem::offset_of!(sigcontext, esp_at_signal) - 68usize]; + ["Offset of field: sigcontext::ss"][::std::mem::offset_of!(sigcontext, ss) - 72usize]; + ["Offset of field: sigcontext::__ssh"][::std::mem::offset_of!(sigcontext, __ssh) - 74usize]; + ["Offset of field: sigcontext::fpstate"][::std::mem::offset_of!(sigcontext, fpstate) - 76usize]; + ["Offset of field: sigcontext::oldmask"][::std::mem::offset_of!(sigcontext, oldmask) - 80usize]; + ["Offset of field: sigcontext::cr2"][::std::mem::offset_of!(sigcontext, cr2) - 84usize]; +}; pub type sigset_t = ::std::os::raw::c_ulong; pub type __signalfn_t = ::std::option::Option; pub type __sighandler_t = __signalfn_t; @@ -11860,100 +8124,30 @@ pub union __kernel_sigaction__bindgen_ty_1 { ), >, } -#[test] -fn bindgen_test_layout___kernel_sigaction__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit<__kernel_sigaction__bindgen_ty_1> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__kernel_sigaction__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(__kernel_sigaction__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::<__kernel_sigaction__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(__kernel_sigaction__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._sa_handler) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__kernel_sigaction__bindgen_ty_1), - "::", - stringify!(_sa_handler) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._sa_sigaction) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__kernel_sigaction__bindgen_ty_1), - "::", - stringify!(_sa_sigaction) - ) - ); -} -#[test] -fn bindgen_test_layout___kernel_sigaction() { - const UNINIT: ::std::mem::MaybeUninit<__kernel_sigaction> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__kernel_sigaction>(), - 16usize, - concat!("Size of: ", stringify!(__kernel_sigaction)) - ); - assert_eq!( - ::std::mem::align_of::<__kernel_sigaction>(), - 4usize, - concat!("Alignment of ", stringify!(__kernel_sigaction)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._u) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__kernel_sigaction), - "::", - stringify!(_u) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sa_mask) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__kernel_sigaction), - "::", - stringify!(sa_mask) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sa_flags) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__kernel_sigaction), - "::", - stringify!(sa_flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sa_restorer) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(__kernel_sigaction), - "::", - stringify!(sa_restorer) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __kernel_sigaction__bindgen_ty_1"] + [::std::mem::size_of::<__kernel_sigaction__bindgen_ty_1>() - 4usize]; + ["Alignment of __kernel_sigaction__bindgen_ty_1"] + [::std::mem::align_of::<__kernel_sigaction__bindgen_ty_1>() - 4usize]; + ["Offset of field: __kernel_sigaction__bindgen_ty_1::_sa_handler"] + [::std::mem::offset_of!(__kernel_sigaction__bindgen_ty_1, _sa_handler) - 0usize]; + ["Offset of field: __kernel_sigaction__bindgen_ty_1::_sa_sigaction"] + [::std::mem::offset_of!(__kernel_sigaction__bindgen_ty_1, _sa_sigaction) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __kernel_sigaction"][::std::mem::size_of::<__kernel_sigaction>() - 16usize]; + ["Alignment of __kernel_sigaction"][::std::mem::align_of::<__kernel_sigaction>() - 4usize]; + ["Offset of field: __kernel_sigaction::_u"] + [::std::mem::offset_of!(__kernel_sigaction, _u) - 0usize]; + ["Offset of field: __kernel_sigaction::sa_mask"] + [::std::mem::offset_of!(__kernel_sigaction, sa_mask) - 4usize]; + ["Offset of field: __kernel_sigaction::sa_flags"] + [::std::mem::offset_of!(__kernel_sigaction, sa_flags) - 8usize]; + ["Offset of field: __kernel_sigaction::sa_restorer"] + [::std::mem::offset_of!(__kernel_sigaction, sa_restorer) - 12usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct sigaltstack { @@ -11961,51 +8155,16 @@ pub struct sigaltstack { pub ss_flags: ::std::os::raw::c_int, pub ss_size: __kernel_size_t, } -#[test] -fn bindgen_test_layout_sigaltstack() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(sigaltstack)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(sigaltstack)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ss_sp) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigaltstack), - "::", - stringify!(ss_sp) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ss_flags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(sigaltstack), - "::", - stringify!(ss_flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ss_size) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(sigaltstack), - "::", - stringify!(ss_size) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sigaltstack"][::std::mem::size_of::() - 12usize]; + ["Alignment of sigaltstack"][::std::mem::align_of::() - 4usize]; + ["Offset of field: sigaltstack::ss_sp"][::std::mem::offset_of!(sigaltstack, ss_sp) - 0usize]; + ["Offset of field: sigaltstack::ss_flags"] + [::std::mem::offset_of!(sigaltstack, ss_flags) - 4usize]; + ["Offset of field: sigaltstack::ss_size"] + [::std::mem::offset_of!(sigaltstack, ss_size) - 8usize]; +}; pub type stack_t = sigaltstack; #[repr(C)] #[derive(Copy, Clone)] @@ -12013,41 +8172,13 @@ pub union sigval { pub sival_int: ::std::os::raw::c_int, pub sival_ptr: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout_sigval() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(sigval)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(sigval)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sival_int) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigval), - "::", - stringify!(sival_int) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sival_ptr) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigval), - "::", - stringify!(sival_ptr) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sigval"][::std::mem::size_of::() - 4usize]; + ["Alignment of sigval"][::std::mem::align_of::() - 4usize]; + ["Offset of field: sigval::sival_int"][::std::mem::offset_of!(sigval, sival_int) - 0usize]; + ["Offset of field: sigval::sival_ptr"][::std::mem::offset_of!(sigval, sival_ptr) - 0usize]; +}; pub type sigval_t = sigval; #[repr(C)] #[derive(Copy, Clone)] @@ -12066,42 +8197,17 @@ pub struct __sifields__bindgen_ty_1 { pub _pid: __kernel_pid_t, pub _uid: __kernel_uid32_t, } -#[test] -fn bindgen_test_layout___sifields__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit<__sifields__bindgen_ty_1> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__sifields__bindgen_ty_1>(), - 8usize, - concat!("Size of: ", stringify!(__sifields__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::<__sifields__bindgen_ty_1>(), - 4usize, - concat!("Alignment of ", stringify!(__sifields__bindgen_ty_1)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._pid) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_1), - "::", - stringify!(_pid) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._uid) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_1), - "::", - stringify!(_uid) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __sifields__bindgen_ty_1"] + [::std::mem::size_of::<__sifields__bindgen_ty_1>() - 8usize]; + ["Alignment of __sifields__bindgen_ty_1"] + [::std::mem::align_of::<__sifields__bindgen_ty_1>() - 4usize]; + ["Offset of field: __sifields__bindgen_ty_1::_pid"] + [::std::mem::offset_of!(__sifields__bindgen_ty_1, _pid) - 0usize]; + ["Offset of field: __sifields__bindgen_ty_1::_uid"] + [::std::mem::offset_of!(__sifields__bindgen_ty_1, _uid) - 4usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub struct __sifields__bindgen_ty_2 { @@ -12110,62 +8216,21 @@ pub struct __sifields__bindgen_ty_2 { pub _sigval: sigval_t, pub _sys_private: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout___sifields__bindgen_ty_2() { - const UNINIT: ::std::mem::MaybeUninit<__sifields__bindgen_ty_2> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__sifields__bindgen_ty_2>(), - 16usize, - concat!("Size of: ", stringify!(__sifields__bindgen_ty_2)) - ); - assert_eq!( - ::std::mem::align_of::<__sifields__bindgen_ty_2>(), - 4usize, - concat!("Alignment of ", stringify!(__sifields__bindgen_ty_2)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._tid) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_2), - "::", - stringify!(_tid) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._overrun) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_2), - "::", - stringify!(_overrun) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._sigval) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_2), - "::", - stringify!(_sigval) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._sys_private) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_2), - "::", - stringify!(_sys_private) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __sifields__bindgen_ty_2"] + [::std::mem::size_of::<__sifields__bindgen_ty_2>() - 16usize]; + ["Alignment of __sifields__bindgen_ty_2"] + [::std::mem::align_of::<__sifields__bindgen_ty_2>() - 4usize]; + ["Offset of field: __sifields__bindgen_ty_2::_tid"] + [::std::mem::offset_of!(__sifields__bindgen_ty_2, _tid) - 0usize]; + ["Offset of field: __sifields__bindgen_ty_2::_overrun"] + [::std::mem::offset_of!(__sifields__bindgen_ty_2, _overrun) - 4usize]; + ["Offset of field: __sifields__bindgen_ty_2::_sigval"] + [::std::mem::offset_of!(__sifields__bindgen_ty_2, _sigval) - 8usize]; + ["Offset of field: __sifields__bindgen_ty_2::_sys_private"] + [::std::mem::offset_of!(__sifields__bindgen_ty_2, _sys_private) - 12usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub struct __sifields__bindgen_ty_3 { @@ -12173,52 +8238,19 @@ pub struct __sifields__bindgen_ty_3 { pub _uid: __kernel_uid32_t, pub _sigval: sigval_t, } -#[test] -fn bindgen_test_layout___sifields__bindgen_ty_3() { - const UNINIT: ::std::mem::MaybeUninit<__sifields__bindgen_ty_3> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__sifields__bindgen_ty_3>(), - 12usize, - concat!("Size of: ", stringify!(__sifields__bindgen_ty_3)) - ); - assert_eq!( - ::std::mem::align_of::<__sifields__bindgen_ty_3>(), - 4usize, - concat!("Alignment of ", stringify!(__sifields__bindgen_ty_3)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._pid) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_3), - "::", - stringify!(_pid) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._uid) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_3), - "::", - stringify!(_uid) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._sigval) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_3), - "::", - stringify!(_sigval) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __sifields__bindgen_ty_3"] + [::std::mem::size_of::<__sifields__bindgen_ty_3>() - 12usize]; + ["Alignment of __sifields__bindgen_ty_3"] + [::std::mem::align_of::<__sifields__bindgen_ty_3>() - 4usize]; + ["Offset of field: __sifields__bindgen_ty_3::_pid"] + [::std::mem::offset_of!(__sifields__bindgen_ty_3, _pid) - 0usize]; + ["Offset of field: __sifields__bindgen_ty_3::_uid"] + [::std::mem::offset_of!(__sifields__bindgen_ty_3, _uid) - 4usize]; + ["Offset of field: __sifields__bindgen_ty_3::_sigval"] + [::std::mem::offset_of!(__sifields__bindgen_ty_3, _sigval) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __sifields__bindgen_ty_4 { @@ -12228,72 +8260,23 @@ pub struct __sifields__bindgen_ty_4 { pub _utime: __kernel_clock_t, pub _stime: __kernel_clock_t, } -#[test] -fn bindgen_test_layout___sifields__bindgen_ty_4() { - const UNINIT: ::std::mem::MaybeUninit<__sifields__bindgen_ty_4> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__sifields__bindgen_ty_4>(), - 20usize, - concat!("Size of: ", stringify!(__sifields__bindgen_ty_4)) - ); - assert_eq!( - ::std::mem::align_of::<__sifields__bindgen_ty_4>(), - 4usize, - concat!("Alignment of ", stringify!(__sifields__bindgen_ty_4)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._pid) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_4), - "::", - stringify!(_pid) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._uid) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_4), - "::", - stringify!(_uid) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._status) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_4), - "::", - stringify!(_status) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._utime) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_4), - "::", - stringify!(_utime) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._stime) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_4), - "::", - stringify!(_stime) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __sifields__bindgen_ty_4"] + [::std::mem::size_of::<__sifields__bindgen_ty_4>() - 20usize]; + ["Alignment of __sifields__bindgen_ty_4"] + [::std::mem::align_of::<__sifields__bindgen_ty_4>() - 4usize]; + ["Offset of field: __sifields__bindgen_ty_4::_pid"] + [::std::mem::offset_of!(__sifields__bindgen_ty_4, _pid) - 0usize]; + ["Offset of field: __sifields__bindgen_ty_4::_uid"] + [::std::mem::offset_of!(__sifields__bindgen_ty_4, _uid) - 4usize]; + ["Offset of field: __sifields__bindgen_ty_4::_status"] + [::std::mem::offset_of!(__sifields__bindgen_ty_4, _status) - 8usize]; + ["Offset of field: __sifields__bindgen_ty_4::_utime"] + [::std::mem::offset_of!(__sifields__bindgen_ty_4, _utime) - 12usize]; + ["Offset of field: __sifields__bindgen_ty_4::_stime"] + [::std::mem::offset_of!(__sifields__bindgen_ty_4, _stime) - 16usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub struct __sifields__bindgen_ty_5 { @@ -12316,106 +8299,48 @@ pub struct __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1 { pub _lower: *mut ::std::os::raw::c_void, pub _upper: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout___sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1>(), - 12usize, - concat!( - "Size of: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._dummy_bnd) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(_dummy_bnd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._lower) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(_lower) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._upper) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(_upper) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::size_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1>() - 12usize]; + ["Alignment of __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::align_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1>() - 4usize]; + ["Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1::_dummy_bnd"][::std::mem::offset_of!( + __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1, + _dummy_bnd + ) + - 0usize]; + ["Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1::_lower"][::std::mem::offset_of!( + __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1, + _lower + ) - 4usize]; + ["Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1::_upper"][::std::mem::offset_of!( + __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1, + _upper + ) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2 { pub _dummy_pkey: [::std::os::raw::c_char; 4usize], pub _pkey: __u32, } -#[test] -fn bindgen_test_layout___sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2() { - const UNINIT: ::std::mem::MaybeUninit<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2>(), - 8usize, - concat!( - "Size of: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2) - ) - ); - assert_eq!( - ::std::mem::align_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2>(), - 4usize, - concat!( - "Alignment of ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._dummy_pkey) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(_dummy_pkey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._pkey) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(_pkey) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2"] + [::std::mem::size_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2>() - 8usize]; + ["Alignment of __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2"] + [::std::mem::align_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2>() - 4usize]; + ["Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2::_dummy_pkey"][::std::mem::offset_of!( + __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2, + _dummy_pkey + ) + - 0usize]; + ["Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2::_pkey"][::std::mem::offset_of!( + __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2, + _pkey + ) - 4usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3 { @@ -12423,198 +8348,68 @@ pub struct __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3 { pub _type: __u32, pub _flags: __u32, } -#[test] -fn bindgen_test_layout___sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3() { - const UNINIT: ::std::mem::MaybeUninit<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3>(), - 12usize, - concat!( - "Size of: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3) - ) - ); - assert_eq!( - ::std::mem::align_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3>(), - 4usize, - concat!( - "Alignment of ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._data) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(_data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._type) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(_type) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._flags) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(_flags) - ) - ); -} -#[test] -fn bindgen_test_layout___sifields__bindgen_ty_5__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit<__sifields__bindgen_ty_5__bindgen_ty_1> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__sifields__bindgen_ty_5__bindgen_ty_1>(), - 12usize, - concat!( - "Size of: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::<__sifields__bindgen_ty_5__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._trapno) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1), - "::", - stringify!(_trapno) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._addr_lsb) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1), - "::", - stringify!(_addr_lsb) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._addr_bnd) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1), - "::", - stringify!(_addr_bnd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._addr_pkey) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1), - "::", - stringify!(_addr_pkey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._perf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1), - "::", - stringify!(_perf) - ) - ); -} -#[test] -fn bindgen_test_layout___sifields__bindgen_ty_5() { - const UNINIT: ::std::mem::MaybeUninit<__sifields__bindgen_ty_5> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__sifields__bindgen_ty_5>(), - 16usize, - concat!("Size of: ", stringify!(__sifields__bindgen_ty_5)) - ); - assert_eq!( - ::std::mem::align_of::<__sifields__bindgen_ty_5>(), - 4usize, - concat!("Alignment of ", stringify!(__sifields__bindgen_ty_5)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._addr) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5), - "::", - stringify!(_addr) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3"] + [::std::mem::size_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3>() - 12usize]; + ["Alignment of __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3"] + [::std::mem::align_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3>() - 4usize]; + ["Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3::_data"][::std::mem::offset_of!( + __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3, + _data + ) - 0usize]; + ["Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3::_type"][::std::mem::offset_of!( + __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3, + _type + ) - 4usize]; + ["Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3::_flags"][::std::mem::offset_of!( + __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3, + _flags + ) - 8usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __sifields__bindgen_ty_5__bindgen_ty_1"] + [::std::mem::size_of::<__sifields__bindgen_ty_5__bindgen_ty_1>() - 12usize]; + ["Alignment of __sifields__bindgen_ty_5__bindgen_ty_1"] + [::std::mem::align_of::<__sifields__bindgen_ty_5__bindgen_ty_1>() - 4usize]; + ["Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1::_trapno"] + [::std::mem::offset_of!(__sifields__bindgen_ty_5__bindgen_ty_1, _trapno) - 0usize]; + ["Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1::_addr_lsb"] + [::std::mem::offset_of!(__sifields__bindgen_ty_5__bindgen_ty_1, _addr_lsb) - 0usize]; + ["Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1::_addr_bnd"] + [::std::mem::offset_of!(__sifields__bindgen_ty_5__bindgen_ty_1, _addr_bnd) - 0usize]; + ["Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1::_addr_pkey"] + [::std::mem::offset_of!(__sifields__bindgen_ty_5__bindgen_ty_1, _addr_pkey) - 0usize]; + ["Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1::_perf"] + [::std::mem::offset_of!(__sifields__bindgen_ty_5__bindgen_ty_1, _perf) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __sifields__bindgen_ty_5"] + [::std::mem::size_of::<__sifields__bindgen_ty_5>() - 16usize]; + ["Alignment of __sifields__bindgen_ty_5"] + [::std::mem::align_of::<__sifields__bindgen_ty_5>() - 4usize]; + ["Offset of field: __sifields__bindgen_ty_5::_addr"] + [::std::mem::offset_of!(__sifields__bindgen_ty_5, _addr) - 0usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __sifields__bindgen_ty_6 { pub _band: ::std::os::raw::c_long, pub _fd: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout___sifields__bindgen_ty_6() { - const UNINIT: ::std::mem::MaybeUninit<__sifields__bindgen_ty_6> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__sifields__bindgen_ty_6>(), - 8usize, - concat!("Size of: ", stringify!(__sifields__bindgen_ty_6)) - ); - assert_eq!( - ::std::mem::align_of::<__sifields__bindgen_ty_6>(), - 4usize, - concat!("Alignment of ", stringify!(__sifields__bindgen_ty_6)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._band) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_6), - "::", - stringify!(_band) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._fd) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_6), - "::", - stringify!(_fd) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __sifields__bindgen_ty_6"] + [::std::mem::size_of::<__sifields__bindgen_ty_6>() - 8usize]; + ["Alignment of __sifields__bindgen_ty_6"] + [::std::mem::align_of::<__sifields__bindgen_ty_6>() - 4usize]; + ["Offset of field: __sifields__bindgen_ty_6::_band"] + [::std::mem::offset_of!(__sifields__bindgen_ty_6, _band) - 0usize]; + ["Offset of field: __sifields__bindgen_ty_6::_fd"] + [::std::mem::offset_of!(__sifields__bindgen_ty_6, _fd) - 4usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __sifields__bindgen_ty_7 { @@ -12622,137 +8417,34 @@ pub struct __sifields__bindgen_ty_7 { pub _syscall: ::std::os::raw::c_int, pub _arch: ::std::os::raw::c_uint, } -#[test] -fn bindgen_test_layout___sifields__bindgen_ty_7() { - const UNINIT: ::std::mem::MaybeUninit<__sifields__bindgen_ty_7> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__sifields__bindgen_ty_7>(), - 12usize, - concat!("Size of: ", stringify!(__sifields__bindgen_ty_7)) - ); - assert_eq!( - ::std::mem::align_of::<__sifields__bindgen_ty_7>(), - 4usize, - concat!("Alignment of ", stringify!(__sifields__bindgen_ty_7)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._call_addr) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_7), - "::", - stringify!(_call_addr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._syscall) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_7), - "::", - stringify!(_syscall) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._arch) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_7), - "::", - stringify!(_arch) - ) - ); -} -#[test] -fn bindgen_test_layout___sifields() { - const UNINIT: ::std::mem::MaybeUninit<__sifields> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__sifields>(), - 20usize, - concat!("Size of: ", stringify!(__sifields)) - ); - assert_eq!( - ::std::mem::align_of::<__sifields>(), - 4usize, - concat!("Alignment of ", stringify!(__sifields)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._kill) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields), - "::", - stringify!(_kill) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._timer) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields), - "::", - stringify!(_timer) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._rt) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields), - "::", - stringify!(_rt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._sigchld) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields), - "::", - stringify!(_sigchld) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._sigfault) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields), - "::", - stringify!(_sigfault) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._sigpoll) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields), - "::", - stringify!(_sigpoll) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._sigsys) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields), - "::", - stringify!(_sigsys) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __sifields__bindgen_ty_7"] + [::std::mem::size_of::<__sifields__bindgen_ty_7>() - 12usize]; + ["Alignment of __sifields__bindgen_ty_7"] + [::std::mem::align_of::<__sifields__bindgen_ty_7>() - 4usize]; + ["Offset of field: __sifields__bindgen_ty_7::_call_addr"] + [::std::mem::offset_of!(__sifields__bindgen_ty_7, _call_addr) - 0usize]; + ["Offset of field: __sifields__bindgen_ty_7::_syscall"] + [::std::mem::offset_of!(__sifields__bindgen_ty_7, _syscall) - 4usize]; + ["Offset of field: __sifields__bindgen_ty_7::_arch"] + [::std::mem::offset_of!(__sifields__bindgen_ty_7, _arch) - 8usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __sifields"][::std::mem::size_of::<__sifields>() - 20usize]; + ["Alignment of __sifields"][::std::mem::align_of::<__sifields>() - 4usize]; + ["Offset of field: __sifields::_kill"][::std::mem::offset_of!(__sifields, _kill) - 0usize]; + ["Offset of field: __sifields::_timer"][::std::mem::offset_of!(__sifields, _timer) - 0usize]; + ["Offset of field: __sifields::_rt"][::std::mem::offset_of!(__sifields, _rt) - 0usize]; + ["Offset of field: __sifields::_sigchld"] + [::std::mem::offset_of!(__sifields, _sigchld) - 0usize]; + ["Offset of field: __sifields::_sigfault"] + [::std::mem::offset_of!(__sifields, _sigfault) - 0usize]; + ["Offset of field: __sifields::_sigpoll"] + [::std::mem::offset_of!(__sifields, _sigpoll) - 0usize]; + ["Offset of field: __sifields::_sigsys"][::std::mem::offset_of!(__sifields, _sigsys) - 0usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub struct siginfo { @@ -12772,104 +8464,34 @@ pub struct siginfo__bindgen_ty_1__bindgen_ty_1 { pub si_code: ::std::os::raw::c_int, pub _sifields: __sifields, } -#[test] -fn bindgen_test_layout_siginfo__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(siginfo__bindgen_ty_1__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(siginfo__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).si_signo) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(siginfo__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(si_signo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).si_errno) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(siginfo__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(si_errno) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).si_code) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(siginfo__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(si_code) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._sifields) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(siginfo__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(_sifields) - ) - ); -} -#[test] -fn bindgen_test_layout_siginfo__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 128usize, - concat!("Size of: ", stringify!(siginfo__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(siginfo__bindgen_ty_1)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._si_pad) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(siginfo__bindgen_ty_1), - "::", - stringify!(_si_pad) - ) - ); -} -#[test] -fn bindgen_test_layout_siginfo() { - assert_eq!( - ::std::mem::size_of::(), - 128usize, - concat!("Size of: ", stringify!(siginfo)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(siginfo)) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of siginfo__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of siginfo__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: siginfo__bindgen_ty_1__bindgen_ty_1::si_signo"] + [::std::mem::offset_of!(siginfo__bindgen_ty_1__bindgen_ty_1, si_signo) - 0usize]; + ["Offset of field: siginfo__bindgen_ty_1__bindgen_ty_1::si_errno"] + [::std::mem::offset_of!(siginfo__bindgen_ty_1__bindgen_ty_1, si_errno) - 4usize]; + ["Offset of field: siginfo__bindgen_ty_1__bindgen_ty_1::si_code"] + [::std::mem::offset_of!(siginfo__bindgen_ty_1__bindgen_ty_1, si_code) - 8usize]; + ["Offset of field: siginfo__bindgen_ty_1__bindgen_ty_1::_sifields"] + [::std::mem::offset_of!(siginfo__bindgen_ty_1__bindgen_ty_1, _sifields) - 12usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of siginfo__bindgen_ty_1"][::std::mem::size_of::() - 128usize]; + ["Alignment of siginfo__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: siginfo__bindgen_ty_1::_si_pad"] + [::std::mem::offset_of!(siginfo__bindgen_ty_1, _si_pad) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of siginfo"][::std::mem::size_of::() - 128usize]; + ["Alignment of siginfo"][::std::mem::align_of::() - 4usize]; +}; pub type siginfo_t = siginfo; #[repr(C)] #[derive(Copy, Clone)] @@ -12892,149 +8514,41 @@ pub struct sigevent__bindgen_ty_1__bindgen_ty_1 { pub _function: ::std::option::Option, pub _attribute: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout_sigevent__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!( - "Size of: ", - stringify!(sigevent__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(sigevent__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._function) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigevent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(_function) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._attribute) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(sigevent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(_attribute) - ) - ); -} -#[test] -fn bindgen_test_layout_sigevent__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 52usize, - concat!("Size of: ", stringify!(sigevent__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(sigevent__bindgen_ty_1)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._pad) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigevent__bindgen_ty_1), - "::", - stringify!(_pad) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._tid) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigevent__bindgen_ty_1), - "::", - stringify!(_tid) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._sigev_thread) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigevent__bindgen_ty_1), - "::", - stringify!(_sigev_thread) - ) - ); -} -#[test] -fn bindgen_test_layout_sigevent() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(sigevent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(sigevent)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sigev_value) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigevent), - "::", - stringify!(sigev_value) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sigev_signo) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(sigevent), - "::", - stringify!(sigev_signo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sigev_notify) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(sigevent), - "::", - stringify!(sigev_notify) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._sigev_un) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(sigevent), - "::", - stringify!(_sigev_un) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sigevent__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::size_of::() - 8usize]; + ["Alignment of sigevent__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: sigevent__bindgen_ty_1__bindgen_ty_1::_function"] + [::std::mem::offset_of!(sigevent__bindgen_ty_1__bindgen_ty_1, _function) - 0usize]; + ["Offset of field: sigevent__bindgen_ty_1__bindgen_ty_1::_attribute"] + [::std::mem::offset_of!(sigevent__bindgen_ty_1__bindgen_ty_1, _attribute) - 4usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sigevent__bindgen_ty_1"][::std::mem::size_of::() - 52usize]; + ["Alignment of sigevent__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: sigevent__bindgen_ty_1::_pad"] + [::std::mem::offset_of!(sigevent__bindgen_ty_1, _pad) - 0usize]; + ["Offset of field: sigevent__bindgen_ty_1::_tid"] + [::std::mem::offset_of!(sigevent__bindgen_ty_1, _tid) - 0usize]; + ["Offset of field: sigevent__bindgen_ty_1::_sigev_thread"] + [::std::mem::offset_of!(sigevent__bindgen_ty_1, _sigev_thread) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sigevent"][::std::mem::size_of::() - 64usize]; + ["Alignment of sigevent"][::std::mem::align_of::() - 4usize]; + ["Offset of field: sigevent::sigev_value"] + [::std::mem::offset_of!(sigevent, sigev_value) - 0usize]; + ["Offset of field: sigevent::sigev_signo"] + [::std::mem::offset_of!(sigevent, sigev_signo) - 4usize]; + ["Offset of field: sigevent::sigev_notify"] + [::std::mem::offset_of!(sigevent, sigev_notify) - 8usize]; + ["Offset of field: sigevent::_sigev_un"][::std::mem::offset_of!(sigevent, _sigev_un) - 12usize]; +}; pub type sigevent_t = sigevent; pub type sig_atomic_t = ::std::os::raw::c_int; pub type sig_t = __sighandler_t; @@ -13044,31 +8558,12 @@ pub type sighandler_t = __sighandler_t; pub struct sigset64_t { pub __bits: [::std::os::raw::c_ulong; 2usize], } -#[test] -fn bindgen_test_layout_sigset64_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(sigset64_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(sigset64_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__bits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigset64_t), - "::", - stringify!(__bits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sigset64_t"][::std::mem::size_of::() - 8usize]; + ["Alignment of sigset64_t"][::std::mem::align_of::() - 4usize]; + ["Offset of field: sigset64_t::__bits"][::std::mem::offset_of!(sigset64_t, __bits) - 0usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub struct sigaction { @@ -13089,87 +8584,25 @@ pub union sigaction__bindgen_ty_1 { ), >, } -#[test] -fn bindgen_test_layout_sigaction__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(sigaction__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(sigaction__bindgen_ty_1)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sa_handler) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigaction__bindgen_ty_1), - "::", - stringify!(sa_handler) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sa_sigaction) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigaction__bindgen_ty_1), - "::", - stringify!(sa_sigaction) - ) - ); -} -#[test] -fn bindgen_test_layout_sigaction() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(sigaction)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(sigaction)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sa_mask) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(sigaction), - "::", - stringify!(sa_mask) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sa_flags) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(sigaction), - "::", - stringify!(sa_flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sa_restorer) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(sigaction), - "::", - stringify!(sa_restorer) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sigaction__bindgen_ty_1"][::std::mem::size_of::() - 4usize]; + ["Alignment of sigaction__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: sigaction__bindgen_ty_1::sa_handler"] + [::std::mem::offset_of!(sigaction__bindgen_ty_1, sa_handler) - 0usize]; + ["Offset of field: sigaction__bindgen_ty_1::sa_sigaction"] + [::std::mem::offset_of!(sigaction__bindgen_ty_1, sa_sigaction) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sigaction"][::std::mem::size_of::() - 16usize]; + ["Alignment of sigaction"][::std::mem::align_of::() - 4usize]; + ["Offset of field: sigaction::sa_mask"][::std::mem::offset_of!(sigaction, sa_mask) - 4usize]; + ["Offset of field: sigaction::sa_flags"][::std::mem::offset_of!(sigaction, sa_flags) - 8usize]; + ["Offset of field: sigaction::sa_restorer"] + [::std::mem::offset_of!(sigaction, sa_restorer) - 12usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub struct sigaction64 { @@ -13190,87 +8623,28 @@ pub union sigaction64__bindgen_ty_1 { ), >, } -#[test] -fn bindgen_test_layout_sigaction64__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(sigaction64__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(sigaction64__bindgen_ty_1)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sa_handler) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigaction64__bindgen_ty_1), - "::", - stringify!(sa_handler) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sa_sigaction) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigaction64__bindgen_ty_1), - "::", - stringify!(sa_sigaction) - ) - ); -} -#[test] -fn bindgen_test_layout_sigaction64() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 20usize, - concat!("Size of: ", stringify!(sigaction64)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(sigaction64)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sa_flags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(sigaction64), - "::", - stringify!(sa_flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sa_restorer) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(sigaction64), - "::", - stringify!(sa_restorer) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sa_mask) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(sigaction64), - "::", - stringify!(sa_mask) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sigaction64__bindgen_ty_1"] + [::std::mem::size_of::() - 4usize]; + ["Alignment of sigaction64__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: sigaction64__bindgen_ty_1::sa_handler"] + [::std::mem::offset_of!(sigaction64__bindgen_ty_1, sa_handler) - 0usize]; + ["Offset of field: sigaction64__bindgen_ty_1::sa_sigaction"] + [::std::mem::offset_of!(sigaction64__bindgen_ty_1, sa_sigaction) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sigaction64"][::std::mem::size_of::() - 20usize]; + ["Alignment of sigaction64"][::std::mem::align_of::() - 4usize]; + ["Offset of field: sigaction64::sa_flags"] + [::std::mem::offset_of!(sigaction64, sa_flags) - 4usize]; + ["Offset of field: sigaction64::sa_restorer"] + [::std::mem::offset_of!(sigaction64, sa_restorer) - 8usize]; + ["Offset of field: sigaction64::sa_mask"] + [::std::mem::offset_of!(sigaction64, sa_mask) - 12usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct user_fpregs_struct { @@ -13283,101 +8657,27 @@ pub struct user_fpregs_struct { pub fos: ::std::os::raw::c_long, pub st_space: [::std::os::raw::c_long; 20usize], } -#[test] -fn bindgen_test_layout_user_fpregs_struct() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 108usize, - concat!("Size of: ", stringify!(user_fpregs_struct)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(user_fpregs_struct)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cwd) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(user_fpregs_struct), - "::", - stringify!(cwd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).swd) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(user_fpregs_struct), - "::", - stringify!(swd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).twd) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(user_fpregs_struct), - "::", - stringify!(twd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fip) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(user_fpregs_struct), - "::", - stringify!(fip) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fcs) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(user_fpregs_struct), - "::", - stringify!(fcs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).foo) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(user_fpregs_struct), - "::", - stringify!(foo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fos) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(user_fpregs_struct), - "::", - stringify!(fos) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).st_space) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(user_fpregs_struct), - "::", - stringify!(st_space) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of user_fpregs_struct"][::std::mem::size_of::() - 108usize]; + ["Alignment of user_fpregs_struct"][::std::mem::align_of::() - 4usize]; + ["Offset of field: user_fpregs_struct::cwd"] + [::std::mem::offset_of!(user_fpregs_struct, cwd) - 0usize]; + ["Offset of field: user_fpregs_struct::swd"] + [::std::mem::offset_of!(user_fpregs_struct, swd) - 4usize]; + ["Offset of field: user_fpregs_struct::twd"] + [::std::mem::offset_of!(user_fpregs_struct, twd) - 8usize]; + ["Offset of field: user_fpregs_struct::fip"] + [::std::mem::offset_of!(user_fpregs_struct, fip) - 12usize]; + ["Offset of field: user_fpregs_struct::fcs"] + [::std::mem::offset_of!(user_fpregs_struct, fcs) - 16usize]; + ["Offset of field: user_fpregs_struct::foo"] + [::std::mem::offset_of!(user_fpregs_struct, foo) - 20usize]; + ["Offset of field: user_fpregs_struct::fos"] + [::std::mem::offset_of!(user_fpregs_struct, fos) - 24usize]; + ["Offset of field: user_fpregs_struct::st_space"] + [::std::mem::offset_of!(user_fpregs_struct, st_space) - 28usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct user_fpxregs_struct { @@ -13395,151 +8695,37 @@ pub struct user_fpxregs_struct { pub xmm_space: [::std::os::raw::c_long; 32usize], pub padding: [::std::os::raw::c_long; 56usize], } -#[test] -fn bindgen_test_layout_user_fpxregs_struct() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 512usize, - concat!("Size of: ", stringify!(user_fpxregs_struct)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(user_fpxregs_struct)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cwd) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(user_fpxregs_struct), - "::", - stringify!(cwd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).swd) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(user_fpxregs_struct), - "::", - stringify!(swd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).twd) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(user_fpxregs_struct), - "::", - stringify!(twd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fop) as usize - ptr as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(user_fpxregs_struct), - "::", - stringify!(fop) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fip) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(user_fpxregs_struct), - "::", - stringify!(fip) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fcs) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(user_fpxregs_struct), - "::", - stringify!(fcs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).foo) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(user_fpxregs_struct), - "::", - stringify!(foo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fos) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(user_fpxregs_struct), - "::", - stringify!(fos) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mxcsr) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(user_fpxregs_struct), - "::", - stringify!(mxcsr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(user_fpxregs_struct), - "::", - stringify!(reserved) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).st_space) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(user_fpxregs_struct), - "::", - stringify!(st_space) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).xmm_space) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(user_fpxregs_struct), - "::", - stringify!(xmm_space) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).padding) as usize - ptr as usize }, - 288usize, - concat!( - "Offset of field: ", - stringify!(user_fpxregs_struct), - "::", - stringify!(padding) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of user_fpxregs_struct"][::std::mem::size_of::() - 512usize]; + ["Alignment of user_fpxregs_struct"][::std::mem::align_of::() - 4usize]; + ["Offset of field: user_fpxregs_struct::cwd"] + [::std::mem::offset_of!(user_fpxregs_struct, cwd) - 0usize]; + ["Offset of field: user_fpxregs_struct::swd"] + [::std::mem::offset_of!(user_fpxregs_struct, swd) - 2usize]; + ["Offset of field: user_fpxregs_struct::twd"] + [::std::mem::offset_of!(user_fpxregs_struct, twd) - 4usize]; + ["Offset of field: user_fpxregs_struct::fop"] + [::std::mem::offset_of!(user_fpxregs_struct, fop) - 6usize]; + ["Offset of field: user_fpxregs_struct::fip"] + [::std::mem::offset_of!(user_fpxregs_struct, fip) - 8usize]; + ["Offset of field: user_fpxregs_struct::fcs"] + [::std::mem::offset_of!(user_fpxregs_struct, fcs) - 12usize]; + ["Offset of field: user_fpxregs_struct::foo"] + [::std::mem::offset_of!(user_fpxregs_struct, foo) - 16usize]; + ["Offset of field: user_fpxregs_struct::fos"] + [::std::mem::offset_of!(user_fpxregs_struct, fos) - 20usize]; + ["Offset of field: user_fpxregs_struct::mxcsr"] + [::std::mem::offset_of!(user_fpxregs_struct, mxcsr) - 24usize]; + ["Offset of field: user_fpxregs_struct::reserved"] + [::std::mem::offset_of!(user_fpxregs_struct, reserved) - 28usize]; + ["Offset of field: user_fpxregs_struct::st_space"] + [::std::mem::offset_of!(user_fpxregs_struct, st_space) - 32usize]; + ["Offset of field: user_fpxregs_struct::xmm_space"] + [::std::mem::offset_of!(user_fpxregs_struct, xmm_space) - 160usize]; + ["Offset of field: user_fpxregs_struct::padding"] + [::std::mem::offset_of!(user_fpxregs_struct, padding) - 288usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct user_regs_struct { @@ -13561,191 +8747,45 @@ pub struct user_regs_struct { pub esp: ::std::os::raw::c_long, pub xss: ::std::os::raw::c_long, } -#[test] -fn bindgen_test_layout_user_regs_struct() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 68usize, - concat!("Size of: ", stringify!(user_regs_struct)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(user_regs_struct)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ebx) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(ebx) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ecx) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(ecx) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).edx) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(edx) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).esi) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(esi) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).edi) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(edi) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ebp) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(ebp) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).eax) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(eax) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).xds) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(xds) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).xes) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(xes) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).xfs) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(xfs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).xgs) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(xgs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).orig_eax) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(orig_eax) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).eip) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(eip) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).xcs) as usize - ptr as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(xcs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).eflags) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(eflags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).esp) as usize - ptr as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(esp) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).xss) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(xss) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of user_regs_struct"][::std::mem::size_of::() - 68usize]; + ["Alignment of user_regs_struct"][::std::mem::align_of::() - 4usize]; + ["Offset of field: user_regs_struct::ebx"] + [::std::mem::offset_of!(user_regs_struct, ebx) - 0usize]; + ["Offset of field: user_regs_struct::ecx"] + [::std::mem::offset_of!(user_regs_struct, ecx) - 4usize]; + ["Offset of field: user_regs_struct::edx"] + [::std::mem::offset_of!(user_regs_struct, edx) - 8usize]; + ["Offset of field: user_regs_struct::esi"] + [::std::mem::offset_of!(user_regs_struct, esi) - 12usize]; + ["Offset of field: user_regs_struct::edi"] + [::std::mem::offset_of!(user_regs_struct, edi) - 16usize]; + ["Offset of field: user_regs_struct::ebp"] + [::std::mem::offset_of!(user_regs_struct, ebp) - 20usize]; + ["Offset of field: user_regs_struct::eax"] + [::std::mem::offset_of!(user_regs_struct, eax) - 24usize]; + ["Offset of field: user_regs_struct::xds"] + [::std::mem::offset_of!(user_regs_struct, xds) - 28usize]; + ["Offset of field: user_regs_struct::xes"] + [::std::mem::offset_of!(user_regs_struct, xes) - 32usize]; + ["Offset of field: user_regs_struct::xfs"] + [::std::mem::offset_of!(user_regs_struct, xfs) - 36usize]; + ["Offset of field: user_regs_struct::xgs"] + [::std::mem::offset_of!(user_regs_struct, xgs) - 40usize]; + ["Offset of field: user_regs_struct::orig_eax"] + [::std::mem::offset_of!(user_regs_struct, orig_eax) - 44usize]; + ["Offset of field: user_regs_struct::eip"] + [::std::mem::offset_of!(user_regs_struct, eip) - 48usize]; + ["Offset of field: user_regs_struct::xcs"] + [::std::mem::offset_of!(user_regs_struct, xcs) - 52usize]; + ["Offset of field: user_regs_struct::eflags"] + [::std::mem::offset_of!(user_regs_struct, eflags) - 56usize]; + ["Offset of field: user_regs_struct::esp"] + [::std::mem::offset_of!(user_regs_struct, esp) - 60usize]; + ["Offset of field: user_regs_struct::xss"] + [::std::mem::offset_of!(user_regs_struct, xss) - 64usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct user { @@ -13765,171 +8805,26 @@ pub struct user { pub u_comm: [::std::os::raw::c_char; 32usize], pub u_debugreg: [::std::os::raw::c_int; 8usize], } -#[test] -fn bindgen_test_layout_user() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 284usize, - concat!("Size of: ", stringify!(user)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(user)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).regs) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(regs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).u_fpvalid) as usize - ptr as usize }, - 68usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(u_fpvalid) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).i387) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(i387) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).u_tsize) as usize - ptr as usize }, - 180usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(u_tsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).u_dsize) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(u_dsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).u_ssize) as usize - ptr as usize }, - 188usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(u_ssize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).start_code) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(start_code) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).start_stack) as usize - ptr as usize }, - 196usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(start_stack) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).signal) as usize - ptr as usize }, - 200usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(signal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, - 204usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(reserved) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).u_ar0) as usize - ptr as usize }, - 208usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(u_ar0) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).u_fpstate) as usize - ptr as usize }, - 212usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(u_fpstate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).magic) as usize - ptr as usize }, - 216usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(magic) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).u_comm) as usize - ptr as usize }, - 220usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(u_comm) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).u_debugreg) as usize - ptr as usize }, - 252usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(u_debugreg) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of user"][::std::mem::size_of::() - 284usize]; + ["Alignment of user"][::std::mem::align_of::() - 4usize]; + ["Offset of field: user::regs"][::std::mem::offset_of!(user, regs) - 0usize]; + ["Offset of field: user::u_fpvalid"][::std::mem::offset_of!(user, u_fpvalid) - 68usize]; + ["Offset of field: user::i387"][::std::mem::offset_of!(user, i387) - 72usize]; + ["Offset of field: user::u_tsize"][::std::mem::offset_of!(user, u_tsize) - 180usize]; + ["Offset of field: user::u_dsize"][::std::mem::offset_of!(user, u_dsize) - 184usize]; + ["Offset of field: user::u_ssize"][::std::mem::offset_of!(user, u_ssize) - 188usize]; + ["Offset of field: user::start_code"][::std::mem::offset_of!(user, start_code) - 192usize]; + ["Offset of field: user::start_stack"][::std::mem::offset_of!(user, start_stack) - 196usize]; + ["Offset of field: user::signal"][::std::mem::offset_of!(user, signal) - 200usize]; + ["Offset of field: user::reserved"][::std::mem::offset_of!(user, reserved) - 204usize]; + ["Offset of field: user::u_ar0"][::std::mem::offset_of!(user, u_ar0) - 208usize]; + ["Offset of field: user::u_fpstate"][::std::mem::offset_of!(user, u_fpstate) - 212usize]; + ["Offset of field: user::magic"][::std::mem::offset_of!(user, magic) - 216usize]; + ["Offset of field: user::u_comm"][::std::mem::offset_of!(user, u_comm) - 220usize]; + ["Offset of field: user::u_debugreg"][::std::mem::offset_of!(user, u_debugreg) - 252usize]; +}; pub const REG_GS: _bindgen_ty_38 = 0; pub const REG_FS: _bindgen_ty_38 = 1; pub const REG_ES: _bindgen_ty_38 = 2; @@ -13959,41 +8854,15 @@ pub struct _libc_fpreg { pub significand: [::std::os::raw::c_ushort; 4usize], pub exponent: ::std::os::raw::c_ushort, } -#[test] -fn bindgen_test_layout__libc_fpreg() { - const UNINIT: ::std::mem::MaybeUninit<_libc_fpreg> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_libc_fpreg>(), - 10usize, - concat!("Size of: ", stringify!(_libc_fpreg)) - ); - assert_eq!( - ::std::mem::align_of::<_libc_fpreg>(), - 2usize, - concat!("Alignment of ", stringify!(_libc_fpreg)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).significand) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_libc_fpreg), - "::", - stringify!(significand) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).exponent) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_libc_fpreg), - "::", - stringify!(exponent) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of _libc_fpreg"][::std::mem::size_of::<_libc_fpreg>() - 10usize]; + ["Alignment of _libc_fpreg"][::std::mem::align_of::<_libc_fpreg>() - 2usize]; + ["Offset of field: _libc_fpreg::significand"] + [::std::mem::offset_of!(_libc_fpreg, significand) - 0usize]; + ["Offset of field: _libc_fpreg::exponent"] + [::std::mem::offset_of!(_libc_fpreg, exponent) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _libc_fpstate { @@ -14007,111 +8876,25 @@ pub struct _libc_fpstate { pub _st: [_libc_fpreg; 8usize], pub status: ::std::os::raw::c_ulong, } -#[test] -fn bindgen_test_layout__libc_fpstate() { - const UNINIT: ::std::mem::MaybeUninit<_libc_fpstate> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_libc_fpstate>(), - 112usize, - concat!("Size of: ", stringify!(_libc_fpstate)) - ); - assert_eq!( - ::std::mem::align_of::<_libc_fpstate>(), - 4usize, - concat!("Alignment of ", stringify!(_libc_fpstate)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cw) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_libc_fpstate), - "::", - stringify!(cw) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sw) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_libc_fpstate), - "::", - stringify!(sw) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tag) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_libc_fpstate), - "::", - stringify!(tag) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ipoff) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_libc_fpstate), - "::", - stringify!(ipoff) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cssel) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_libc_fpstate), - "::", - stringify!(cssel) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dataoff) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_libc_fpstate), - "::", - stringify!(dataoff) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).datasel) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_libc_fpstate), - "::", - stringify!(datasel) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._st) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_libc_fpstate), - "::", - stringify!(_st) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).status) as usize - ptr as usize }, - 108usize, - concat!( - "Offset of field: ", - stringify!(_libc_fpstate), - "::", - stringify!(status) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of _libc_fpstate"][::std::mem::size_of::<_libc_fpstate>() - 112usize]; + ["Alignment of _libc_fpstate"][::std::mem::align_of::<_libc_fpstate>() - 4usize]; + ["Offset of field: _libc_fpstate::cw"][::std::mem::offset_of!(_libc_fpstate, cw) - 0usize]; + ["Offset of field: _libc_fpstate::sw"][::std::mem::offset_of!(_libc_fpstate, sw) - 4usize]; + ["Offset of field: _libc_fpstate::tag"][::std::mem::offset_of!(_libc_fpstate, tag) - 8usize]; + ["Offset of field: _libc_fpstate::ipoff"] + [::std::mem::offset_of!(_libc_fpstate, ipoff) - 12usize]; + ["Offset of field: _libc_fpstate::cssel"] + [::std::mem::offset_of!(_libc_fpstate, cssel) - 16usize]; + ["Offset of field: _libc_fpstate::dataoff"] + [::std::mem::offset_of!(_libc_fpstate, dataoff) - 20usize]; + ["Offset of field: _libc_fpstate::datasel"] + [::std::mem::offset_of!(_libc_fpstate, datasel) - 24usize]; + ["Offset of field: _libc_fpstate::_st"][::std::mem::offset_of!(_libc_fpstate, _st) - 28usize]; + ["Offset of field: _libc_fpstate::status"] + [::std::mem::offset_of!(_libc_fpstate, status) - 108usize]; +}; pub type fpregset_t = *mut _libc_fpstate; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -14121,61 +8904,15 @@ pub struct mcontext_t { pub oldmask: ::std::os::raw::c_ulong, pub cr2: ::std::os::raw::c_ulong, } -#[test] -fn bindgen_test_layout_mcontext_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 88usize, - concat!("Size of: ", stringify!(mcontext_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(mcontext_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gregs) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(mcontext_t), - "::", - stringify!(gregs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fpregs) as usize - ptr as usize }, - 76usize, - concat!( - "Offset of field: ", - stringify!(mcontext_t), - "::", - stringify!(fpregs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).oldmask) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(mcontext_t), - "::", - stringify!(oldmask) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cr2) as usize - ptr as usize }, - 84usize, - concat!( - "Offset of field: ", - stringify!(mcontext_t), - "::", - stringify!(cr2) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of mcontext_t"][::std::mem::size_of::() - 88usize]; + ["Alignment of mcontext_t"][::std::mem::align_of::() - 4usize]; + ["Offset of field: mcontext_t::gregs"][::std::mem::offset_of!(mcontext_t, gregs) - 0usize]; + ["Offset of field: mcontext_t::fpregs"][::std::mem::offset_of!(mcontext_t, fpregs) - 76usize]; + ["Offset of field: mcontext_t::oldmask"][::std::mem::offset_of!(mcontext_t, oldmask) - 80usize]; + ["Offset of field: mcontext_t::cr2"][::std::mem::offset_of!(mcontext_t, cr2) - 84usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub struct ucontext { @@ -14198,139 +8935,39 @@ pub struct ucontext__bindgen_ty_1__bindgen_ty_1 { pub uc_sigmask: sigset_t, pub __padding_rt_sigset: u32, } -#[test] -fn bindgen_test_layout_ucontext__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!( - "Size of: ", - stringify!(ucontext__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ucontext__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uc_sigmask) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ucontext__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(uc_sigmask) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__padding_rt_sigset) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ucontext__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(__padding_rt_sigset) - ) - ); -} -#[test] -fn bindgen_test_layout_ucontext__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(ucontext__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(ucontext__bindgen_ty_1)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uc_sigmask64) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ucontext__bindgen_ty_1), - "::", - stringify!(uc_sigmask64) - ) - ); -} -#[test] -fn bindgen_test_layout_ucontext() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 228usize, - concat!("Size of: ", stringify!(ucontext)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(ucontext)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uc_flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ucontext), - "::", - stringify!(uc_flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uc_link) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ucontext), - "::", - stringify!(uc_link) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uc_stack) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ucontext), - "::", - stringify!(uc_stack) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uc_mcontext) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(ucontext), - "::", - stringify!(uc_mcontext) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__fpregs_mem) as usize - ptr as usize }, - 116usize, - concat!( - "Offset of field: ", - stringify!(ucontext), - "::", - stringify!(__fpregs_mem) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ucontext__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::size_of::() - 8usize]; + ["Alignment of ucontext__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ucontext__bindgen_ty_1__bindgen_ty_1::uc_sigmask"] + [::std::mem::offset_of!(ucontext__bindgen_ty_1__bindgen_ty_1, uc_sigmask) - 0usize]; + ["Offset of field: ucontext__bindgen_ty_1__bindgen_ty_1::__padding_rt_sigset"][::std::mem::offset_of!( + ucontext__bindgen_ty_1__bindgen_ty_1, + __padding_rt_sigset + ) - 4usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ucontext__bindgen_ty_1"][::std::mem::size_of::() - 8usize]; + ["Alignment of ucontext__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ucontext__bindgen_ty_1::uc_sigmask64"] + [::std::mem::offset_of!(ucontext__bindgen_ty_1, uc_sigmask64) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ucontext"][::std::mem::size_of::() - 228usize]; + ["Alignment of ucontext"][::std::mem::align_of::() - 4usize]; + ["Offset of field: ucontext::uc_flags"][::std::mem::offset_of!(ucontext, uc_flags) - 0usize]; + ["Offset of field: ucontext::uc_link"][::std::mem::offset_of!(ucontext, uc_link) - 4usize]; + ["Offset of field: ucontext::uc_stack"][::std::mem::offset_of!(ucontext, uc_stack) - 8usize]; + ["Offset of field: ucontext::uc_mcontext"] + [::std::mem::offset_of!(ucontext, uc_mcontext) - 20usize]; + ["Offset of field: ucontext::__fpregs_mem"] + [::std::mem::offset_of!(ucontext, __fpregs_mem) - 116usize]; +}; pub type ucontext_t = ucontext; extern "C" { pub fn __libc_current_sigrtmin() -> ::std::os::raw::c_int; @@ -14553,31 +9190,12 @@ pub type fd_mask = ::std::os::raw::c_ulong; pub struct fd_set { pub fds_bits: [fd_mask; 32usize], } -#[test] -fn bindgen_test_layout_fd_set() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 128usize, - concat!("Size of: ", stringify!(fd_set)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(fd_set)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fds_bits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(fd_set), - "::", - stringify!(fds_bits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of fd_set"][::std::mem::size_of::() - 128usize]; + ["Alignment of fd_set"][::std::mem::align_of::() - 4usize]; + ["Offset of field: fd_set::fds_bits"][::std::mem::offset_of!(fd_set, fds_bits) - 0usize]; +}; extern "C" { pub fn __FD_CLR_chk(arg1: ::std::os::raw::c_int, arg2: *mut fd_set, arg3: usize); } @@ -15901,58 +10519,19 @@ pub struct ASensorVector__bindgen_ty_1__bindgen_ty_1 { pub y: f32, pub z: f32, } -#[test] -fn bindgen_test_layout_ASensorVector__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!( - "Size of: ", - stringify!(ASensorVector__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ASensorVector__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorVector__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(x) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ASensorVector__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(y) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).z) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ASensorVector__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(z) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASensorVector__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of ASensorVector__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ASensorVector__bindgen_ty_1__bindgen_ty_1::x"] + [::std::mem::offset_of!(ASensorVector__bindgen_ty_1__bindgen_ty_1, x) - 0usize]; + ["Offset of field: ASensorVector__bindgen_ty_1__bindgen_ty_1::y"] + [::std::mem::offset_of!(ASensorVector__bindgen_ty_1__bindgen_ty_1, y) - 4usize]; + ["Offset of field: ASensorVector__bindgen_ty_1__bindgen_ty_1::z"] + [::std::mem::offset_of!(ASensorVector__bindgen_ty_1__bindgen_ty_1, z) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ASensorVector__bindgen_ty_1__bindgen_ty_2 { @@ -15960,160 +10539,52 @@ pub struct ASensorVector__bindgen_ty_1__bindgen_ty_2 { pub pitch: f32, pub roll: f32, } -#[test] -fn bindgen_test_layout_ASensorVector__bindgen_ty_1__bindgen_ty_2() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!( - "Size of: ", - stringify!(ASensorVector__bindgen_ty_1__bindgen_ty_2) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ASensorVector__bindgen_ty_1__bindgen_ty_2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).azimuth) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorVector__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(azimuth) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pitch) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ASensorVector__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(pitch) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).roll) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ASensorVector__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(roll) - ) - ); -} -#[test] -fn bindgen_test_layout_ASensorVector__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(ASensorVector__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(ASensorVector__bindgen_ty_1)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).v) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorVector__bindgen_ty_1), - "::", - stringify!(v) - ) - ); -} -#[test] -fn bindgen_test_layout_ASensorVector() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(ASensorVector)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(ASensorVector)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).status) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(ASensorVector), - "::", - stringify!(status) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, - 13usize, - concat!( - "Offset of field: ", - stringify!(ASensorVector), - "::", - stringify!(reserved) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASensorVector__bindgen_ty_1__bindgen_ty_2"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of ASensorVector__bindgen_ty_1__bindgen_ty_2"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ASensorVector__bindgen_ty_1__bindgen_ty_2::azimuth"] + [::std::mem::offset_of!(ASensorVector__bindgen_ty_1__bindgen_ty_2, azimuth) - 0usize]; + ["Offset of field: ASensorVector__bindgen_ty_1__bindgen_ty_2::pitch"] + [::std::mem::offset_of!(ASensorVector__bindgen_ty_1__bindgen_ty_2, pitch) - 4usize]; + ["Offset of field: ASensorVector__bindgen_ty_1__bindgen_ty_2::roll"] + [::std::mem::offset_of!(ASensorVector__bindgen_ty_1__bindgen_ty_2, roll) - 8usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASensorVector__bindgen_ty_1"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of ASensorVector__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ASensorVector__bindgen_ty_1::v"] + [::std::mem::offset_of!(ASensorVector__bindgen_ty_1, v) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASensorVector"][::std::mem::size_of::() - 16usize]; + ["Alignment of ASensorVector"][::std::mem::align_of::() - 4usize]; + ["Offset of field: ASensorVector::status"] + [::std::mem::offset_of!(ASensorVector, status) - 12usize]; + ["Offset of field: ASensorVector::reserved"] + [::std::mem::offset_of!(ASensorVector, reserved) - 13usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct AMetaDataEvent { pub what: i32, pub sensor: i32, } -#[test] -fn bindgen_test_layout_AMetaDataEvent() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(AMetaDataEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AMetaDataEvent)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).what) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AMetaDataEvent), - "::", - stringify!(what) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sensor) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AMetaDataEvent), - "::", - stringify!(sensor) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AMetaDataEvent"][::std::mem::size_of::() - 8usize]; + ["Alignment of AMetaDataEvent"][::std::mem::align_of::() - 4usize]; + ["Offset of field: AMetaDataEvent::what"] + [::std::mem::offset_of!(AMetaDataEvent, what) - 0usize]; + ["Offset of field: AMetaDataEvent::sensor"] + [::std::mem::offset_of!(AMetaDataEvent, sensor) - 4usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub struct AUncalibratedEvent { @@ -16133,87 +10604,34 @@ pub struct AUncalibratedEvent__bindgen_ty_1__bindgen_ty_1 { pub y_uncalib: f32, pub z_uncalib: f32, } -#[test] -fn bindgen_test_layout_AUncalibratedEvent__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!( - "Size of: ", - stringify!(AUncalibratedEvent__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(AUncalibratedEvent__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).x_uncalib) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AUncalibratedEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(x_uncalib) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).y_uncalib) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AUncalibratedEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(y_uncalib) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).z_uncalib) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AUncalibratedEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(z_uncalib) - ) - ); -} -#[test] -fn bindgen_test_layout_AUncalibratedEvent__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(AUncalibratedEvent__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(AUncalibratedEvent__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uncalib) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AUncalibratedEvent__bindgen_ty_1), - "::", - stringify!(uncalib) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AUncalibratedEvent__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of AUncalibratedEvent__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: AUncalibratedEvent__bindgen_ty_1__bindgen_ty_1::x_uncalib"][::std::mem::offset_of!( + AUncalibratedEvent__bindgen_ty_1__bindgen_ty_1, + x_uncalib + ) - 0usize]; + ["Offset of field: AUncalibratedEvent__bindgen_ty_1__bindgen_ty_1::y_uncalib"][::std::mem::offset_of!( + AUncalibratedEvent__bindgen_ty_1__bindgen_ty_1, + y_uncalib + ) - 4usize]; + ["Offset of field: AUncalibratedEvent__bindgen_ty_1__bindgen_ty_1::z_uncalib"][::std::mem::offset_of!( + AUncalibratedEvent__bindgen_ty_1__bindgen_ty_1, + z_uncalib + ) - 8usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AUncalibratedEvent__bindgen_ty_1"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of AUncalibratedEvent__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: AUncalibratedEvent__bindgen_ty_1::uncalib"] + [::std::mem::offset_of!(AUncalibratedEvent__bindgen_ty_1, uncalib) - 0usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub union AUncalibratedEvent__bindgen_ty_2 { @@ -16227,182 +10645,63 @@ pub struct AUncalibratedEvent__bindgen_ty_2__bindgen_ty_1 { pub y_bias: f32, pub z_bias: f32, } -#[test] -fn bindgen_test_layout_AUncalibratedEvent__bindgen_ty_2__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!( - "Size of: ", - stringify!(AUncalibratedEvent__bindgen_ty_2__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(AUncalibratedEvent__bindgen_ty_2__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).x_bias) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AUncalibratedEvent__bindgen_ty_2__bindgen_ty_1), - "::", - stringify!(x_bias) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).y_bias) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AUncalibratedEvent__bindgen_ty_2__bindgen_ty_1), - "::", - stringify!(y_bias) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).z_bias) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AUncalibratedEvent__bindgen_ty_2__bindgen_ty_1), - "::", - stringify!(z_bias) - ) - ); -} -#[test] -fn bindgen_test_layout_AUncalibratedEvent__bindgen_ty_2() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(AUncalibratedEvent__bindgen_ty_2)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(AUncalibratedEvent__bindgen_ty_2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bias) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AUncalibratedEvent__bindgen_ty_2), - "::", - stringify!(bias) - ) - ); -} -#[test] -fn bindgen_test_layout_AUncalibratedEvent() { - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(AUncalibratedEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AUncalibratedEvent)) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AUncalibratedEvent__bindgen_ty_2__bindgen_ty_1"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of AUncalibratedEvent__bindgen_ty_2__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: AUncalibratedEvent__bindgen_ty_2__bindgen_ty_1::x_bias"] + [::std::mem::offset_of!(AUncalibratedEvent__bindgen_ty_2__bindgen_ty_1, x_bias) - 0usize]; + ["Offset of field: AUncalibratedEvent__bindgen_ty_2__bindgen_ty_1::y_bias"] + [::std::mem::offset_of!(AUncalibratedEvent__bindgen_ty_2__bindgen_ty_1, y_bias) - 4usize]; + ["Offset of field: AUncalibratedEvent__bindgen_ty_2__bindgen_ty_1::z_bias"] + [::std::mem::offset_of!(AUncalibratedEvent__bindgen_ty_2__bindgen_ty_1, z_bias) - 8usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AUncalibratedEvent__bindgen_ty_2"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of AUncalibratedEvent__bindgen_ty_2"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: AUncalibratedEvent__bindgen_ty_2::bias"] + [::std::mem::offset_of!(AUncalibratedEvent__bindgen_ty_2, bias) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AUncalibratedEvent"][::std::mem::size_of::() - 24usize]; + ["Alignment of AUncalibratedEvent"][::std::mem::align_of::() - 4usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct AHeartRateEvent { pub bpm: f32, pub status: i8, } -#[test] -fn bindgen_test_layout_AHeartRateEvent() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(AHeartRateEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AHeartRateEvent)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bpm) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AHeartRateEvent), - "::", - stringify!(bpm) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).status) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AHeartRateEvent), - "::", - stringify!(status) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AHeartRateEvent"][::std::mem::size_of::() - 8usize]; + ["Alignment of AHeartRateEvent"][::std::mem::align_of::() - 4usize]; + ["Offset of field: AHeartRateEvent::bpm"] + [::std::mem::offset_of!(AHeartRateEvent, bpm) - 0usize]; + ["Offset of field: AHeartRateEvent::status"] + [::std::mem::offset_of!(AHeartRateEvent, status) - 4usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ADynamicSensorEvent { pub connected: i32, pub handle: i32, } -#[test] -fn bindgen_test_layout_ADynamicSensorEvent() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(ADynamicSensorEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(ADynamicSensorEvent)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).connected) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ADynamicSensorEvent), - "::", - stringify!(connected) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).handle) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ADynamicSensorEvent), - "::", - stringify!(handle) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ADynamicSensorEvent"][::std::mem::size_of::() - 8usize]; + ["Alignment of ADynamicSensorEvent"][::std::mem::align_of::() - 4usize]; + ["Offset of field: ADynamicSensorEvent::connected"] + [::std::mem::offset_of!(ADynamicSensorEvent, connected) - 0usize]; + ["Offset of field: ADynamicSensorEvent::handle"] + [::std::mem::offset_of!(ADynamicSensorEvent, handle) - 4usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub struct AAdditionalInfoEvent { @@ -16416,80 +10715,26 @@ pub union AAdditionalInfoEvent__bindgen_ty_1 { pub data_int32: [i32; 14usize], pub data_float: [f32; 14usize], } -#[test] -fn bindgen_test_layout_AAdditionalInfoEvent__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(AAdditionalInfoEvent__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(AAdditionalInfoEvent__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data_int32) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AAdditionalInfoEvent__bindgen_ty_1), - "::", - stringify!(data_int32) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data_float) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AAdditionalInfoEvent__bindgen_ty_1), - "::", - stringify!(data_float) - ) - ); -} -#[test] -fn bindgen_test_layout_AAdditionalInfoEvent() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(AAdditionalInfoEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AAdditionalInfoEvent)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AAdditionalInfoEvent), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).serial) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AAdditionalInfoEvent), - "::", - stringify!(serial) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AAdditionalInfoEvent__bindgen_ty_1"] + [::std::mem::size_of::() - 56usize]; + ["Alignment of AAdditionalInfoEvent__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: AAdditionalInfoEvent__bindgen_ty_1::data_int32"] + [::std::mem::offset_of!(AAdditionalInfoEvent__bindgen_ty_1, data_int32) - 0usize]; + ["Offset of field: AAdditionalInfoEvent__bindgen_ty_1::data_float"] + [::std::mem::offset_of!(AAdditionalInfoEvent__bindgen_ty_1, data_float) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AAdditionalInfoEvent"][::std::mem::size_of::() - 64usize]; + ["Alignment of AAdditionalInfoEvent"][::std::mem::align_of::() - 4usize]; + ["Offset of field: AAdditionalInfoEvent::type_"] + [::std::mem::offset_of!(AAdditionalInfoEvent, type_) - 0usize]; + ["Offset of field: AAdditionalInfoEvent::serial"] + [::std::mem::offset_of!(AAdditionalInfoEvent, serial) - 4usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct AHeadTrackerEvent { @@ -16501,91 +10746,25 @@ pub struct AHeadTrackerEvent { pub vz: f32, pub discontinuity_count: i32, } -#[test] -fn bindgen_test_layout_AHeadTrackerEvent() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 28usize, - concat!("Size of: ", stringify!(AHeadTrackerEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AHeadTrackerEvent)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rx) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AHeadTrackerEvent), - "::", - stringify!(rx) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ry) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AHeadTrackerEvent), - "::", - stringify!(ry) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rz) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AHeadTrackerEvent), - "::", - stringify!(rz) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).vx) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(AHeadTrackerEvent), - "::", - stringify!(vx) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).vy) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AHeadTrackerEvent), - "::", - stringify!(vy) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).vz) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(AHeadTrackerEvent), - "::", - stringify!(vz) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).discontinuity_count) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(AHeadTrackerEvent), - "::", - stringify!(discontinuity_count) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AHeadTrackerEvent"][::std::mem::size_of::() - 28usize]; + ["Alignment of AHeadTrackerEvent"][::std::mem::align_of::() - 4usize]; + ["Offset of field: AHeadTrackerEvent::rx"] + [::std::mem::offset_of!(AHeadTrackerEvent, rx) - 0usize]; + ["Offset of field: AHeadTrackerEvent::ry"] + [::std::mem::offset_of!(AHeadTrackerEvent, ry) - 4usize]; + ["Offset of field: AHeadTrackerEvent::rz"] + [::std::mem::offset_of!(AHeadTrackerEvent, rz) - 8usize]; + ["Offset of field: AHeadTrackerEvent::vx"] + [::std::mem::offset_of!(AHeadTrackerEvent, vx) - 12usize]; + ["Offset of field: AHeadTrackerEvent::vy"] + [::std::mem::offset_of!(AHeadTrackerEvent, vy) - 16usize]; + ["Offset of field: AHeadTrackerEvent::vz"] + [::std::mem::offset_of!(AHeadTrackerEvent, vz) - 20usize]; + ["Offset of field: AHeadTrackerEvent::discontinuity_count"] + [::std::mem::offset_of!(AHeadTrackerEvent, discontinuity_count) - 24usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub struct ALimitedAxesImuEvent { @@ -16605,87 +10784,28 @@ pub struct ALimitedAxesImuEvent__bindgen_ty_1__bindgen_ty_1 { pub y: f32, pub z: f32, } -#[test] -fn bindgen_test_layout_ALimitedAxesImuEvent__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!( - "Size of: ", - stringify!(ALimitedAxesImuEvent__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ALimitedAxesImuEvent__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(x) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(y) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).z) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(z) - ) - ); -} -#[test] -fn bindgen_test_layout_ALimitedAxesImuEvent__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(ALimitedAxesImuEvent__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ALimitedAxesImuEvent__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).calib) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuEvent__bindgen_ty_1), - "::", - stringify!(calib) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ALimitedAxesImuEvent__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of ALimitedAxesImuEvent__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ALimitedAxesImuEvent__bindgen_ty_1__bindgen_ty_1::x"] + [::std::mem::offset_of!(ALimitedAxesImuEvent__bindgen_ty_1__bindgen_ty_1, x) - 0usize]; + ["Offset of field: ALimitedAxesImuEvent__bindgen_ty_1__bindgen_ty_1::y"] + [::std::mem::offset_of!(ALimitedAxesImuEvent__bindgen_ty_1__bindgen_ty_1, y) - 4usize]; + ["Offset of field: ALimitedAxesImuEvent__bindgen_ty_1__bindgen_ty_1::z"] + [::std::mem::offset_of!(ALimitedAxesImuEvent__bindgen_ty_1__bindgen_ty_1, z) - 8usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ALimitedAxesImuEvent__bindgen_ty_1"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of ALimitedAxesImuEvent__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ALimitedAxesImuEvent__bindgen_ty_1::calib"] + [::std::mem::offset_of!(ALimitedAxesImuEvent__bindgen_ty_1, calib) - 0usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub union ALimitedAxesImuEvent__bindgen_ty_2 { @@ -16699,100 +10819,39 @@ pub struct ALimitedAxesImuEvent__bindgen_ty_2__bindgen_ty_1 { pub y_supported: f32, pub z_supported: f32, } -#[test] -fn bindgen_test_layout_ALimitedAxesImuEvent__bindgen_ty_2__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!( - "Size of: ", - stringify!(ALimitedAxesImuEvent__bindgen_ty_2__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ALimitedAxesImuEvent__bindgen_ty_2__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).x_supported) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuEvent__bindgen_ty_2__bindgen_ty_1), - "::", - stringify!(x_supported) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).y_supported) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuEvent__bindgen_ty_2__bindgen_ty_1), - "::", - stringify!(y_supported) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).z_supported) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuEvent__bindgen_ty_2__bindgen_ty_1), - "::", - stringify!(z_supported) - ) - ); -} -#[test] -fn bindgen_test_layout_ALimitedAxesImuEvent__bindgen_ty_2() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(ALimitedAxesImuEvent__bindgen_ty_2)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ALimitedAxesImuEvent__bindgen_ty_2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).supported) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuEvent__bindgen_ty_2), - "::", - stringify!(supported) - ) - ); -} -#[test] -fn bindgen_test_layout_ALimitedAxesImuEvent() { - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(ALimitedAxesImuEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(ALimitedAxesImuEvent)) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ALimitedAxesImuEvent__bindgen_ty_2__bindgen_ty_1"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of ALimitedAxesImuEvent__bindgen_ty_2__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ALimitedAxesImuEvent__bindgen_ty_2__bindgen_ty_1::x_supported"][::std::mem::offset_of!( + ALimitedAxesImuEvent__bindgen_ty_2__bindgen_ty_1, + x_supported + ) - 0usize]; + ["Offset of field: ALimitedAxesImuEvent__bindgen_ty_2__bindgen_ty_1::y_supported"][::std::mem::offset_of!( + ALimitedAxesImuEvent__bindgen_ty_2__bindgen_ty_1, + y_supported + ) - 4usize]; + ["Offset of field: ALimitedAxesImuEvent__bindgen_ty_2__bindgen_ty_1::z_supported"][::std::mem::offset_of!( + ALimitedAxesImuEvent__bindgen_ty_2__bindgen_ty_1, + z_supported + ) - 8usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ALimitedAxesImuEvent__bindgen_ty_2"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of ALimitedAxesImuEvent__bindgen_ty_2"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ALimitedAxesImuEvent__bindgen_ty_2::supported"] + [::std::mem::offset_of!(ALimitedAxesImuEvent__bindgen_ty_2, supported) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ALimitedAxesImuEvent"][::std::mem::size_of::() - 24usize]; + ["Alignment of ALimitedAxesImuEvent"][::std::mem::align_of::() - 4usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub struct ALimitedAxesImuUncalibratedEvent { @@ -16813,91 +10872,39 @@ pub struct ALimitedAxesImuUncalibratedEvent__bindgen_ty_1__bindgen_ty_1 { pub y_uncalib: f32, pub z_uncalib: f32, } -#[test] -fn bindgen_test_layout_ALimitedAxesImuUncalibratedEvent__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit< +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ALimitedAxesImuUncalibratedEvent__bindgen_ty_1__bindgen_ty_1"][::std::mem::size_of::< ALimitedAxesImuUncalibratedEvent__bindgen_ty_1__bindgen_ty_1, - > = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!( - "Size of: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).x_uncalib) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(x_uncalib) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).y_uncalib) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(y_uncalib) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).z_uncalib) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(z_uncalib) - ) - ); -} -#[test] -fn bindgen_test_layout_ALimitedAxesImuUncalibratedEvent__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!( - "Size of: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uncalib) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_1), - "::", - stringify!(uncalib) - ) - ); -} + >() - 12usize]; + ["Alignment of ALimitedAxesImuUncalibratedEvent__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::align_of::() + - 4usize]; + ["Offset of field: ALimitedAxesImuUncalibratedEvent__bindgen_ty_1__bindgen_ty_1::x_uncalib"][::std::mem::offset_of!( + ALimitedAxesImuUncalibratedEvent__bindgen_ty_1__bindgen_ty_1, + x_uncalib + ) + - 0usize]; + ["Offset of field: ALimitedAxesImuUncalibratedEvent__bindgen_ty_1__bindgen_ty_1::y_uncalib"][::std::mem::offset_of!( + ALimitedAxesImuUncalibratedEvent__bindgen_ty_1__bindgen_ty_1, + y_uncalib + ) + - 4usize]; + ["Offset of field: ALimitedAxesImuUncalibratedEvent__bindgen_ty_1__bindgen_ty_1::z_uncalib"][::std::mem::offset_of!( + ALimitedAxesImuUncalibratedEvent__bindgen_ty_1__bindgen_ty_1, + z_uncalib + ) + - 8usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ALimitedAxesImuUncalibratedEvent__bindgen_ty_1"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of ALimitedAxesImuUncalibratedEvent__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ALimitedAxesImuUncalibratedEvent__bindgen_ty_1::uncalib"] + [::std::mem::offset_of!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_1, uncalib) - 0usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub union ALimitedAxesImuUncalibratedEvent__bindgen_ty_2 { @@ -16911,91 +10918,39 @@ pub struct ALimitedAxesImuUncalibratedEvent__bindgen_ty_2__bindgen_ty_1 { pub y_bias: f32, pub z_bias: f32, } -#[test] -fn bindgen_test_layout_ALimitedAxesImuUncalibratedEvent__bindgen_ty_2__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit< +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ALimitedAxesImuUncalibratedEvent__bindgen_ty_2__bindgen_ty_1"][::std::mem::size_of::< ALimitedAxesImuUncalibratedEvent__bindgen_ty_2__bindgen_ty_1, - > = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!( - "Size of: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_2__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_2__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).x_bias) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_2__bindgen_ty_1), - "::", - stringify!(x_bias) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).y_bias) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_2__bindgen_ty_1), - "::", - stringify!(y_bias) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).z_bias) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_2__bindgen_ty_1), - "::", - stringify!(z_bias) - ) - ); -} -#[test] -fn bindgen_test_layout_ALimitedAxesImuUncalibratedEvent__bindgen_ty_2() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!( - "Size of: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_2) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bias) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_2), - "::", - stringify!(bias) - ) - ); -} + >() - 12usize]; + ["Alignment of ALimitedAxesImuUncalibratedEvent__bindgen_ty_2__bindgen_ty_1"] + [::std::mem::align_of::() + - 4usize]; + ["Offset of field: ALimitedAxesImuUncalibratedEvent__bindgen_ty_2__bindgen_ty_1::x_bias"][::std::mem::offset_of!( + ALimitedAxesImuUncalibratedEvent__bindgen_ty_2__bindgen_ty_1, + x_bias + ) + - 0usize]; + ["Offset of field: ALimitedAxesImuUncalibratedEvent__bindgen_ty_2__bindgen_ty_1::y_bias"][::std::mem::offset_of!( + ALimitedAxesImuUncalibratedEvent__bindgen_ty_2__bindgen_ty_1, + y_bias + ) + - 4usize]; + ["Offset of field: ALimitedAxesImuUncalibratedEvent__bindgen_ty_2__bindgen_ty_1::z_bias"][::std::mem::offset_of!( + ALimitedAxesImuUncalibratedEvent__bindgen_ty_2__bindgen_ty_1, + z_bias + ) + - 8usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ALimitedAxesImuUncalibratedEvent__bindgen_ty_2"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of ALimitedAxesImuUncalibratedEvent__bindgen_ty_2"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ALimitedAxesImuUncalibratedEvent__bindgen_ty_2::bias"] + [::std::mem::offset_of!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_2, bias) - 0usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub union ALimitedAxesImuUncalibratedEvent__bindgen_ty_3 { @@ -17009,148 +10964,51 @@ pub struct ALimitedAxesImuUncalibratedEvent__bindgen_ty_3__bindgen_ty_1 { pub y_supported: f32, pub z_supported: f32, } -#[test] -fn bindgen_test_layout_ALimitedAxesImuUncalibratedEvent__bindgen_ty_3__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit< +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ALimitedAxesImuUncalibratedEvent__bindgen_ty_3__bindgen_ty_1"][::std::mem::size_of::< ALimitedAxesImuUncalibratedEvent__bindgen_ty_3__bindgen_ty_1, - > = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!( - "Size of: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_3__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_3__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).x_supported) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_3__bindgen_ty_1), - "::", - stringify!(x_supported) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).y_supported) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_3__bindgen_ty_1), - "::", - stringify!(y_supported) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).z_supported) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_3__bindgen_ty_1), - "::", - stringify!(z_supported) - ) - ); -} -#[test] -fn bindgen_test_layout_ALimitedAxesImuUncalibratedEvent__bindgen_ty_3() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!( - "Size of: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_3) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_3) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).supported) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_3), - "::", - stringify!(supported) - ) - ); -} -#[test] -fn bindgen_test_layout_ALimitedAxesImuUncalibratedEvent() { - assert_eq!( - ::std::mem::size_of::(), - 36usize, - concat!("Size of: ", stringify!(ALimitedAxesImuUncalibratedEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ALimitedAxesImuUncalibratedEvent) - ) - ); -} + >() - 12usize]; + ["Alignment of ALimitedAxesImuUncalibratedEvent__bindgen_ty_3__bindgen_ty_1"] + [::std::mem::align_of::() + - 4usize]; + ["Offset of field: ALimitedAxesImuUncalibratedEvent__bindgen_ty_3__bindgen_ty_1::x_supported"] [:: std :: mem :: offset_of ! (ALimitedAxesImuUncalibratedEvent__bindgen_ty_3__bindgen_ty_1 , x_supported) - 0usize] ; + ["Offset of field: ALimitedAxesImuUncalibratedEvent__bindgen_ty_3__bindgen_ty_1::y_supported"] [:: std :: mem :: offset_of ! (ALimitedAxesImuUncalibratedEvent__bindgen_ty_3__bindgen_ty_1 , y_supported) - 4usize] ; + ["Offset of field: ALimitedAxesImuUncalibratedEvent__bindgen_ty_3__bindgen_ty_1::z_supported"] [:: std :: mem :: offset_of ! (ALimitedAxesImuUncalibratedEvent__bindgen_ty_3__bindgen_ty_1 , z_supported) - 8usize] ; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ALimitedAxesImuUncalibratedEvent__bindgen_ty_3"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of ALimitedAxesImuUncalibratedEvent__bindgen_ty_3"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ALimitedAxesImuUncalibratedEvent__bindgen_ty_3::supported"][::std::mem::offset_of!( + ALimitedAxesImuUncalibratedEvent__bindgen_ty_3, + supported + ) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ALimitedAxesImuUncalibratedEvent"] + [::std::mem::size_of::() - 36usize]; + ["Alignment of ALimitedAxesImuUncalibratedEvent"] + [::std::mem::align_of::() - 4usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct AHeadingEvent { pub heading: f32, pub accuracy: f32, } -#[test] -fn bindgen_test_layout_AHeadingEvent() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(AHeadingEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AHeadingEvent)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).heading) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AHeadingEvent), - "::", - stringify!(heading) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).accuracy) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AHeadingEvent), - "::", - stringify!(accuracy) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AHeadingEvent"][::std::mem::size_of::() - 8usize]; + ["Alignment of AHeadingEvent"][::std::mem::align_of::() - 4usize]; + ["Offset of field: AHeadingEvent::heading"] + [::std::mem::offset_of!(AHeadingEvent, heading) - 0usize]; + ["Offset of field: AHeadingEvent::accuracy"] + [::std::mem::offset_of!(AHeadingEvent, accuracy) - 4usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub struct ASensorEvent { @@ -17188,405 +11046,123 @@ pub union ASensorEvent__bindgen_ty_1__bindgen_ty_1 { pub meta_data: AMetaDataEvent, pub heart_rate: AHeartRateEvent, pub dynamic_sensor_meta: ADynamicSensorEvent, - pub additional_info: AAdditionalInfoEvent, - pub head_tracker: AHeadTrackerEvent, - pub limited_axes_imu: ALimitedAxesImuEvent, - pub limited_axes_imu_uncalibrated: ALimitedAxesImuUncalibratedEvent, - pub heading: AHeadingEvent, -} -#[test] -fn bindgen_test_layout_ASensorEvent__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!( - "Size of: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).vector) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(vector) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).acceleration) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(acceleration) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gyro) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(gyro) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).magnetic) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(magnetic) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).temperature) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(temperature) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).distance) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(distance) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).light) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(light) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pressure) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(pressure) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).relative_humidity) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(relative_humidity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uncalibrated_acceleration) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(uncalibrated_acceleration) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uncalibrated_gyro) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(uncalibrated_gyro) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uncalibrated_magnetic) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(uncalibrated_magnetic) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).meta_data) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(meta_data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).heart_rate) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(heart_rate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dynamic_sensor_meta) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(dynamic_sensor_meta) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).additional_info) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(additional_info) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).head_tracker) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(head_tracker) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).limited_axes_imu) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(limited_axes_imu) - ) - ); - assert_eq!( - unsafe { - ::std::ptr::addr_of!((*ptr).limited_axes_imu_uncalibrated) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(limited_axes_imu_uncalibrated) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).heading) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(heading) - ) - ); + pub additional_info: AAdditionalInfoEvent, + pub head_tracker: AHeadTrackerEvent, + pub limited_axes_imu: ALimitedAxesImuEvent, + pub limited_axes_imu_uncalibrated: ALimitedAxesImuUncalibratedEvent, + pub heading: AHeadingEvent, } +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASensorEvent__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::size_of::() - 64usize]; + ["Alignment of ASensorEvent__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::data"] + [::std::mem::offset_of!(ASensorEvent__bindgen_ty_1__bindgen_ty_1, data) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::vector"] + [::std::mem::offset_of!(ASensorEvent__bindgen_ty_1__bindgen_ty_1, vector) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::acceleration"] + [::std::mem::offset_of!(ASensorEvent__bindgen_ty_1__bindgen_ty_1, acceleration) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::gyro"] + [::std::mem::offset_of!(ASensorEvent__bindgen_ty_1__bindgen_ty_1, gyro) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::magnetic"] + [::std::mem::offset_of!(ASensorEvent__bindgen_ty_1__bindgen_ty_1, magnetic) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::temperature"] + [::std::mem::offset_of!(ASensorEvent__bindgen_ty_1__bindgen_ty_1, temperature) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::distance"] + [::std::mem::offset_of!(ASensorEvent__bindgen_ty_1__bindgen_ty_1, distance) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::light"] + [::std::mem::offset_of!(ASensorEvent__bindgen_ty_1__bindgen_ty_1, light) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::pressure"] + [::std::mem::offset_of!(ASensorEvent__bindgen_ty_1__bindgen_ty_1, pressure) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::relative_humidity"][::std::mem::offset_of!( + ASensorEvent__bindgen_ty_1__bindgen_ty_1, + relative_humidity + ) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::uncalibrated_acceleration"][::std::mem::offset_of!( + ASensorEvent__bindgen_ty_1__bindgen_ty_1, + uncalibrated_acceleration + ) + - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::uncalibrated_gyro"][::std::mem::offset_of!( + ASensorEvent__bindgen_ty_1__bindgen_ty_1, + uncalibrated_gyro + ) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::uncalibrated_magnetic"][::std::mem::offset_of!( + ASensorEvent__bindgen_ty_1__bindgen_ty_1, + uncalibrated_magnetic + ) + - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::meta_data"] + [::std::mem::offset_of!(ASensorEvent__bindgen_ty_1__bindgen_ty_1, meta_data) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::heart_rate"] + [::std::mem::offset_of!(ASensorEvent__bindgen_ty_1__bindgen_ty_1, heart_rate) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::dynamic_sensor_meta"][::std::mem::offset_of!( + ASensorEvent__bindgen_ty_1__bindgen_ty_1, + dynamic_sensor_meta + ) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::additional_info"][::std::mem::offset_of!( + ASensorEvent__bindgen_ty_1__bindgen_ty_1, + additional_info + ) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::head_tracker"] + [::std::mem::offset_of!(ASensorEvent__bindgen_ty_1__bindgen_ty_1, head_tracker) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::limited_axes_imu"][::std::mem::offset_of!( + ASensorEvent__bindgen_ty_1__bindgen_ty_1, + limited_axes_imu + ) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::limited_axes_imu_uncalibrated"][::std::mem::offset_of!( + ASensorEvent__bindgen_ty_1__bindgen_ty_1, + limited_axes_imu_uncalibrated + ) + - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::heading"] + [::std::mem::offset_of!(ASensorEvent__bindgen_ty_1__bindgen_ty_1, heading) - 0usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub union ASensorEvent__bindgen_ty_1__bindgen_ty_2 { pub data: [u64; 8usize], pub step_counter: u64, } -#[test] -fn bindgen_test_layout_ASensorEvent__bindgen_ty_1__bindgen_ty_2() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!( - "Size of: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_2) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).step_counter) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(step_counter) - ) - ); -} -#[test] -fn bindgen_test_layout_ASensorEvent__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(ASensorEvent__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(ASensorEvent__bindgen_ty_1)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).u64_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1), - "::", - stringify!(u64_) - ) - ); -} -#[test] -fn bindgen_test_layout_ASensorEvent() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 104usize, - concat!("Size of: ", stringify!(ASensorEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(ASensorEvent)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent), - "::", - stringify!(version) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sensor) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent), - "::", - stringify!(sensor) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved0) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent), - "::", - stringify!(reserved0) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).timestamp) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent), - "::", - stringify!(timestamp) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved1) as usize - ptr as usize }, - 92usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent), - "::", - stringify!(reserved1) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASensorEvent__bindgen_ty_1__bindgen_ty_2"] + [::std::mem::size_of::() - 64usize]; + ["Alignment of ASensorEvent__bindgen_ty_1__bindgen_ty_2"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_2::data"] + [::std::mem::offset_of!(ASensorEvent__bindgen_ty_1__bindgen_ty_2, data) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_2::step_counter"] + [::std::mem::offset_of!(ASensorEvent__bindgen_ty_1__bindgen_ty_2, step_counter) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASensorEvent__bindgen_ty_1"] + [::std::mem::size_of::() - 64usize]; + ["Alignment of ASensorEvent__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1::u64_"] + [::std::mem::offset_of!(ASensorEvent__bindgen_ty_1, u64_) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASensorEvent"][::std::mem::size_of::() - 104usize]; + ["Alignment of ASensorEvent"][::std::mem::align_of::() - 4usize]; + ["Offset of field: ASensorEvent::version"] + [::std::mem::offset_of!(ASensorEvent, version) - 0usize]; + ["Offset of field: ASensorEvent::sensor"] + [::std::mem::offset_of!(ASensorEvent, sensor) - 4usize]; + ["Offset of field: ASensorEvent::type_"][::std::mem::offset_of!(ASensorEvent, type_) - 8usize]; + ["Offset of field: ASensorEvent::reserved0"] + [::std::mem::offset_of!(ASensorEvent, reserved0) - 12usize]; + ["Offset of field: ASensorEvent::timestamp"] + [::std::mem::offset_of!(ASensorEvent, timestamp) - 16usize]; + ["Offset of field: ASensorEvent::flags"][::std::mem::offset_of!(ASensorEvent, flags) - 88usize]; + ["Offset of field: ASensorEvent::reserved1"] + [::std::mem::offset_of!(ASensorEvent, reserved1) - 92usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ASensorManager { @@ -18195,71 +11771,21 @@ pub struct sync_merge_data { pub flags: __u32, pub pad: __u32, } -#[test] -fn bindgen_test_layout_sync_merge_data() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(sync_merge_data)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(sync_merge_data)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sync_merge_data), - "::", - stringify!(name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fd2) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(sync_merge_data), - "::", - stringify!(fd2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fence) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(sync_merge_data), - "::", - stringify!(fence) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(sync_merge_data), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(sync_merge_data), - "::", - stringify!(pad) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sync_merge_data"][::std::mem::size_of::() - 48usize]; + ["Alignment of sync_merge_data"][::std::mem::align_of::() - 4usize]; + ["Offset of field: sync_merge_data::name"] + [::std::mem::offset_of!(sync_merge_data, name) - 0usize]; + ["Offset of field: sync_merge_data::fd2"] + [::std::mem::offset_of!(sync_merge_data, fd2) - 32usize]; + ["Offset of field: sync_merge_data::fence"] + [::std::mem::offset_of!(sync_merge_data, fence) - 36usize]; + ["Offset of field: sync_merge_data::flags"] + [::std::mem::offset_of!(sync_merge_data, flags) - 40usize]; + ["Offset of field: sync_merge_data::pad"] + [::std::mem::offset_of!(sync_merge_data, pad) - 44usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct sync_fence_info { @@ -18269,71 +11795,21 @@ pub struct sync_fence_info { pub flags: __u32, pub timestamp_ns: __u64, } -#[test] -fn bindgen_test_layout_sync_fence_info() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 80usize, - concat!("Size of: ", stringify!(sync_fence_info)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(sync_fence_info)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).obj_name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sync_fence_info), - "::", - stringify!(obj_name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).driver_name) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(sync_fence_info), - "::", - stringify!(driver_name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).status) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(sync_fence_info), - "::", - stringify!(status) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 68usize, - concat!( - "Offset of field: ", - stringify!(sync_fence_info), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).timestamp_ns) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(sync_fence_info), - "::", - stringify!(timestamp_ns) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sync_fence_info"][::std::mem::size_of::() - 80usize]; + ["Alignment of sync_fence_info"][::std::mem::align_of::() - 4usize]; + ["Offset of field: sync_fence_info::obj_name"] + [::std::mem::offset_of!(sync_fence_info, obj_name) - 0usize]; + ["Offset of field: sync_fence_info::driver_name"] + [::std::mem::offset_of!(sync_fence_info, driver_name) - 32usize]; + ["Offset of field: sync_fence_info::status"] + [::std::mem::offset_of!(sync_fence_info, status) - 64usize]; + ["Offset of field: sync_fence_info::flags"] + [::std::mem::offset_of!(sync_fence_info, flags) - 68usize]; + ["Offset of field: sync_fence_info::timestamp_ns"] + [::std::mem::offset_of!(sync_fence_info, timestamp_ns) - 72usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct sync_file_info { @@ -18344,122 +11820,37 @@ pub struct sync_file_info { pub pad: __u32, pub sync_fence_info: __u64, } -#[test] -fn bindgen_test_layout_sync_file_info() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(sync_file_info)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(sync_file_info)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sync_file_info), - "::", - stringify!(name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).status) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(sync_file_info), - "::", - stringify!(status) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(sync_file_info), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).num_fences) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(sync_file_info), - "::", - stringify!(num_fences) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(sync_file_info), - "::", - stringify!(pad) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sync_fence_info) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(sync_file_info), - "::", - stringify!(sync_fence_info) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sync_file_info"][::std::mem::size_of::() - 56usize]; + ["Alignment of sync_file_info"][::std::mem::align_of::() - 4usize]; + ["Offset of field: sync_file_info::name"] + [::std::mem::offset_of!(sync_file_info, name) - 0usize]; + ["Offset of field: sync_file_info::status"] + [::std::mem::offset_of!(sync_file_info, status) - 32usize]; + ["Offset of field: sync_file_info::flags"] + [::std::mem::offset_of!(sync_file_info, flags) - 36usize]; + ["Offset of field: sync_file_info::num_fences"] + [::std::mem::offset_of!(sync_file_info, num_fences) - 40usize]; + ["Offset of field: sync_file_info::pad"][::std::mem::offset_of!(sync_file_info, pad) - 44usize]; + ["Offset of field: sync_file_info::sync_fence_info"] + [::std::mem::offset_of!(sync_file_info, sync_fence_info) - 48usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct sync_set_deadline { pub deadline_ns: __u64, pub pad: __u64, } -#[test] -fn bindgen_test_layout_sync_set_deadline() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(sync_set_deadline)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(sync_set_deadline)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).deadline_ns) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sync_set_deadline), - "::", - stringify!(deadline_ns) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(sync_set_deadline), - "::", - stringify!(pad) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sync_set_deadline"][::std::mem::size_of::() - 16usize]; + ["Alignment of sync_set_deadline"][::std::mem::align_of::() - 4usize]; + ["Offset of field: sync_set_deadline::deadline_ns"] + [::std::mem::offset_of!(sync_set_deadline, deadline_ns) - 0usize]; + ["Offset of field: sync_set_deadline::pad"] + [::std::mem::offset_of!(sync_set_deadline, pad) - 8usize]; +}; extern "C" { pub fn sync_merge(name: *const ::std::os::raw::c_char, fd1: i32, fd2: i32) -> i32; } @@ -18580,131 +11971,22 @@ pub struct tm { pub tm_gmtoff: ::std::os::raw::c_long, pub tm_zone: *const ::std::os::raw::c_char, } -#[test] -fn bindgen_test_layout_tm() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 44usize, - concat!("Size of: ", stringify!(tm)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(tm)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tm_sec) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_sec) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tm_min) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_min) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tm_hour) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_hour) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tm_mday) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_mday) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tm_mon) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_mon) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tm_year) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_year) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tm_wday) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_wday) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tm_yday) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_yday) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tm_isdst) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_isdst) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tm_gmtoff) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_gmtoff) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tm_zone) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_zone) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of tm"][::std::mem::size_of::() - 44usize]; + ["Alignment of tm"][::std::mem::align_of::() - 4usize]; + ["Offset of field: tm::tm_sec"][::std::mem::offset_of!(tm, tm_sec) - 0usize]; + ["Offset of field: tm::tm_min"][::std::mem::offset_of!(tm, tm_min) - 4usize]; + ["Offset of field: tm::tm_hour"][::std::mem::offset_of!(tm, tm_hour) - 8usize]; + ["Offset of field: tm::tm_mday"][::std::mem::offset_of!(tm, tm_mday) - 12usize]; + ["Offset of field: tm::tm_mon"][::std::mem::offset_of!(tm, tm_mon) - 16usize]; + ["Offset of field: tm::tm_year"][::std::mem::offset_of!(tm, tm_year) - 20usize]; + ["Offset of field: tm::tm_wday"][::std::mem::offset_of!(tm, tm_wday) - 24usize]; + ["Offset of field: tm::tm_yday"][::std::mem::offset_of!(tm, tm_yday) - 28usize]; + ["Offset of field: tm::tm_isdst"][::std::mem::offset_of!(tm, tm_isdst) - 32usize]; + ["Offset of field: tm::tm_gmtoff"][::std::mem::offset_of!(tm, tm_gmtoff) - 36usize]; + ["Offset of field: tm::tm_zone"][::std::mem::offset_of!(tm, tm_zone) - 40usize]; +}; extern "C" { pub fn time(__t: *mut time_t) -> time_t; } @@ -22895,42 +16177,17 @@ pub struct ACameraMetadata_rational { pub numerator: i32, pub denominator: i32, } -#[test] -fn bindgen_test_layout_ACameraMetadata_rational() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(ACameraMetadata_rational)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(ACameraMetadata_rational)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).numerator) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_rational), - "::", - stringify!(numerator) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).denominator) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_rational), - "::", - stringify!(denominator) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACameraMetadata_rational"] + [::std::mem::size_of::() - 8usize]; + ["Alignment of ACameraMetadata_rational"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ACameraMetadata_rational::numerator"] + [::std::mem::offset_of!(ACameraMetadata_rational, numerator) - 0usize]; + ["Offset of field: ACameraMetadata_rational::denominator"] + [::std::mem::offset_of!(ACameraMetadata_rational, denominator) - 4usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub struct ACameraMetadata_entry { @@ -22949,141 +16206,39 @@ pub union ACameraMetadata_entry__bindgen_ty_1 { pub d: *mut f64, pub r: *mut ACameraMetadata_rational, } -#[test] -fn bindgen_test_layout_ACameraMetadata_entry__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(ACameraMetadata_entry__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ACameraMetadata_entry__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).u8_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_entry__bindgen_ty_1), - "::", - stringify!(u8_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).i32_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_entry__bindgen_ty_1), - "::", - stringify!(i32_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).f) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_entry__bindgen_ty_1), - "::", - stringify!(f) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).i64_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_entry__bindgen_ty_1), - "::", - stringify!(i64_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).d) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_entry__bindgen_ty_1), - "::", - stringify!(d) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).r) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_entry__bindgen_ty_1), - "::", - stringify!(r) - ) - ); -} -#[test] -fn bindgen_test_layout_ACameraMetadata_entry() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(ACameraMetadata_entry)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(ACameraMetadata_entry)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tag) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_entry), - "::", - stringify!(tag) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_entry), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_entry), - "::", - stringify!(count) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_entry), - "::", - stringify!(data) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACameraMetadata_entry__bindgen_ty_1"] + [::std::mem::size_of::() - 4usize]; + ["Alignment of ACameraMetadata_entry__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ACameraMetadata_entry__bindgen_ty_1::u8_"] + [::std::mem::offset_of!(ACameraMetadata_entry__bindgen_ty_1, u8_) - 0usize]; + ["Offset of field: ACameraMetadata_entry__bindgen_ty_1::i32_"] + [::std::mem::offset_of!(ACameraMetadata_entry__bindgen_ty_1, i32_) - 0usize]; + ["Offset of field: ACameraMetadata_entry__bindgen_ty_1::f"] + [::std::mem::offset_of!(ACameraMetadata_entry__bindgen_ty_1, f) - 0usize]; + ["Offset of field: ACameraMetadata_entry__bindgen_ty_1::i64_"] + [::std::mem::offset_of!(ACameraMetadata_entry__bindgen_ty_1, i64_) - 0usize]; + ["Offset of field: ACameraMetadata_entry__bindgen_ty_1::d"] + [::std::mem::offset_of!(ACameraMetadata_entry__bindgen_ty_1, d) - 0usize]; + ["Offset of field: ACameraMetadata_entry__bindgen_ty_1::r"] + [::std::mem::offset_of!(ACameraMetadata_entry__bindgen_ty_1, r) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACameraMetadata_entry"][::std::mem::size_of::() - 16usize]; + ["Alignment of ACameraMetadata_entry"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ACameraMetadata_entry::tag"] + [::std::mem::offset_of!(ACameraMetadata_entry, tag) - 0usize]; + ["Offset of field: ACameraMetadata_entry::type_"] + [::std::mem::offset_of!(ACameraMetadata_entry, type_) - 4usize]; + ["Offset of field: ACameraMetadata_entry::count"] + [::std::mem::offset_of!(ACameraMetadata_entry, count) - 8usize]; + ["Offset of field: ACameraMetadata_entry::data"] + [::std::mem::offset_of!(ACameraMetadata_entry, data) - 12usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub struct ACameraMetadata_const_entry { @@ -23102,144 +16257,40 @@ pub union ACameraMetadata_const_entry__bindgen_ty_1 { pub d: *const f64, pub r: *const ACameraMetadata_rational, } -#[test] -fn bindgen_test_layout_ACameraMetadata_const_entry__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 4usize, - concat!( - "Size of: ", - stringify!(ACameraMetadata_const_entry__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ACameraMetadata_const_entry__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).u8_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_const_entry__bindgen_ty_1), - "::", - stringify!(u8_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).i32_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_const_entry__bindgen_ty_1), - "::", - stringify!(i32_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).f) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_const_entry__bindgen_ty_1), - "::", - stringify!(f) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).i64_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_const_entry__bindgen_ty_1), - "::", - stringify!(i64_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).d) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_const_entry__bindgen_ty_1), - "::", - stringify!(d) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).r) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_const_entry__bindgen_ty_1), - "::", - stringify!(r) - ) - ); -} -#[test] -fn bindgen_test_layout_ACameraMetadata_const_entry() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(ACameraMetadata_const_entry)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(ACameraMetadata_const_entry)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tag) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_const_entry), - "::", - stringify!(tag) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_const_entry), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_const_entry), - "::", - stringify!(count) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_const_entry), - "::", - stringify!(data) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACameraMetadata_const_entry__bindgen_ty_1"] + [::std::mem::size_of::() - 4usize]; + ["Alignment of ACameraMetadata_const_entry__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ACameraMetadata_const_entry__bindgen_ty_1::u8_"] + [::std::mem::offset_of!(ACameraMetadata_const_entry__bindgen_ty_1, u8_) - 0usize]; + ["Offset of field: ACameraMetadata_const_entry__bindgen_ty_1::i32_"] + [::std::mem::offset_of!(ACameraMetadata_const_entry__bindgen_ty_1, i32_) - 0usize]; + ["Offset of field: ACameraMetadata_const_entry__bindgen_ty_1::f"] + [::std::mem::offset_of!(ACameraMetadata_const_entry__bindgen_ty_1, f) - 0usize]; + ["Offset of field: ACameraMetadata_const_entry__bindgen_ty_1::i64_"] + [::std::mem::offset_of!(ACameraMetadata_const_entry__bindgen_ty_1, i64_) - 0usize]; + ["Offset of field: ACameraMetadata_const_entry__bindgen_ty_1::d"] + [::std::mem::offset_of!(ACameraMetadata_const_entry__bindgen_ty_1, d) - 0usize]; + ["Offset of field: ACameraMetadata_const_entry__bindgen_ty_1::r"] + [::std::mem::offset_of!(ACameraMetadata_const_entry__bindgen_ty_1, r) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACameraMetadata_const_entry"] + [::std::mem::size_of::() - 16usize]; + ["Alignment of ACameraMetadata_const_entry"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ACameraMetadata_const_entry::tag"] + [::std::mem::offset_of!(ACameraMetadata_const_entry, tag) - 0usize]; + ["Offset of field: ACameraMetadata_const_entry::type_"] + [::std::mem::offset_of!(ACameraMetadata_const_entry, type_) - 4usize]; + ["Offset of field: ACameraMetadata_const_entry::count"] + [::std::mem::offset_of!(ACameraMetadata_const_entry, count) - 8usize]; + ["Offset of field: ACameraMetadata_const_entry::data"] + [::std::mem::offset_of!(ACameraMetadata_const_entry, data) - 12usize]; +}; extern "C" { pub fn ACameraMetadata_getConstEntry( metadata: *const ACameraMetadata, @@ -23468,68 +16519,21 @@ pub struct ACameraCaptureSession_stateCallbacks { pub onReady: ACameraCaptureSession_stateCallback, pub onActive: ACameraCaptureSession_stateCallback, } -#[test] -fn bindgen_test_layout_ACameraCaptureSession_stateCallbacks() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!( - "Size of: ", - stringify!(ACameraCaptureSession_stateCallbacks) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ACameraCaptureSession_stateCallbacks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).context) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_stateCallbacks), - "::", - stringify!(context) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onClosed) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_stateCallbacks), - "::", - stringify!(onClosed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onReady) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_stateCallbacks), - "::", - stringify!(onReady) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onActive) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_stateCallbacks), - "::", - stringify!(onActive) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACameraCaptureSession_stateCallbacks"] + [::std::mem::size_of::() - 16usize]; + ["Alignment of ACameraCaptureSession_stateCallbacks"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ACameraCaptureSession_stateCallbacks::context"] + [::std::mem::offset_of!(ACameraCaptureSession_stateCallbacks, context) - 0usize]; + ["Offset of field: ACameraCaptureSession_stateCallbacks::onClosed"] + [::std::mem::offset_of!(ACameraCaptureSession_stateCallbacks, onClosed) - 4usize]; + ["Offset of field: ACameraCaptureSession_stateCallbacks::onReady"] + [::std::mem::offset_of!(ACameraCaptureSession_stateCallbacks, onReady) - 8usize]; + ["Offset of field: ACameraCaptureSession_stateCallbacks::onActive"] + [::std::mem::offset_of!(ACameraCaptureSession_stateCallbacks, onActive) - 12usize]; +}; pub type ACameraCaptureSession_prepareCallback = ::std::option::Option< unsafe extern "C" fn( context: *mut ::std::os::raw::c_void, @@ -23548,62 +16552,20 @@ pub struct ACameraCaptureFailure { pub sequenceId: ::std::os::raw::c_int, pub wasImageCaptured: bool, } -#[test] -fn bindgen_test_layout_ACameraCaptureFailure() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 20usize, - concat!("Size of: ", stringify!(ACameraCaptureFailure)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(ACameraCaptureFailure)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).frameNumber) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureFailure), - "::", - stringify!(frameNumber) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reason) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureFailure), - "::", - stringify!(reason) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sequenceId) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureFailure), - "::", - stringify!(sequenceId) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).wasImageCaptured) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureFailure), - "::", - stringify!(wasImageCaptured) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACameraCaptureFailure"][::std::mem::size_of::() - 20usize]; + ["Alignment of ACameraCaptureFailure"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ACameraCaptureFailure::frameNumber"] + [::std::mem::offset_of!(ACameraCaptureFailure, frameNumber) - 0usize]; + ["Offset of field: ACameraCaptureFailure::reason"] + [::std::mem::offset_of!(ACameraCaptureFailure, reason) - 8usize]; + ["Offset of field: ACameraCaptureFailure::sequenceId"] + [::std::mem::offset_of!(ACameraCaptureFailure, sequenceId) - 12usize]; + ["Offset of field: ACameraCaptureFailure::wasImageCaptured"] + [::std::mem::offset_of!(ACameraCaptureFailure, wasImageCaptured) - 16usize]; +}; pub type ACameraCaptureSession_captureCallback_start = ::std::option::Option< unsafe extern "C" fn( context: *mut ::std::os::raw::c_void, @@ -23664,108 +16626,41 @@ pub struct ACameraCaptureSession_captureCallbacks { pub onCaptureSequenceAborted: ACameraCaptureSession_captureCallback_sequenceAbort, pub onCaptureBufferLost: ACameraCaptureSession_captureCallback_bufferLost, } -#[test] -fn bindgen_test_layout_ACameraCaptureSession_captureCallbacks() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!( - "Size of: ", - stringify!(ACameraCaptureSession_captureCallbacks) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ACameraCaptureSession_captureCallbacks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).context) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_captureCallbacks), - "::", - stringify!(context) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureStarted) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_captureCallbacks), - "::", - stringify!(onCaptureStarted) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureProgressed) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_captureCallbacks), - "::", - stringify!(onCaptureProgressed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureCompleted) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_captureCallbacks), - "::", - stringify!(onCaptureCompleted) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureFailed) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_captureCallbacks), - "::", - stringify!(onCaptureFailed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureSequenceCompleted) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_captureCallbacks), - "::", - stringify!(onCaptureSequenceCompleted) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureSequenceAborted) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_captureCallbacks), - "::", - stringify!(onCaptureSequenceAborted) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureBufferLost) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_captureCallbacks), - "::", - stringify!(onCaptureBufferLost) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACameraCaptureSession_captureCallbacks"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of ACameraCaptureSession_captureCallbacks"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ACameraCaptureSession_captureCallbacks::context"] + [::std::mem::offset_of!(ACameraCaptureSession_captureCallbacks, context) - 0usize]; + ["Offset of field: ACameraCaptureSession_captureCallbacks::onCaptureStarted"] + [::std::mem::offset_of!(ACameraCaptureSession_captureCallbacks, onCaptureStarted) - 4usize]; + ["Offset of field: ACameraCaptureSession_captureCallbacks::onCaptureProgressed"][::std::mem::offset_of!( + ACameraCaptureSession_captureCallbacks, + onCaptureProgressed + ) - 8usize]; + ["Offset of field: ACameraCaptureSession_captureCallbacks::onCaptureCompleted"][::std::mem::offset_of!( + ACameraCaptureSession_captureCallbacks, + onCaptureCompleted + ) - 12usize]; + ["Offset of field: ACameraCaptureSession_captureCallbacks::onCaptureFailed"] + [::std::mem::offset_of!(ACameraCaptureSession_captureCallbacks, onCaptureFailed) - 16usize]; + ["Offset of field: ACameraCaptureSession_captureCallbacks::onCaptureSequenceCompleted"][::std::mem::offset_of!( + ACameraCaptureSession_captureCallbacks, + onCaptureSequenceCompleted + ) + - 20usize]; + ["Offset of field: ACameraCaptureSession_captureCallbacks::onCaptureSequenceAborted"][::std::mem::offset_of!( + ACameraCaptureSession_captureCallbacks, + onCaptureSequenceAborted + ) + - 24usize]; + ["Offset of field: ACameraCaptureSession_captureCallbacks::onCaptureBufferLost"][::std::mem::offset_of!( + ACameraCaptureSession_captureCallbacks, + onCaptureBufferLost + ) - 28usize]; +}; pub const CAPTURE_SEQUENCE_ID_NONE: _bindgen_ty_67 = -1; pub type _bindgen_ty_67 = ::std::os::raw::c_int; extern "C" { @@ -23838,42 +16733,17 @@ pub struct ALogicalCameraCaptureFailure { pub captureFailure: ACameraCaptureFailure, pub physicalCameraId: *const ::std::os::raw::c_char, } -#[test] -fn bindgen_test_layout_ALogicalCameraCaptureFailure() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(ALogicalCameraCaptureFailure)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(ALogicalCameraCaptureFailure)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).captureFailure) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ALogicalCameraCaptureFailure), - "::", - stringify!(captureFailure) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).physicalCameraId) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(ALogicalCameraCaptureFailure), - "::", - stringify!(physicalCameraId) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ALogicalCameraCaptureFailure"] + [::std::mem::size_of::() - 24usize]; + ["Alignment of ALogicalCameraCaptureFailure"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ALogicalCameraCaptureFailure::captureFailure"] + [::std::mem::offset_of!(ALogicalCameraCaptureFailure, captureFailure) - 0usize]; + ["Offset of field: ALogicalCameraCaptureFailure::physicalCameraId"] + [::std::mem::offset_of!(ALogicalCameraCaptureFailure, physicalCameraId) - 20usize]; +}; pub type ACameraCaptureSession_logicalCamera_captureCallback_failed = ::std::option::Option< unsafe extern "C" fn( context: *mut ::std::os::raw::c_void, @@ -23894,112 +16764,28 @@ pub struct ACameraCaptureSession_logicalCamera_captureCallbacks { pub onCaptureSequenceAborted: ACameraCaptureSession_captureCallback_sequenceAbort, pub onCaptureBufferLost: ACameraCaptureSession_captureCallback_bufferLost, } -#[test] -fn bindgen_test_layout_ACameraCaptureSession_logicalCamera_captureCallbacks() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!( - "Size of: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacks) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).context) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacks), - "::", - stringify!(context) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureStarted) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacks), - "::", - stringify!(onCaptureStarted) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureProgressed) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacks), - "::", - stringify!(onCaptureProgressed) - ) - ); - assert_eq!( - unsafe { - ::std::ptr::addr_of!((*ptr).onLogicalCameraCaptureCompleted) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacks), - "::", - stringify!(onLogicalCameraCaptureCompleted) - ) - ); - assert_eq!( - unsafe { - ::std::ptr::addr_of!((*ptr).onLogicalCameraCaptureFailed) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacks), - "::", - stringify!(onLogicalCameraCaptureFailed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureSequenceCompleted) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacks), - "::", - stringify!(onCaptureSequenceCompleted) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureSequenceAborted) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacks), - "::", - stringify!(onCaptureSequenceAborted) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureBufferLost) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacks), - "::", - stringify!(onCaptureBufferLost) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACameraCaptureSession_logicalCamera_captureCallbacks"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of ACameraCaptureSession_logicalCamera_captureCallbacks"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ACameraCaptureSession_logicalCamera_captureCallbacks::context"][::std::mem::offset_of!( + ACameraCaptureSession_logicalCamera_captureCallbacks, + context + ) - 0usize]; + ["Offset of field: ACameraCaptureSession_logicalCamera_captureCallbacks::onCaptureStarted"][::std::mem::offset_of!( + ACameraCaptureSession_logicalCamera_captureCallbacks, + onCaptureStarted + ) + - 4usize]; + ["Offset of field: ACameraCaptureSession_logicalCamera_captureCallbacks::onCaptureProgressed"] [:: std :: mem :: offset_of ! (ACameraCaptureSession_logicalCamera_captureCallbacks , onCaptureProgressed) - 8usize] ; + ["Offset of field: ACameraCaptureSession_logicalCamera_captureCallbacks::onLogicalCameraCaptureCompleted"] [:: std :: mem :: offset_of ! (ACameraCaptureSession_logicalCamera_captureCallbacks , onLogicalCameraCaptureCompleted) - 12usize] ; + ["Offset of field: ACameraCaptureSession_logicalCamera_captureCallbacks::onLogicalCameraCaptureFailed"] [:: std :: mem :: offset_of ! (ACameraCaptureSession_logicalCamera_captureCallbacks , onLogicalCameraCaptureFailed) - 16usize] ; + ["Offset of field: ACameraCaptureSession_logicalCamera_captureCallbacks::onCaptureSequenceCompleted"] [:: std :: mem :: offset_of ! (ACameraCaptureSession_logicalCamera_captureCallbacks , onCaptureSequenceCompleted) - 20usize] ; + ["Offset of field: ACameraCaptureSession_logicalCamera_captureCallbacks::onCaptureSequenceAborted"] [:: std :: mem :: offset_of ! (ACameraCaptureSession_logicalCamera_captureCallbacks , onCaptureSequenceAborted) - 24usize] ; + ["Offset of field: ACameraCaptureSession_logicalCamera_captureCallbacks::onCaptureBufferLost"] [:: std :: mem :: offset_of ! (ACameraCaptureSession_logicalCamera_captureCallbacks , onCaptureBufferLost) - 28usize] ; +}; extern "C" { pub fn ACameraCaptureSession_logicalCamera_capture( session: *mut ACameraCaptureSession, @@ -24039,108 +16825,45 @@ pub struct ACameraCaptureSession_captureCallbacksV2 { pub onCaptureSequenceAborted: ACameraCaptureSession_captureCallback_sequenceAbort, pub onCaptureBufferLost: ACameraCaptureSession_captureCallback_bufferLost, } -#[test] -fn bindgen_test_layout_ACameraCaptureSession_captureCallbacksV2() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!( - "Size of: ", - stringify!(ACameraCaptureSession_captureCallbacksV2) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ACameraCaptureSession_captureCallbacksV2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).context) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_captureCallbacksV2), - "::", - stringify!(context) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureStarted) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_captureCallbacksV2), - "::", - stringify!(onCaptureStarted) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureProgressed) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_captureCallbacksV2), - "::", - stringify!(onCaptureProgressed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureCompleted) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_captureCallbacksV2), - "::", - stringify!(onCaptureCompleted) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureFailed) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_captureCallbacksV2), - "::", - stringify!(onCaptureFailed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureSequenceCompleted) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_captureCallbacksV2), - "::", - stringify!(onCaptureSequenceCompleted) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureSequenceAborted) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_captureCallbacksV2), - "::", - stringify!(onCaptureSequenceAborted) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureBufferLost) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_captureCallbacksV2), - "::", - stringify!(onCaptureBufferLost) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACameraCaptureSession_captureCallbacksV2"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of ACameraCaptureSession_captureCallbacksV2"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ACameraCaptureSession_captureCallbacksV2::context"] + [::std::mem::offset_of!(ACameraCaptureSession_captureCallbacksV2, context) - 0usize]; + ["Offset of field: ACameraCaptureSession_captureCallbacksV2::onCaptureStarted"][::std::mem::offset_of!( + ACameraCaptureSession_captureCallbacksV2, + onCaptureStarted + ) - 4usize]; + ["Offset of field: ACameraCaptureSession_captureCallbacksV2::onCaptureProgressed"][::std::mem::offset_of!( + ACameraCaptureSession_captureCallbacksV2, + onCaptureProgressed + ) - 8usize]; + ["Offset of field: ACameraCaptureSession_captureCallbacksV2::onCaptureCompleted"][::std::mem::offset_of!( + ACameraCaptureSession_captureCallbacksV2, + onCaptureCompleted + ) - 12usize]; + ["Offset of field: ACameraCaptureSession_captureCallbacksV2::onCaptureFailed"][::std::mem::offset_of!( + ACameraCaptureSession_captureCallbacksV2, + onCaptureFailed + ) - 16usize]; + ["Offset of field: ACameraCaptureSession_captureCallbacksV2::onCaptureSequenceCompleted"][::std::mem::offset_of!( + ACameraCaptureSession_captureCallbacksV2, + onCaptureSequenceCompleted + ) + - 20usize]; + ["Offset of field: ACameraCaptureSession_captureCallbacksV2::onCaptureSequenceAborted"][::std::mem::offset_of!( + ACameraCaptureSession_captureCallbacksV2, + onCaptureSequenceAborted + ) + - 24usize]; + ["Offset of field: ACameraCaptureSession_captureCallbacksV2::onCaptureBufferLost"][::std::mem::offset_of!( + ACameraCaptureSession_captureCallbacksV2, + onCaptureBufferLost + ) - 28usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ACameraCaptureSession_logicalCamera_captureCallbacksV2 { @@ -24153,112 +16876,29 @@ pub struct ACameraCaptureSession_logicalCamera_captureCallbacksV2 { pub onCaptureSequenceAborted: ACameraCaptureSession_captureCallback_sequenceAbort, pub onCaptureBufferLost: ACameraCaptureSession_captureCallback_bufferLost, } -#[test] -fn bindgen_test_layout_ACameraCaptureSession_logicalCamera_captureCallbacksV2() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!( - "Size of: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacksV2) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacksV2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).context) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacksV2), - "::", - stringify!(context) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureStarted) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacksV2), - "::", - stringify!(onCaptureStarted) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureProgressed) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacksV2), - "::", - stringify!(onCaptureProgressed) - ) - ); - assert_eq!( - unsafe { - ::std::ptr::addr_of!((*ptr).onLogicalCameraCaptureCompleted) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacksV2), - "::", - stringify!(onLogicalCameraCaptureCompleted) - ) - ); - assert_eq!( - unsafe { - ::std::ptr::addr_of!((*ptr).onLogicalCameraCaptureFailed) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacksV2), - "::", - stringify!(onLogicalCameraCaptureFailed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureSequenceCompleted) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacksV2), - "::", - stringify!(onCaptureSequenceCompleted) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureSequenceAborted) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacksV2), - "::", - stringify!(onCaptureSequenceAborted) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureBufferLost) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacksV2), - "::", - stringify!(onCaptureBufferLost) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACameraCaptureSession_logicalCamera_captureCallbacksV2"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of ACameraCaptureSession_logicalCamera_captureCallbacksV2"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ACameraCaptureSession_logicalCamera_captureCallbacksV2::context"][::std::mem::offset_of!( + ACameraCaptureSession_logicalCamera_captureCallbacksV2, + context + ) + - 0usize]; + ["Offset of field: ACameraCaptureSession_logicalCamera_captureCallbacksV2::onCaptureStarted"][::std::mem::offset_of!( + ACameraCaptureSession_logicalCamera_captureCallbacksV2, + onCaptureStarted + ) + - 4usize]; + ["Offset of field: ACameraCaptureSession_logicalCamera_captureCallbacksV2::onCaptureProgressed"] [:: std :: mem :: offset_of ! (ACameraCaptureSession_logicalCamera_captureCallbacksV2 , onCaptureProgressed) - 8usize] ; + ["Offset of field: ACameraCaptureSession_logicalCamera_captureCallbacksV2::onLogicalCameraCaptureCompleted"] [:: std :: mem :: offset_of ! (ACameraCaptureSession_logicalCamera_captureCallbacksV2 , onLogicalCameraCaptureCompleted) - 12usize] ; + ["Offset of field: ACameraCaptureSession_logicalCamera_captureCallbacksV2::onLogicalCameraCaptureFailed"] [:: std :: mem :: offset_of ! (ACameraCaptureSession_logicalCamera_captureCallbacksV2 , onLogicalCameraCaptureFailed) - 16usize] ; + ["Offset of field: ACameraCaptureSession_logicalCamera_captureCallbacksV2::onCaptureSequenceCompleted"] [:: std :: mem :: offset_of ! (ACameraCaptureSession_logicalCamera_captureCallbacksV2 , onCaptureSequenceCompleted) - 20usize] ; + ["Offset of field: ACameraCaptureSession_logicalCamera_captureCallbacksV2::onCaptureSequenceAborted"] [:: std :: mem :: offset_of ! (ACameraCaptureSession_logicalCamera_captureCallbacksV2 , onCaptureSequenceAborted) - 24usize] ; + ["Offset of field: ACameraCaptureSession_logicalCamera_captureCallbacksV2::onCaptureBufferLost"] [:: std :: mem :: offset_of ! (ACameraCaptureSession_logicalCamera_captureCallbacksV2 , onCaptureBufferLost) - 28usize] ; +}; extern "C" { pub fn ACameraCaptureSession_captureV2( session: *mut ACameraCaptureSession, @@ -24314,41 +16954,15 @@ pub struct ACameraIdList { pub numCameras: ::std::os::raw::c_int, pub cameraIds: *mut *const ::std::os::raw::c_char, } -#[test] -fn bindgen_test_layout_ACameraIdList() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(ACameraIdList)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(ACameraIdList)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).numCameras) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraIdList), - "::", - stringify!(numCameras) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cameraIds) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ACameraIdList), - "::", - stringify!(cameraIds) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACameraIdList"][::std::mem::size_of::() - 8usize]; + ["Alignment of ACameraIdList"][::std::mem::align_of::() - 4usize]; + ["Offset of field: ACameraIdList::numCameras"] + [::std::mem::offset_of!(ACameraIdList, numCameras) - 0usize]; + ["Offset of field: ACameraIdList::cameraIds"] + [::std::mem::offset_of!(ACameraIdList, cameraIds) - 4usize]; +}; pub const ERROR_CAMERA_IN_USE: _bindgen_ty_68 = 1; pub const ERROR_MAX_CAMERAS_IN_USE: _bindgen_ty_68 = 2; pub const ERROR_CAMERA_DISABLED: _bindgen_ty_68 = 3; @@ -24372,52 +16986,19 @@ pub struct ACameraDevice_StateCallbacks { pub onDisconnected: ACameraDevice_StateCallback, pub onError: ACameraDevice_ErrorStateCallback, } -#[test] -fn bindgen_test_layout_ACameraDevice_StateCallbacks() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(ACameraDevice_StateCallbacks)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(ACameraDevice_StateCallbacks)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).context) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraDevice_StateCallbacks), - "::", - stringify!(context) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onDisconnected) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ACameraDevice_StateCallbacks), - "::", - stringify!(onDisconnected) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onError) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ACameraDevice_StateCallbacks), - "::", - stringify!(onError) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACameraDevice_StateCallbacks"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of ACameraDevice_StateCallbacks"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ACameraDevice_StateCallbacks::context"] + [::std::mem::offset_of!(ACameraDevice_StateCallbacks, context) - 0usize]; + ["Offset of field: ACameraDevice_StateCallbacks::onDisconnected"] + [::std::mem::offset_of!(ACameraDevice_StateCallbacks, onDisconnected) - 4usize]; + ["Offset of field: ACameraDevice_StateCallbacks::onError"] + [::std::mem::offset_of!(ACameraDevice_StateCallbacks, onError) - 8usize]; +}; pub type ACameraDevice_stateCallbacks = ACameraDevice_StateCallbacks; extern "C" { pub fn ACameraDevice_close(device: *mut ACameraDevice) -> camera_status_t; @@ -24586,55 +17167,19 @@ pub struct ACameraManager_AvailabilityListener { pub onCameraAvailable: ACameraManager_AvailabilityCallback, pub onCameraUnavailable: ACameraManager_AvailabilityCallback, } -#[test] -fn bindgen_test_layout_ACameraManager_AvailabilityListener() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(ACameraManager_AvailabilityListener)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ACameraManager_AvailabilityListener) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).context) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraManager_AvailabilityListener), - "::", - stringify!(context) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCameraAvailable) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ACameraManager_AvailabilityListener), - "::", - stringify!(onCameraAvailable) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCameraUnavailable) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ACameraManager_AvailabilityListener), - "::", - stringify!(onCameraUnavailable) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACameraManager_AvailabilityListener"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of ACameraManager_AvailabilityListener"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ACameraManager_AvailabilityListener::context"] + [::std::mem::offset_of!(ACameraManager_AvailabilityListener, context) - 0usize]; + ["Offset of field: ACameraManager_AvailabilityListener::onCameraAvailable"] + [::std::mem::offset_of!(ACameraManager_AvailabilityListener, onCameraAvailable) - 4usize]; + ["Offset of field: ACameraManager_AvailabilityListener::onCameraUnavailable"] + [::std::mem::offset_of!(ACameraManager_AvailabilityListener, onCameraUnavailable) - 8usize]; +}; pub type ACameraManager_AvailabilityCallbacks = ACameraManager_AvailabilityListener; extern "C" { pub fn ACameraManager_registerAvailabilityCallback( @@ -24674,80 +17219,31 @@ pub struct ACameraManager_ExtendedAvailabilityListener { pub onPhysicalCameraUnavailable: ACameraManager_PhysicalCameraAvailabilityCallback, pub reserved: [*mut ::std::os::raw::c_void; 4usize], } -#[test] -fn bindgen_test_layout_ACameraManager_ExtendedAvailabilityListener() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!( - "Size of: ", - stringify!(ACameraManager_ExtendedAvailabilityListener) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ACameraManager_ExtendedAvailabilityListener) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).availabilityCallbacks) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraManager_ExtendedAvailabilityListener), - "::", - stringify!(availabilityCallbacks) - ) - ); - assert_eq!( - unsafe { - ::std::ptr::addr_of!((*ptr).onCameraAccessPrioritiesChanged) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(ACameraManager_ExtendedAvailabilityListener), - "::", - stringify!(onCameraAccessPrioritiesChanged) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onPhysicalCameraAvailable) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(ACameraManager_ExtendedAvailabilityListener), - "::", - stringify!(onPhysicalCameraAvailable) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onPhysicalCameraUnavailable) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(ACameraManager_ExtendedAvailabilityListener), - "::", - stringify!(onPhysicalCameraUnavailable) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(ACameraManager_ExtendedAvailabilityListener), - "::", - stringify!(reserved) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACameraManager_ExtendedAvailabilityListener"] + [::std::mem::size_of::() - 40usize]; + ["Alignment of ACameraManager_ExtendedAvailabilityListener"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ACameraManager_ExtendedAvailabilityListener::availabilityCallbacks"][::std::mem::offset_of!( + ACameraManager_ExtendedAvailabilityListener, + availabilityCallbacks + ) + - 0usize]; + ["Offset of field: ACameraManager_ExtendedAvailabilityListener::onCameraAccessPrioritiesChanged"] [:: std :: mem :: offset_of ! (ACameraManager_ExtendedAvailabilityListener , onCameraAccessPrioritiesChanged) - 12usize] ; + ["Offset of field: ACameraManager_ExtendedAvailabilityListener::onPhysicalCameraAvailable"][::std::mem::offset_of!( + ACameraManager_ExtendedAvailabilityListener, + onPhysicalCameraAvailable + ) + - 16usize]; + ["Offset of field: ACameraManager_ExtendedAvailabilityListener::onPhysicalCameraUnavailable"][::std::mem::offset_of!( + ACameraManager_ExtendedAvailabilityListener, + onPhysicalCameraUnavailable + ) + - 20usize]; + ["Offset of field: ACameraManager_ExtendedAvailabilityListener::reserved"] + [::std::mem::offset_of!(ACameraManager_ExtendedAvailabilityListener, reserved) - 24usize]; +}; pub type ACameraManager_ExtendedAvailabilityCallbacks = ACameraManager_ExtendedAvailabilityListener; extern "C" { pub fn ACameraManager_registerExtendedAvailabilityCallback( @@ -24828,61 +17324,18 @@ pub struct AImageCropRect { pub right: i32, pub bottom: i32, } -#[test] -fn bindgen_test_layout_AImageCropRect() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(AImageCropRect)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AImageCropRect)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).left) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AImageCropRect), - "::", - stringify!(left) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).top) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AImageCropRect), - "::", - stringify!(top) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).right) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AImageCropRect), - "::", - stringify!(right) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bottom) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(AImageCropRect), - "::", - stringify!(bottom) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AImageCropRect"][::std::mem::size_of::() - 16usize]; + ["Alignment of AImageCropRect"][::std::mem::align_of::() - 4usize]; + ["Offset of field: AImageCropRect::left"] + [::std::mem::offset_of!(AImageCropRect, left) - 0usize]; + ["Offset of field: AImageCropRect::top"][::std::mem::offset_of!(AImageCropRect, top) - 4usize]; + ["Offset of field: AImageCropRect::right"] + [::std::mem::offset_of!(AImageCropRect, right) - 8usize]; + ["Offset of field: AImageCropRect::bottom"] + [::std::mem::offset_of!(AImageCropRect, bottom) - 12usize]; +}; extern "C" { pub fn AImage_delete(image: *mut AImage); } @@ -24997,42 +17450,17 @@ pub struct AImageReader_ImageListener { pub context: *mut ::std::os::raw::c_void, pub onImageAvailable: AImageReader_ImageCallback, } -#[test] -fn bindgen_test_layout_AImageReader_ImageListener() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(AImageReader_ImageListener)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AImageReader_ImageListener)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).context) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AImageReader_ImageListener), - "::", - stringify!(context) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onImageAvailable) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AImageReader_ImageListener), - "::", - stringify!(onImageAvailable) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AImageReader_ImageListener"] + [::std::mem::size_of::() - 8usize]; + ["Alignment of AImageReader_ImageListener"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: AImageReader_ImageListener::context"] + [::std::mem::offset_of!(AImageReader_ImageListener, context) - 0usize]; + ["Offset of field: AImageReader_ImageListener::onImageAvailable"] + [::std::mem::offset_of!(AImageReader_ImageListener, onImageAvailable) - 4usize]; +}; extern "C" { pub fn AImageReader_setImageListener( reader: *mut AImageReader, @@ -25087,45 +17515,17 @@ pub struct AImageReader_BufferRemovedListener { pub context: *mut ::std::os::raw::c_void, pub onBufferRemoved: AImageReader_BufferRemovedCallback, } -#[test] -fn bindgen_test_layout_AImageReader_BufferRemovedListener() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(AImageReader_BufferRemovedListener)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(AImageReader_BufferRemovedListener) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).context) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AImageReader_BufferRemovedListener), - "::", - stringify!(context) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onBufferRemoved) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AImageReader_BufferRemovedListener), - "::", - stringify!(onBufferRemoved) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AImageReader_BufferRemovedListener"] + [::std::mem::size_of::() - 8usize]; + ["Alignment of AImageReader_BufferRemovedListener"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: AImageReader_BufferRemovedListener::context"] + [::std::mem::offset_of!(AImageReader_BufferRemovedListener, context) - 0usize]; + ["Offset of field: AImageReader_BufferRemovedListener::onBufferRemoved"] + [::std::mem::offset_of!(AImageReader_BufferRemovedListener, onBufferRemoved) - 4usize]; +}; extern "C" { pub fn AImageReader_setBufferRemovedListener( reader: *mut AImageReader, @@ -25139,7 +17539,7 @@ pub struct AMediaCrypto { } pub type AMediaUUID = [u8; 16usize]; extern "C" { - pub fn AMediaCrypto_isCryptoSchemeSupported(uuid: *mut u8) -> bool; + pub fn AMediaCrypto_isCryptoSchemeSupported(uuid: *const u8) -> bool; } extern "C" { pub fn AMediaCrypto_requiresSecureDecoderComponent(mime: *const ::std::os::raw::c_char) @@ -25147,7 +17547,7 @@ extern "C" { } extern "C" { pub fn AMediaCrypto_new( - uuid: *mut u8, + uuid: *const u8, initData: *const ::std::os::raw::c_void, initDataSize: usize, ) -> *mut AMediaCrypto; @@ -25766,62 +18166,20 @@ pub struct AMediaCodecBufferInfo { pub presentationTimeUs: i64, pub flags: u32, } -#[test] -fn bindgen_test_layout_AMediaCodecBufferInfo() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 20usize, - concat!("Size of: ", stringify!(AMediaCodecBufferInfo)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AMediaCodecBufferInfo)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).offset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AMediaCodecBufferInfo), - "::", - stringify!(offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AMediaCodecBufferInfo), - "::", - stringify!(size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).presentationTimeUs) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AMediaCodecBufferInfo), - "::", - stringify!(presentationTimeUs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AMediaCodecBufferInfo), - "::", - stringify!(flags) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AMediaCodecBufferInfo"][::std::mem::size_of::() - 20usize]; + ["Alignment of AMediaCodecBufferInfo"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: AMediaCodecBufferInfo::offset"] + [::std::mem::offset_of!(AMediaCodecBufferInfo, offset) - 0usize]; + ["Offset of field: AMediaCodecBufferInfo::size"] + [::std::mem::offset_of!(AMediaCodecBufferInfo, size) - 4usize]; + ["Offset of field: AMediaCodecBufferInfo::presentationTimeUs"] + [::std::mem::offset_of!(AMediaCodecBufferInfo, presentationTimeUs) - 8usize]; + ["Offset of field: AMediaCodecBufferInfo::flags"] + [::std::mem::offset_of!(AMediaCodecBufferInfo, flags) - 16usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct AMediaCodecCryptoInfo { @@ -25878,65 +18236,21 @@ pub struct AMediaCodecOnAsyncNotifyCallback { pub onAsyncFormatChanged: AMediaCodecOnAsyncFormatChanged, pub onAsyncError: AMediaCodecOnAsyncError, } -#[test] -fn bindgen_test_layout_AMediaCodecOnAsyncNotifyCallback() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(AMediaCodecOnAsyncNotifyCallback)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(AMediaCodecOnAsyncNotifyCallback) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onAsyncInputAvailable) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AMediaCodecOnAsyncNotifyCallback), - "::", - stringify!(onAsyncInputAvailable) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onAsyncOutputAvailable) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AMediaCodecOnAsyncNotifyCallback), - "::", - stringify!(onAsyncOutputAvailable) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onAsyncFormatChanged) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AMediaCodecOnAsyncNotifyCallback), - "::", - stringify!(onAsyncFormatChanged) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onAsyncError) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(AMediaCodecOnAsyncNotifyCallback), - "::", - stringify!(onAsyncError) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AMediaCodecOnAsyncNotifyCallback"] + [::std::mem::size_of::() - 16usize]; + ["Alignment of AMediaCodecOnAsyncNotifyCallback"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: AMediaCodecOnAsyncNotifyCallback::onAsyncInputAvailable"] + [::std::mem::offset_of!(AMediaCodecOnAsyncNotifyCallback, onAsyncInputAvailable) - 0usize]; + ["Offset of field: AMediaCodecOnAsyncNotifyCallback::onAsyncOutputAvailable"] + [::std::mem::offset_of!(AMediaCodecOnAsyncNotifyCallback, onAsyncOutputAvailable) - 4usize]; + ["Offset of field: AMediaCodecOnAsyncNotifyCallback::onAsyncFormatChanged"] + [::std::mem::offset_of!(AMediaCodecOnAsyncNotifyCallback, onAsyncFormatChanged) - 8usize]; + ["Offset of field: AMediaCodecOnAsyncNotifyCallback::onAsyncError"] + [::std::mem::offset_of!(AMediaCodecOnAsyncNotifyCallback, onAsyncError) - 12usize]; +}; pub type AMediaCodecOnFrameRendered = ::std::option::Option< unsafe extern "C" fn( codec: *mut AMediaCodec, @@ -26146,41 +18460,15 @@ pub struct cryptoinfo_pattern_t { pub encryptBlocks: i32, pub skipBlocks: i32, } -#[test] -fn bindgen_test_layout_cryptoinfo_pattern_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(cryptoinfo_pattern_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(cryptoinfo_pattern_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).encryptBlocks) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cryptoinfo_pattern_t), - "::", - stringify!(encryptBlocks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).skipBlocks) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(cryptoinfo_pattern_t), - "::", - stringify!(skipBlocks) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cryptoinfo_pattern_t"][::std::mem::size_of::() - 8usize]; + ["Alignment of cryptoinfo_pattern_t"][::std::mem::align_of::() - 4usize]; + ["Offset of field: cryptoinfo_pattern_t::encryptBlocks"] + [::std::mem::offset_of!(cryptoinfo_pattern_t, encryptBlocks) - 0usize]; + ["Offset of field: cryptoinfo_pattern_t::skipBlocks"] + [::std::mem::offset_of!(cryptoinfo_pattern_t, skipBlocks) - 4usize]; +}; extern "C" { pub fn AMediaCodecCryptoInfo_new( numsubsamples: ::std::os::raw::c_int, @@ -26319,41 +18607,15 @@ pub struct AMediaDrmByteArray { pub ptr: *const u8, pub length: usize, } -#[test] -fn bindgen_test_layout_AMediaDrmByteArray() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(AMediaDrmByteArray)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AMediaDrmByteArray)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ptr) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AMediaDrmByteArray), - "::", - stringify!(ptr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AMediaDrmByteArray), - "::", - stringify!(length) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AMediaDrmByteArray"][::std::mem::size_of::() - 8usize]; + ["Alignment of AMediaDrmByteArray"][::std::mem::align_of::() - 4usize]; + ["Offset of field: AMediaDrmByteArray::ptr"] + [::std::mem::offset_of!(AMediaDrmByteArray, ptr) - 0usize]; + ["Offset of field: AMediaDrmByteArray::length"] + [::std::mem::offset_of!(AMediaDrmByteArray, length) - 4usize]; +}; pub type AMediaDrmSessionId = AMediaDrmByteArray; pub type AMediaDrmScope = AMediaDrmByteArray; pub type AMediaDrmKeySetId = AMediaDrmByteArray; @@ -26413,42 +18675,16 @@ pub struct AMediaDrmKeyValuePair { pub mKey: *const ::std::os::raw::c_char, pub mValue: *const ::std::os::raw::c_char, } -#[test] -fn bindgen_test_layout_AMediaDrmKeyValuePair() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(AMediaDrmKeyValuePair)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AMediaDrmKeyValuePair)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mKey) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AMediaDrmKeyValuePair), - "::", - stringify!(mKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mValue) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AMediaDrmKeyValuePair), - "::", - stringify!(mValue) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AMediaDrmKeyValuePair"][::std::mem::size_of::() - 8usize]; + ["Alignment of AMediaDrmKeyValuePair"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: AMediaDrmKeyValuePair::mKey"] + [::std::mem::offset_of!(AMediaDrmKeyValuePair, mKey) - 0usize]; + ["Offset of field: AMediaDrmKeyValuePair::mValue"] + [::std::mem::offset_of!(AMediaDrmKeyValuePair, mValue) - 4usize]; +}; pub type AMediaDrmKeyValue = AMediaDrmKeyValuePair; impl AMediaKeyStatusType { pub const KEY_STATUS_TYPE_USABLE: AMediaKeyStatusType = AMediaKeyStatusType(0); @@ -26475,41 +18711,15 @@ pub struct AMediaDrmKeyStatus { pub keyId: AMediaDrmKeyId, pub keyType: AMediaDrmKeyStatusType, } -#[test] -fn bindgen_test_layout_AMediaDrmKeyStatus() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(AMediaDrmKeyStatus)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AMediaDrmKeyStatus)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).keyId) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AMediaDrmKeyStatus), - "::", - stringify!(keyId) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).keyType) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AMediaDrmKeyStatus), - "::", - stringify!(keyType) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AMediaDrmKeyStatus"][::std::mem::size_of::() - 12usize]; + ["Alignment of AMediaDrmKeyStatus"][::std::mem::align_of::() - 4usize]; + ["Offset of field: AMediaDrmKeyStatus::keyId"] + [::std::mem::offset_of!(AMediaDrmKeyStatus, keyId) - 0usize]; + ["Offset of field: AMediaDrmKeyStatus::keyType"] + [::std::mem::offset_of!(AMediaDrmKeyStatus, keyType) - 8usize]; +}; pub type AMediaDrmEventListener = ::std::option::Option< unsafe extern "C" fn( arg1: *mut AMediaDrm, @@ -26835,92 +19045,28 @@ pub struct PsshEntry { pub datalen: usize, pub data: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout_PsshEntry() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(PsshEntry)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(PsshEntry)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uuid) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(PsshEntry), - "::", - stringify!(uuid) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).datalen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(PsshEntry), - "::", - stringify!(datalen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(PsshEntry), - "::", - stringify!(data) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of PsshEntry"][::std::mem::size_of::() - 24usize]; + ["Alignment of PsshEntry"][::std::mem::align_of::() - 4usize]; + ["Offset of field: PsshEntry::uuid"][::std::mem::offset_of!(PsshEntry, uuid) - 0usize]; + ["Offset of field: PsshEntry::datalen"][::std::mem::offset_of!(PsshEntry, datalen) - 16usize]; + ["Offset of field: PsshEntry::data"][::std::mem::offset_of!(PsshEntry, data) - 20usize]; +}; #[repr(C)] #[derive(Debug)] pub struct PsshInfo { pub numentries: usize, pub entries: __IncompleteArrayField, } -#[test] -fn bindgen_test_layout_PsshInfo() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(PsshInfo)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(PsshInfo)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).numentries) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(PsshInfo), - "::", - stringify!(numentries) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).entries) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(PsshInfo), - "::", - stringify!(entries) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of PsshInfo"][::std::mem::size_of::() - 4usize]; + ["Alignment of PsshInfo"][::std::mem::align_of::() - 4usize]; + ["Offset of field: PsshInfo::numentries"] + [::std::mem::offset_of!(PsshInfo, numentries) - 0usize]; + ["Offset of field: PsshInfo::entries"][::std::mem::offset_of!(PsshInfo, entries) - 4usize]; +}; extern "C" { pub fn AMediaExtractor_getPsshInfo(arg1: *mut AMediaExtractor) -> *mut PsshInfo; } diff --git a/ndk-sys/src/ffi_x86_64.rs b/ndk-sys/src/ffi_x86_64.rs index 22fbb911..d39bdac2 100644 --- a/ndk-sys/src/ffi_x86_64.rs +++ b/ndk-sys/src/ffi_x86_64.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.69.4 */ +/* automatically generated by rust-bindgen 0.70.1 */ #[repr(C)] #[derive(Default)] @@ -1387,41 +1387,15 @@ pub struct max_align_t { pub __bindgen_padding_0: u64, pub __clang_max_align_nonce2: u128, } -#[test] -fn bindgen_test_layout_max_align_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(max_align_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 16usize, - concat!("Alignment of ", stringify!(max_align_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__clang_max_align_nonce1) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(max_align_t), - "::", - stringify!(__clang_max_align_nonce1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__clang_max_align_nonce2) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(max_align_t), - "::", - stringify!(__clang_max_align_nonce2) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of max_align_t"][::std::mem::size_of::() - 32usize]; + ["Alignment of max_align_t"][::std::mem::align_of::() - 16usize]; + ["Offset of field: max_align_t::__clang_max_align_nonce1"] + [::std::mem::offset_of!(max_align_t, __clang_max_align_nonce1) - 0usize]; + ["Offset of field: max_align_t::__clang_max_align_nonce2"] + [::std::mem::offset_of!(max_align_t, __clang_max_align_nonce2) - 16usize]; +}; pub type __int8_t = ::std::os::raw::c_schar; pub type __uint8_t = ::std::os::raw::c_uchar; pub type __int16_t = ::std::os::raw::c_short; @@ -1463,31 +1437,13 @@ pub type __u64 = ::std::os::raw::c_ulonglong; pub struct __kernel_fd_set { pub fds_bits: [::std::os::raw::c_ulong; 16usize], } -#[test] -fn bindgen_test_layout___kernel_fd_set() { - const UNINIT: ::std::mem::MaybeUninit<__kernel_fd_set> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__kernel_fd_set>(), - 128usize, - concat!("Size of: ", stringify!(__kernel_fd_set)) - ); - assert_eq!( - ::std::mem::align_of::<__kernel_fd_set>(), - 8usize, - concat!("Alignment of ", stringify!(__kernel_fd_set)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fds_bits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__kernel_fd_set), - "::", - stringify!(fds_bits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __kernel_fd_set"][::std::mem::size_of::<__kernel_fd_set>() - 128usize]; + ["Alignment of __kernel_fd_set"][::std::mem::align_of::<__kernel_fd_set>() - 8usize]; + ["Offset of field: __kernel_fd_set::fds_bits"] + [::std::mem::offset_of!(__kernel_fd_set, fds_bits) - 0usize]; +}; pub type __kernel_sighandler_t = ::std::option::Option; pub type __kernel_key_t = ::std::os::raw::c_int; @@ -1515,31 +1471,13 @@ pub type __kernel_ptrdiff_t = __kernel_long_t; pub struct __kernel_fsid_t { pub val: [::std::os::raw::c_int; 2usize], } -#[test] -fn bindgen_test_layout___kernel_fsid_t() { - const UNINIT: ::std::mem::MaybeUninit<__kernel_fsid_t> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__kernel_fsid_t>(), - 8usize, - concat!("Size of: ", stringify!(__kernel_fsid_t)) - ); - assert_eq!( - ::std::mem::align_of::<__kernel_fsid_t>(), - 4usize, - concat!("Alignment of ", stringify!(__kernel_fsid_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).val) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__kernel_fsid_t), - "::", - stringify!(val) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __kernel_fsid_t"][::std::mem::size_of::<__kernel_fsid_t>() - 8usize]; + ["Alignment of __kernel_fsid_t"][::std::mem::align_of::<__kernel_fsid_t>() - 4usize]; + ["Offset of field: __kernel_fsid_t::val"] + [::std::mem::offset_of!(__kernel_fsid_t, val) - 0usize]; +}; pub type __kernel_off_t = __kernel_long_t; pub type __kernel_loff_t = ::std::os::raw::c_longlong; pub type __kernel_old_time_t = __kernel_long_t; @@ -1573,152 +1511,50 @@ pub struct pthread_attr_t { pub sched_priority: i32, pub __reserved: [::std::os::raw::c_char; 16usize], } -#[test] -fn bindgen_test_layout_pthread_attr_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(pthread_attr_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(pthread_attr_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_attr_t), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).stack_base) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(pthread_attr_t), - "::", - stringify!(stack_base) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).stack_size) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(pthread_attr_t), - "::", - stringify!(stack_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).guard_size) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(pthread_attr_t), - "::", - stringify!(guard_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sched_policy) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(pthread_attr_t), - "::", - stringify!(sched_policy) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sched_priority) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(pthread_attr_t), - "::", - stringify!(sched_priority) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__reserved) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(pthread_attr_t), - "::", - stringify!(__reserved) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of pthread_attr_t"][::std::mem::size_of::() - 56usize]; + ["Alignment of pthread_attr_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: pthread_attr_t::flags"] + [::std::mem::offset_of!(pthread_attr_t, flags) - 0usize]; + ["Offset of field: pthread_attr_t::stack_base"] + [::std::mem::offset_of!(pthread_attr_t, stack_base) - 8usize]; + ["Offset of field: pthread_attr_t::stack_size"] + [::std::mem::offset_of!(pthread_attr_t, stack_size) - 16usize]; + ["Offset of field: pthread_attr_t::guard_size"] + [::std::mem::offset_of!(pthread_attr_t, guard_size) - 24usize]; + ["Offset of field: pthread_attr_t::sched_policy"] + [::std::mem::offset_of!(pthread_attr_t, sched_policy) - 32usize]; + ["Offset of field: pthread_attr_t::sched_priority"] + [::std::mem::offset_of!(pthread_attr_t, sched_priority) - 36usize]; + ["Offset of field: pthread_attr_t::__reserved"] + [::std::mem::offset_of!(pthread_attr_t, __reserved) - 40usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct pthread_barrier_t { pub __private: [i64; 4usize], } -#[test] -fn bindgen_test_layout_pthread_barrier_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(pthread_barrier_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(pthread_barrier_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__private) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_barrier_t), - "::", - stringify!(__private) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of pthread_barrier_t"][::std::mem::size_of::() - 32usize]; + ["Alignment of pthread_barrier_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: pthread_barrier_t::__private"] + [::std::mem::offset_of!(pthread_barrier_t, __private) - 0usize]; +}; pub type pthread_barrierattr_t = ::std::os::raw::c_int; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct pthread_cond_t { pub __private: [i32; 12usize], } -#[test] -fn bindgen_test_layout_pthread_cond_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(pthread_cond_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(pthread_cond_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__private) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_cond_t), - "::", - stringify!(__private) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of pthread_cond_t"][::std::mem::size_of::() - 48usize]; + ["Alignment of pthread_cond_t"][::std::mem::align_of::() - 4usize]; + ["Offset of field: pthread_cond_t::__private"] + [::std::mem::offset_of!(pthread_cond_t, __private) - 0usize]; +}; pub type pthread_condattr_t = ::std::os::raw::c_long; pub type pthread_key_t = ::std::os::raw::c_int; #[repr(C)] @@ -1726,31 +1562,13 @@ pub type pthread_key_t = ::std::os::raw::c_int; pub struct pthread_mutex_t { pub __private: [i32; 10usize], } -#[test] -fn bindgen_test_layout_pthread_mutex_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(pthread_mutex_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(pthread_mutex_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__private) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_mutex_t), - "::", - stringify!(__private) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of pthread_mutex_t"][::std::mem::size_of::() - 40usize]; + ["Alignment of pthread_mutex_t"][::std::mem::align_of::() - 4usize]; + ["Offset of field: pthread_mutex_t::__private"] + [::std::mem::offset_of!(pthread_mutex_t, __private) - 0usize]; +}; pub type pthread_mutexattr_t = ::std::os::raw::c_long; pub type pthread_once_t = ::std::os::raw::c_int; #[repr(C)] @@ -1758,62 +1576,26 @@ pub type pthread_once_t = ::std::os::raw::c_int; pub struct pthread_rwlock_t { pub __private: [i32; 14usize], } -#[test] -fn bindgen_test_layout_pthread_rwlock_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(pthread_rwlock_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(pthread_rwlock_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__private) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_rwlock_t), - "::", - stringify!(__private) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of pthread_rwlock_t"][::std::mem::size_of::() - 56usize]; + ["Alignment of pthread_rwlock_t"][::std::mem::align_of::() - 4usize]; + ["Offset of field: pthread_rwlock_t::__private"] + [::std::mem::offset_of!(pthread_rwlock_t, __private) - 0usize]; +}; pub type pthread_rwlockattr_t = ::std::os::raw::c_long; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct pthread_spinlock_t { pub __private: i64, } -#[test] -fn bindgen_test_layout_pthread_spinlock_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(pthread_spinlock_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(pthread_spinlock_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__private) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_spinlock_t), - "::", - stringify!(__private) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of pthread_spinlock_t"][::std::mem::size_of::() - 8usize]; + ["Alignment of pthread_spinlock_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: pthread_spinlock_t::__private"] + [::std::mem::offset_of!(pthread_spinlock_t, __private) - 0usize]; +}; pub type pthread_t = ::std::os::raw::c_long; pub type __gid_t = __kernel_gid32_t; pub type gid_t = __gid_t; @@ -1968,92 +1750,32 @@ pub struct JavaVMAttachArgs { pub name: *const ::std::os::raw::c_char, pub group: jobject, } -#[test] -fn bindgen_test_layout_JavaVMAttachArgs() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(JavaVMAttachArgs)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(JavaVMAttachArgs)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(JavaVMAttachArgs), - "::", - stringify!(version) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(JavaVMAttachArgs), - "::", - stringify!(name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).group) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(JavaVMAttachArgs), - "::", - stringify!(group) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of JavaVMAttachArgs"][::std::mem::size_of::() - 24usize]; + ["Alignment of JavaVMAttachArgs"][::std::mem::align_of::() - 8usize]; + ["Offset of field: JavaVMAttachArgs::version"] + [::std::mem::offset_of!(JavaVMAttachArgs, version) - 0usize]; + ["Offset of field: JavaVMAttachArgs::name"] + [::std::mem::offset_of!(JavaVMAttachArgs, name) - 8usize]; + ["Offset of field: JavaVMAttachArgs::group"] + [::std::mem::offset_of!(JavaVMAttachArgs, group) - 16usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct JavaVMOption { pub optionString: *const ::std::os::raw::c_char, pub extraInfo: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout_JavaVMOption() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(JavaVMOption)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(JavaVMOption)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).optionString) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(JavaVMOption), - "::", - stringify!(optionString) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).extraInfo) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(JavaVMOption), - "::", - stringify!(extraInfo) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of JavaVMOption"][::std::mem::size_of::() - 16usize]; + ["Alignment of JavaVMOption"][::std::mem::align_of::() - 8usize]; + ["Offset of field: JavaVMOption::optionString"] + [::std::mem::offset_of!(JavaVMOption, optionString) - 0usize]; + ["Offset of field: JavaVMOption::extraInfo"] + [::std::mem::offset_of!(JavaVMOption, extraInfo) - 8usize]; +}; #[repr(C)] pub struct JavaVMInitArgs { pub version: jint, @@ -2061,61 +1783,19 @@ pub struct JavaVMInitArgs { pub options: *mut JavaVMOption, pub ignoreUnrecognized: jboolean, } -#[test] -fn bindgen_test_layout_JavaVMInitArgs() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(JavaVMInitArgs)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(JavaVMInitArgs)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(JavaVMInitArgs), - "::", - stringify!(version) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nOptions) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(JavaVMInitArgs), - "::", - stringify!(nOptions) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).options) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(JavaVMInitArgs), - "::", - stringify!(options) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ignoreUnrecognized) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(JavaVMInitArgs), - "::", - stringify!(ignoreUnrecognized) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of JavaVMInitArgs"][::std::mem::size_of::() - 24usize]; + ["Alignment of JavaVMInitArgs"][::std::mem::align_of::() - 8usize]; + ["Offset of field: JavaVMInitArgs::version"] + [::std::mem::offset_of!(JavaVMInitArgs, version) - 0usize]; + ["Offset of field: JavaVMInitArgs::nOptions"] + [::std::mem::offset_of!(JavaVMInitArgs, nOptions) - 4usize]; + ["Offset of field: JavaVMInitArgs::options"] + [::std::mem::offset_of!(JavaVMInitArgs, options) - 8usize]; + ["Offset of field: JavaVMInitArgs::ignoreUnrecognized"] + [::std::mem::offset_of!(JavaVMInitArgs, ignoreUnrecognized) - 16usize]; +}; extern "C" { pub fn AAssetManager_fromJava(env: *mut JNIEnv, assetManager: jobject) -> *mut AAssetManager; } @@ -2165,71 +1845,21 @@ pub struct AndroidBitmapInfo { pub format: i32, pub flags: u32, } -#[test] -fn bindgen_test_layout_AndroidBitmapInfo() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 20usize, - concat!("Size of: ", stringify!(AndroidBitmapInfo)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AndroidBitmapInfo)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AndroidBitmapInfo), - "::", - stringify!(width) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AndroidBitmapInfo), - "::", - stringify!(height) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).stride) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AndroidBitmapInfo), - "::", - stringify!(stride) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).format) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(AndroidBitmapInfo), - "::", - stringify!(format) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AndroidBitmapInfo), - "::", - stringify!(flags) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AndroidBitmapInfo"][::std::mem::size_of::() - 20usize]; + ["Alignment of AndroidBitmapInfo"][::std::mem::align_of::() - 4usize]; + ["Offset of field: AndroidBitmapInfo::width"] + [::std::mem::offset_of!(AndroidBitmapInfo, width) - 0usize]; + ["Offset of field: AndroidBitmapInfo::height"] + [::std::mem::offset_of!(AndroidBitmapInfo, height) - 4usize]; + ["Offset of field: AndroidBitmapInfo::stride"] + [::std::mem::offset_of!(AndroidBitmapInfo, stride) - 8usize]; + ["Offset of field: AndroidBitmapInfo::format"] + [::std::mem::offset_of!(AndroidBitmapInfo, format) - 12usize]; + ["Offset of field: AndroidBitmapInfo::flags"] + [::std::mem::offset_of!(AndroidBitmapInfo, flags) - 16usize]; +}; extern "C" { pub fn AndroidBitmap_getInfo( env: *mut JNIEnv, @@ -2684,41 +2314,13 @@ pub struct imaxdiv_t { pub quot: intmax_t, pub rem: intmax_t, } -#[test] -fn bindgen_test_layout_imaxdiv_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(imaxdiv_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(imaxdiv_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).quot) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(imaxdiv_t), - "::", - stringify!(quot) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rem) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(imaxdiv_t), - "::", - stringify!(rem) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of imaxdiv_t"][::std::mem::size_of::() - 16usize]; + ["Alignment of imaxdiv_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: imaxdiv_t::quot"][::std::mem::offset_of!(imaxdiv_t, quot) - 0usize]; + ["Offset of field: imaxdiv_t::rem"][::std::mem::offset_of!(imaxdiv_t, rem) - 8usize]; +}; extern "C" { pub fn imaxabs(__i: intmax_t) -> intmax_t; } @@ -2924,91 +2526,25 @@ pub struct android_dlextinfo { pub library_fd_offset: off64_t, pub library_namespace: *mut android_namespace_t, } -#[test] -fn bindgen_test_layout_android_dlextinfo() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(android_dlextinfo)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(android_dlextinfo)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(android_dlextinfo), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved_addr) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(android_dlextinfo), - "::", - stringify!(reserved_addr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved_size) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(android_dlextinfo), - "::", - stringify!(reserved_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).relro_fd) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(android_dlextinfo), - "::", - stringify!(relro_fd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).library_fd) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(android_dlextinfo), - "::", - stringify!(library_fd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).library_fd_offset) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(android_dlextinfo), - "::", - stringify!(library_fd_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).library_namespace) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(android_dlextinfo), - "::", - stringify!(library_namespace) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of android_dlextinfo"][::std::mem::size_of::() - 48usize]; + ["Alignment of android_dlextinfo"][::std::mem::align_of::() - 8usize]; + ["Offset of field: android_dlextinfo::flags"] + [::std::mem::offset_of!(android_dlextinfo, flags) - 0usize]; + ["Offset of field: android_dlextinfo::reserved_addr"] + [::std::mem::offset_of!(android_dlextinfo, reserved_addr) - 8usize]; + ["Offset of field: android_dlextinfo::reserved_size"] + [::std::mem::offset_of!(android_dlextinfo, reserved_size) - 16usize]; + ["Offset of field: android_dlextinfo::relro_fd"] + [::std::mem::offset_of!(android_dlextinfo, relro_fd) - 24usize]; + ["Offset of field: android_dlextinfo::library_fd"] + [::std::mem::offset_of!(android_dlextinfo, library_fd) - 28usize]; + ["Offset of field: android_dlextinfo::library_fd_offset"] + [::std::mem::offset_of!(android_dlextinfo, library_fd_offset) - 32usize]; + ["Offset of field: android_dlextinfo::library_namespace"] + [::std::mem::offset_of!(android_dlextinfo, library_namespace) - 40usize]; +}; extern "C" { pub fn android_dlopen_ext( __filename: *const ::std::os::raw::c_char, @@ -3242,61 +2778,15 @@ pub struct ARect { pub right: i32, pub bottom: i32, } -#[test] -fn bindgen_test_layout_ARect() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(ARect)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(ARect)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).left) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ARect), - "::", - stringify!(left) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).top) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ARect), - "::", - stringify!(top) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).right) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ARect), - "::", - stringify!(right) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bottom) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(ARect), - "::", - stringify!(bottom) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ARect"][::std::mem::size_of::() - 16usize]; + ["Alignment of ARect"][::std::mem::align_of::() - 4usize]; + ["Offset of field: ARect::left"][::std::mem::offset_of!(ARect, left) - 0usize]; + ["Offset of field: ARect::top"][::std::mem::offset_of!(ARect, top) - 4usize]; + ["Offset of field: ARect::right"][::std::mem::offset_of!(ARect, right) - 8usize]; + ["Offset of field: ARect::bottom"][::std::mem::offset_of!(ARect, bottom) - 12usize]; +}; impl AHardwareBuffer_Format { pub const AHARDWAREBUFFER_FORMAT_R8G8B8A8_UNORM: AHardwareBuffer_Format = AHardwareBuffer_Format(1); @@ -3540,101 +3030,27 @@ pub struct AHardwareBuffer_Desc { pub rfu0: u32, pub rfu1: u64, } -#[test] -fn bindgen_test_layout_AHardwareBuffer_Desc() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(AHardwareBuffer_Desc)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AHardwareBuffer_Desc)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Desc), - "::", - stringify!(width) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Desc), - "::", - stringify!(height) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).layers) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Desc), - "::", - stringify!(layers) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).format) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Desc), - "::", - stringify!(format) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).usage) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Desc), - "::", - stringify!(usage) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).stride) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Desc), - "::", - stringify!(stride) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rfu0) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Desc), - "::", - stringify!(rfu0) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rfu1) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Desc), - "::", - stringify!(rfu1) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AHardwareBuffer_Desc"][::std::mem::size_of::() - 40usize]; + ["Alignment of AHardwareBuffer_Desc"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AHardwareBuffer_Desc::width"] + [::std::mem::offset_of!(AHardwareBuffer_Desc, width) - 0usize]; + ["Offset of field: AHardwareBuffer_Desc::height"] + [::std::mem::offset_of!(AHardwareBuffer_Desc, height) - 4usize]; + ["Offset of field: AHardwareBuffer_Desc::layers"] + [::std::mem::offset_of!(AHardwareBuffer_Desc, layers) - 8usize]; + ["Offset of field: AHardwareBuffer_Desc::format"] + [::std::mem::offset_of!(AHardwareBuffer_Desc, format) - 12usize]; + ["Offset of field: AHardwareBuffer_Desc::usage"] + [::std::mem::offset_of!(AHardwareBuffer_Desc, usage) - 16usize]; + ["Offset of field: AHardwareBuffer_Desc::stride"] + [::std::mem::offset_of!(AHardwareBuffer_Desc, stride) - 24usize]; + ["Offset of field: AHardwareBuffer_Desc::rfu0"] + [::std::mem::offset_of!(AHardwareBuffer_Desc, rfu0) - 28usize]; + ["Offset of field: AHardwareBuffer_Desc::rfu1"] + [::std::mem::offset_of!(AHardwareBuffer_Desc, rfu1) - 32usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct AHardwareBuffer_Plane { @@ -3642,94 +3058,34 @@ pub struct AHardwareBuffer_Plane { pub pixelStride: u32, pub rowStride: u32, } -#[test] -fn bindgen_test_layout_AHardwareBuffer_Plane() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(AHardwareBuffer_Plane)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AHardwareBuffer_Plane)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Plane), - "::", - stringify!(data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pixelStride) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Plane), - "::", - stringify!(pixelStride) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rowStride) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Plane), - "::", - stringify!(rowStride) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AHardwareBuffer_Plane"][::std::mem::size_of::() - 16usize]; + ["Alignment of AHardwareBuffer_Plane"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: AHardwareBuffer_Plane::data"] + [::std::mem::offset_of!(AHardwareBuffer_Plane, data) - 0usize]; + ["Offset of field: AHardwareBuffer_Plane::pixelStride"] + [::std::mem::offset_of!(AHardwareBuffer_Plane, pixelStride) - 8usize]; + ["Offset of field: AHardwareBuffer_Plane::rowStride"] + [::std::mem::offset_of!(AHardwareBuffer_Plane, rowStride) - 12usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct AHardwareBuffer_Planes { pub planeCount: u32, pub planes: [AHardwareBuffer_Plane; 4usize], } -#[test] -fn bindgen_test_layout_AHardwareBuffer_Planes() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!("Size of: ", stringify!(AHardwareBuffer_Planes)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AHardwareBuffer_Planes)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).planeCount) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Planes), - "::", - stringify!(planeCount) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).planes) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Planes), - "::", - stringify!(planes) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AHardwareBuffer_Planes"][::std::mem::size_of::() - 72usize]; + ["Alignment of AHardwareBuffer_Planes"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: AHardwareBuffer_Planes::planeCount"] + [::std::mem::offset_of!(AHardwareBuffer_Planes, planeCount) - 0usize]; + ["Offset of field: AHardwareBuffer_Planes::planes"] + [::std::mem::offset_of!(AHardwareBuffer_Planes, planes) - 8usize]; +}; extern "C" { pub fn AHardwareBuffer_allocate( desc: *const AHardwareBuffer_Desc, @@ -3834,41 +3190,13 @@ pub struct AColor_xy { pub x: f32, pub y: f32, } -#[test] -fn bindgen_test_layout_AColor_xy() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(AColor_xy)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AColor_xy)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AColor_xy), - "::", - stringify!(x) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AColor_xy), - "::", - stringify!(y) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AColor_xy"][::std::mem::size_of::() - 8usize]; + ["Alignment of AColor_xy"][::std::mem::align_of::() - 4usize]; + ["Offset of field: AColor_xy::x"][::std::mem::offset_of!(AColor_xy, x) - 0usize]; + ["Offset of field: AColor_xy::y"][::std::mem::offset_of!(AColor_xy, y) - 4usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct AHdrMetadata_smpte2086 { @@ -3879,124 +3207,40 @@ pub struct AHdrMetadata_smpte2086 { pub maxLuminance: f32, pub minLuminance: f32, } -#[test] -fn bindgen_test_layout_AHdrMetadata_smpte2086() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(AHdrMetadata_smpte2086)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AHdrMetadata_smpte2086)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).displayPrimaryRed) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AHdrMetadata_smpte2086), - "::", - stringify!(displayPrimaryRed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).displayPrimaryGreen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AHdrMetadata_smpte2086), - "::", - stringify!(displayPrimaryGreen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).displayPrimaryBlue) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AHdrMetadata_smpte2086), - "::", - stringify!(displayPrimaryBlue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).whitePoint) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(AHdrMetadata_smpte2086), - "::", - stringify!(whitePoint) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).maxLuminance) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(AHdrMetadata_smpte2086), - "::", - stringify!(maxLuminance) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).minLuminance) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(AHdrMetadata_smpte2086), - "::", - stringify!(minLuminance) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AHdrMetadata_smpte2086"][::std::mem::size_of::() - 40usize]; + ["Alignment of AHdrMetadata_smpte2086"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: AHdrMetadata_smpte2086::displayPrimaryRed"] + [::std::mem::offset_of!(AHdrMetadata_smpte2086, displayPrimaryRed) - 0usize]; + ["Offset of field: AHdrMetadata_smpte2086::displayPrimaryGreen"] + [::std::mem::offset_of!(AHdrMetadata_smpte2086, displayPrimaryGreen) - 8usize]; + ["Offset of field: AHdrMetadata_smpte2086::displayPrimaryBlue"] + [::std::mem::offset_of!(AHdrMetadata_smpte2086, displayPrimaryBlue) - 16usize]; + ["Offset of field: AHdrMetadata_smpte2086::whitePoint"] + [::std::mem::offset_of!(AHdrMetadata_smpte2086, whitePoint) - 24usize]; + ["Offset of field: AHdrMetadata_smpte2086::maxLuminance"] + [::std::mem::offset_of!(AHdrMetadata_smpte2086, maxLuminance) - 32usize]; + ["Offset of field: AHdrMetadata_smpte2086::minLuminance"] + [::std::mem::offset_of!(AHdrMetadata_smpte2086, minLuminance) - 36usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct AHdrMetadata_cta861_3 { pub maxContentLightLevel: f32, pub maxFrameAverageLightLevel: f32, } -#[test] -fn bindgen_test_layout_AHdrMetadata_cta861_3() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(AHdrMetadata_cta861_3)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AHdrMetadata_cta861_3)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).maxContentLightLevel) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AHdrMetadata_cta861_3), - "::", - stringify!(maxContentLightLevel) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).maxFrameAverageLightLevel) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AHdrMetadata_cta861_3), - "::", - stringify!(maxFrameAverageLightLevel) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AHdrMetadata_cta861_3"][::std::mem::size_of::() - 8usize]; + ["Alignment of AHdrMetadata_cta861_3"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: AHdrMetadata_cta861_3::maxContentLightLevel"] + [::std::mem::offset_of!(AHdrMetadata_cta861_3, maxContentLightLevel) - 0usize]; + ["Offset of field: AHdrMetadata_cta861_3::maxFrameAverageLightLevel"] + [::std::mem::offset_of!(AHdrMetadata_cta861_3, maxFrameAverageLightLevel) - 4usize]; +}; pub const ANDROID_IMAGE_DECODER_SUCCESS: _bindgen_ty_9 = 0; pub const ANDROID_IMAGE_DECODER_INCOMPLETE: _bindgen_ty_9 = -1; pub const ANDROID_IMAGE_DECODER_ERROR: _bindgen_ty_9 = -2; @@ -5181,92 +4425,26 @@ pub struct __android_log_message { pub line: u32, pub message: *const ::std::os::raw::c_char, } -#[test] -fn bindgen_test_layout___android_log_message() { - const UNINIT: ::std::mem::MaybeUninit<__android_log_message> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__android_log_message>(), - 48usize, - concat!("Size of: ", stringify!(__android_log_message)) - ); - assert_eq!( - ::std::mem::align_of::<__android_log_message>(), - 8usize, - concat!("Alignment of ", stringify!(__android_log_message)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).struct_size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__android_log_message), - "::", - stringify!(struct_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).buffer_id) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__android_log_message), - "::", - stringify!(buffer_id) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).priority) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(__android_log_message), - "::", - stringify!(priority) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tag) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__android_log_message), - "::", - stringify!(tag) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).file) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(__android_log_message), - "::", - stringify!(file) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).line) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(__android_log_message), - "::", - stringify!(line) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).message) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(__android_log_message), - "::", - stringify!(message) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __android_log_message"][::std::mem::size_of::<__android_log_message>() - 48usize]; + ["Alignment of __android_log_message"] + [::std::mem::align_of::<__android_log_message>() - 8usize]; + ["Offset of field: __android_log_message::struct_size"] + [::std::mem::offset_of!(__android_log_message, struct_size) - 0usize]; + ["Offset of field: __android_log_message::buffer_id"] + [::std::mem::offset_of!(__android_log_message, buffer_id) - 8usize]; + ["Offset of field: __android_log_message::priority"] + [::std::mem::offset_of!(__android_log_message, priority) - 12usize]; + ["Offset of field: __android_log_message::tag"] + [::std::mem::offset_of!(__android_log_message, tag) - 16usize]; + ["Offset of field: __android_log_message::file"] + [::std::mem::offset_of!(__android_log_message, file) - 24usize]; + ["Offset of field: __android_log_message::line"] + [::std::mem::offset_of!(__android_log_message, line) - 32usize]; + ["Offset of field: __android_log_message::message"] + [::std::mem::offset_of!(__android_log_message, message) - 40usize]; +}; pub type __android_logger_function = ::std::option::Option; pub type __android_aborter_function = @@ -5325,71 +4503,16 @@ pub struct flock { pub l_len: off64_t, pub l_pid: pid_t, } -#[test] -fn bindgen_test_layout_flock() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(flock)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(flock)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).l_type) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(flock), - "::", - stringify!(l_type) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).l_whence) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(flock), - "::", - stringify!(l_whence) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).l_start) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(flock), - "::", - stringify!(l_start) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).l_len) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(flock), - "::", - stringify!(l_len) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).l_pid) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(flock), - "::", - stringify!(l_pid) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of flock"][::std::mem::size_of::() - 32usize]; + ["Alignment of flock"][::std::mem::align_of::() - 8usize]; + ["Offset of field: flock::l_type"][::std::mem::offset_of!(flock, l_type) - 0usize]; + ["Offset of field: flock::l_whence"][::std::mem::offset_of!(flock, l_whence) - 2usize]; + ["Offset of field: flock::l_start"][::std::mem::offset_of!(flock, l_start) - 8usize]; + ["Offset of field: flock::l_len"][::std::mem::offset_of!(flock, l_len) - 16usize]; + ["Offset of field: flock::l_pid"][::std::mem::offset_of!(flock, l_pid) - 24usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct flock64 { @@ -5399,153 +4522,42 @@ pub struct flock64 { pub l_len: off64_t, pub l_pid: pid_t, } -#[test] -fn bindgen_test_layout_flock64() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(flock64)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(flock64)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).l_type) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(flock64), - "::", - stringify!(l_type) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).l_whence) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(flock64), - "::", - stringify!(l_whence) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).l_start) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(flock64), - "::", - stringify!(l_start) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).l_len) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(flock64), - "::", - stringify!(l_len) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).l_pid) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(flock64), - "::", - stringify!(l_pid) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of flock64"][::std::mem::size_of::() - 32usize]; + ["Alignment of flock64"][::std::mem::align_of::() - 8usize]; + ["Offset of field: flock64::l_type"][::std::mem::offset_of!(flock64, l_type) - 0usize]; + ["Offset of field: flock64::l_whence"][::std::mem::offset_of!(flock64, l_whence) - 2usize]; + ["Offset of field: flock64::l_start"][::std::mem::offset_of!(flock64, l_start) - 8usize]; + ["Offset of field: flock64::l_len"][::std::mem::offset_of!(flock64, l_len) - 16usize]; + ["Offset of field: flock64::l_pid"][::std::mem::offset_of!(flock64, l_pid) - 24usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct f_owner_ex { pub type_: ::std::os::raw::c_int, pub pid: __kernel_pid_t, } -#[test] -fn bindgen_test_layout_f_owner_ex() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(f_owner_ex)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(f_owner_ex)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(f_owner_ex), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pid) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(f_owner_ex), - "::", - stringify!(pid) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of f_owner_ex"][::std::mem::size_of::() - 8usize]; + ["Alignment of f_owner_ex"][::std::mem::align_of::() - 4usize]; + ["Offset of field: f_owner_ex::type_"][::std::mem::offset_of!(f_owner_ex, type_) - 0usize]; + ["Offset of field: f_owner_ex::pid"][::std::mem::offset_of!(f_owner_ex, pid) - 4usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct iovec { pub iov_base: *mut ::std::os::raw::c_void, pub iov_len: __kernel_size_t, } -#[test] -fn bindgen_test_layout_iovec() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(iovec)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(iovec)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iov_base) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(iovec), - "::", - stringify!(iov_base) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iov_len) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(iovec), - "::", - stringify!(iov_len) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of iovec"][::std::mem::size_of::() - 16usize]; + ["Alignment of iovec"][::std::mem::align_of::() - 8usize]; + ["Offset of field: iovec::iov_base"][::std::mem::offset_of!(iovec, iov_base) - 0usize]; + ["Offset of field: iovec::iov_len"][::std::mem::offset_of!(iovec, iov_len) - 8usize]; +}; pub type sa_family_t = ::std::os::raw::c_ushort; #[repr(C)] #[derive(Copy, Clone)] @@ -5564,87 +4576,31 @@ pub struct sockaddr_storage__bindgen_ty_1__bindgen_ty_1 { pub ss_family: sa_family_t, pub __data: [::std::os::raw::c_char; 126usize], } -#[test] -fn bindgen_test_layout_sockaddr_storage__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 128usize, - concat!( - "Size of: ", - stringify!(sockaddr_storage__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 2usize, - concat!( - "Alignment of ", - stringify!(sockaddr_storage__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ss_family) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sockaddr_storage__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(ss_family) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__data) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(sockaddr_storage__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(__data) - ) - ); -} -#[test] -fn bindgen_test_layout_sockaddr_storage__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 128usize, - concat!("Size of: ", stringify!(sockaddr_storage__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(sockaddr_storage__bindgen_ty_1)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__align) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sockaddr_storage__bindgen_ty_1), - "::", - stringify!(__align) - ) - ); -} -#[test] -fn bindgen_test_layout_sockaddr_storage() { - assert_eq!( - ::std::mem::size_of::(), - 128usize, - concat!("Size of: ", stringify!(sockaddr_storage)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(sockaddr_storage)) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sockaddr_storage__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::size_of::() - 128usize]; + ["Alignment of sockaddr_storage__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::align_of::() - 2usize]; + ["Offset of field: sockaddr_storage__bindgen_ty_1__bindgen_ty_1::ss_family"] + [::std::mem::offset_of!(sockaddr_storage__bindgen_ty_1__bindgen_ty_1, ss_family) - 0usize]; + ["Offset of field: sockaddr_storage__bindgen_ty_1__bindgen_ty_1::__data"] + [::std::mem::offset_of!(sockaddr_storage__bindgen_ty_1__bindgen_ty_1, __data) - 2usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sockaddr_storage__bindgen_ty_1"] + [::std::mem::size_of::() - 128usize]; + ["Alignment of sockaddr_storage__bindgen_ty_1"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: sockaddr_storage__bindgen_ty_1::__align"] + [::std::mem::offset_of!(sockaddr_storage__bindgen_ty_1, __align) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sockaddr_storage"][::std::mem::size_of::() - 128usize]; + ["Alignment of sockaddr_storage"][::std::mem::align_of::() - 8usize]; +}; pub const SHUT_RD: _bindgen_ty_32 = 0; pub const SHUT_WR: _bindgen_ty_32 = 1; pub const SHUT_RDWR: _bindgen_ty_32 = 2; @@ -5655,82 +4611,26 @@ pub struct sockaddr { pub sa_family: sa_family_t, pub sa_data: [::std::os::raw::c_char; 14usize], } -#[test] -fn bindgen_test_layout_sockaddr() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(sockaddr)) - ); - assert_eq!( - ::std::mem::align_of::(), - 2usize, - concat!("Alignment of ", stringify!(sockaddr)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sa_family) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sockaddr), - "::", - stringify!(sa_family) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sa_data) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(sockaddr), - "::", - stringify!(sa_data) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sockaddr"][::std::mem::size_of::() - 16usize]; + ["Alignment of sockaddr"][::std::mem::align_of::() - 2usize]; + ["Offset of field: sockaddr::sa_family"][::std::mem::offset_of!(sockaddr, sa_family) - 0usize]; + ["Offset of field: sockaddr::sa_data"][::std::mem::offset_of!(sockaddr, sa_data) - 2usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct linger { pub l_onoff: ::std::os::raw::c_int, pub l_linger: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_linger() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(linger)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(linger)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).l_onoff) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(linger), - "::", - stringify!(l_onoff) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).l_linger) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(linger), - "::", - stringify!(l_linger) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of linger"][::std::mem::size_of::() - 8usize]; + ["Alignment of linger"][::std::mem::align_of::() - 4usize]; + ["Offset of field: linger::l_onoff"][::std::mem::offset_of!(linger, l_onoff) - 0usize]; + ["Offset of field: linger::l_linger"][::std::mem::offset_of!(linger, l_linger) - 4usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct msghdr { @@ -5742,132 +4642,32 @@ pub struct msghdr { pub msg_controllen: usize, pub msg_flags: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_msghdr() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(msghdr)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(msghdr)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).msg_name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(msghdr), - "::", - stringify!(msg_name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).msg_namelen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(msghdr), - "::", - stringify!(msg_namelen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).msg_iov) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(msghdr), - "::", - stringify!(msg_iov) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).msg_iovlen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(msghdr), - "::", - stringify!(msg_iovlen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).msg_control) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(msghdr), - "::", - stringify!(msg_control) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).msg_controllen) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(msghdr), - "::", - stringify!(msg_controllen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).msg_flags) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(msghdr), - "::", - stringify!(msg_flags) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of msghdr"][::std::mem::size_of::() - 56usize]; + ["Alignment of msghdr"][::std::mem::align_of::() - 8usize]; + ["Offset of field: msghdr::msg_name"][::std::mem::offset_of!(msghdr, msg_name) - 0usize]; + ["Offset of field: msghdr::msg_namelen"][::std::mem::offset_of!(msghdr, msg_namelen) - 8usize]; + ["Offset of field: msghdr::msg_iov"][::std::mem::offset_of!(msghdr, msg_iov) - 16usize]; + ["Offset of field: msghdr::msg_iovlen"][::std::mem::offset_of!(msghdr, msg_iovlen) - 24usize]; + ["Offset of field: msghdr::msg_control"][::std::mem::offset_of!(msghdr, msg_control) - 32usize]; + ["Offset of field: msghdr::msg_controllen"] + [::std::mem::offset_of!(msghdr, msg_controllen) - 40usize]; + ["Offset of field: msghdr::msg_flags"][::std::mem::offset_of!(msghdr, msg_flags) - 48usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct mmsghdr { pub msg_hdr: msghdr, pub msg_len: ::std::os::raw::c_uint, } -#[test] -fn bindgen_test_layout_mmsghdr() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(mmsghdr)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(mmsghdr)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).msg_hdr) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(mmsghdr), - "::", - stringify!(msg_hdr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).msg_len) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(mmsghdr), - "::", - stringify!(msg_len) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of mmsghdr"][::std::mem::size_of::() - 64usize]; + ["Alignment of mmsghdr"][::std::mem::align_of::() - 8usize]; + ["Offset of field: mmsghdr::msg_hdr"][::std::mem::offset_of!(mmsghdr, msg_hdr) - 0usize]; + ["Offset of field: mmsghdr::msg_len"][::std::mem::offset_of!(mmsghdr, msg_len) - 56usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct cmsghdr { @@ -5875,51 +4675,14 @@ pub struct cmsghdr { pub cmsg_level: ::std::os::raw::c_int, pub cmsg_type: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_cmsghdr() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(cmsghdr)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(cmsghdr)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cmsg_len) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cmsghdr), - "::", - stringify!(cmsg_len) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cmsg_level) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cmsghdr), - "::", - stringify!(cmsg_level) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cmsg_type) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(cmsghdr), - "::", - stringify!(cmsg_type) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cmsghdr"][::std::mem::size_of::() - 16usize]; + ["Alignment of cmsghdr"][::std::mem::align_of::() - 8usize]; + ["Offset of field: cmsghdr::cmsg_len"][::std::mem::offset_of!(cmsghdr, cmsg_len) - 0usize]; + ["Offset of field: cmsghdr::cmsg_level"][::std::mem::offset_of!(cmsghdr, cmsg_level) - 8usize]; + ["Offset of field: cmsghdr::cmsg_type"][::std::mem::offset_of!(cmsghdr, cmsg_type) - 12usize]; +}; extern "C" { pub fn __cmsg_nxthdr(__msg: *mut msghdr, __cmsg: *mut cmsghdr) -> *mut cmsghdr; } @@ -5930,51 +4693,14 @@ pub struct ucred { pub uid: uid_t, pub gid: gid_t, } -#[test] -fn bindgen_test_layout_ucred() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(ucred)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(ucred)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pid) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ucred), - "::", - stringify!(pid) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uid) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ucred), - "::", - stringify!(uid) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gid) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ucred), - "::", - stringify!(gid) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ucred"][::std::mem::size_of::() - 12usize]; + ["Alignment of ucred"][::std::mem::align_of::() - 4usize]; + ["Offset of field: ucred::pid"][::std::mem::offset_of!(ucred, pid) - 0usize]; + ["Offset of field: ucred::uid"][::std::mem::offset_of!(ucred, uid) - 4usize]; + ["Offset of field: ucred::gid"][::std::mem::offset_of!(ucred, gid) - 8usize]; +}; extern "C" { pub fn accept( __fd: ::std::os::raw::c_int, @@ -6139,71 +4865,17 @@ pub struct hostent { pub h_length: ::std::os::raw::c_int, pub h_addr_list: *mut *mut ::std::os::raw::c_char, } -#[test] -fn bindgen_test_layout_hostent() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(hostent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(hostent)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).h_name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(hostent), - "::", - stringify!(h_name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).h_aliases) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(hostent), - "::", - stringify!(h_aliases) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).h_addrtype) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(hostent), - "::", - stringify!(h_addrtype) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).h_length) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(hostent), - "::", - stringify!(h_length) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).h_addr_list) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(hostent), - "::", - stringify!(h_addr_list) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of hostent"][::std::mem::size_of::() - 32usize]; + ["Alignment of hostent"][::std::mem::align_of::() - 8usize]; + ["Offset of field: hostent::h_name"][::std::mem::offset_of!(hostent, h_name) - 0usize]; + ["Offset of field: hostent::h_aliases"][::std::mem::offset_of!(hostent, h_aliases) - 8usize]; + ["Offset of field: hostent::h_addrtype"][::std::mem::offset_of!(hostent, h_addrtype) - 16usize]; + ["Offset of field: hostent::h_length"][::std::mem::offset_of!(hostent, h_length) - 20usize]; + ["Offset of field: hostent::h_addr_list"] + [::std::mem::offset_of!(hostent, h_addr_list) - 24usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct netent { @@ -6212,61 +4884,15 @@ pub struct netent { pub n_addrtype: ::std::os::raw::c_int, pub n_net: u32, } -#[test] -fn bindgen_test_layout_netent() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(netent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(netent)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).n_name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(netent), - "::", - stringify!(n_name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).n_aliases) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(netent), - "::", - stringify!(n_aliases) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).n_addrtype) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(netent), - "::", - stringify!(n_addrtype) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).n_net) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(netent), - "::", - stringify!(n_net) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of netent"][::std::mem::size_of::() - 24usize]; + ["Alignment of netent"][::std::mem::align_of::() - 8usize]; + ["Offset of field: netent::n_name"][::std::mem::offset_of!(netent, n_name) - 0usize]; + ["Offset of field: netent::n_aliases"][::std::mem::offset_of!(netent, n_aliases) - 8usize]; + ["Offset of field: netent::n_addrtype"][::std::mem::offset_of!(netent, n_addrtype) - 16usize]; + ["Offset of field: netent::n_net"][::std::mem::offset_of!(netent, n_net) - 20usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct servent { @@ -6275,61 +4901,15 @@ pub struct servent { pub s_port: ::std::os::raw::c_int, pub s_proto: *mut ::std::os::raw::c_char, } -#[test] -fn bindgen_test_layout_servent() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(servent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(servent)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).s_name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(servent), - "::", - stringify!(s_name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).s_aliases) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(servent), - "::", - stringify!(s_aliases) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).s_port) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(servent), - "::", - stringify!(s_port) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).s_proto) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(servent), - "::", - stringify!(s_proto) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of servent"][::std::mem::size_of::() - 32usize]; + ["Alignment of servent"][::std::mem::align_of::() - 8usize]; + ["Offset of field: servent::s_name"][::std::mem::offset_of!(servent, s_name) - 0usize]; + ["Offset of field: servent::s_aliases"][::std::mem::offset_of!(servent, s_aliases) - 8usize]; + ["Offset of field: servent::s_port"][::std::mem::offset_of!(servent, s_port) - 16usize]; + ["Offset of field: servent::s_proto"][::std::mem::offset_of!(servent, s_proto) - 24usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct protoent { @@ -6337,51 +4917,14 @@ pub struct protoent { pub p_aliases: *mut *mut ::std::os::raw::c_char, pub p_proto: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_protoent() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(protoent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(protoent)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).p_name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(protoent), - "::", - stringify!(p_name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).p_aliases) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(protoent), - "::", - stringify!(p_aliases) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).p_proto) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(protoent), - "::", - stringify!(p_proto) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of protoent"][::std::mem::size_of::() - 24usize]; + ["Alignment of protoent"][::std::mem::align_of::() - 8usize]; + ["Offset of field: protoent::p_name"][::std::mem::offset_of!(protoent, p_name) - 0usize]; + ["Offset of field: protoent::p_aliases"][::std::mem::offset_of!(protoent, p_aliases) - 8usize]; + ["Offset of field: protoent::p_proto"][::std::mem::offset_of!(protoent, p_proto) - 16usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct addrinfo { @@ -6394,101 +4937,23 @@ pub struct addrinfo { pub ai_addr: *mut sockaddr, pub ai_next: *mut addrinfo, } -#[test] -fn bindgen_test_layout_addrinfo() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(addrinfo)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(addrinfo)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ai_flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(addrinfo), - "::", - stringify!(ai_flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ai_family) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(addrinfo), - "::", - stringify!(ai_family) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ai_socktype) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(addrinfo), - "::", - stringify!(ai_socktype) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ai_protocol) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(addrinfo), - "::", - stringify!(ai_protocol) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ai_addrlen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(addrinfo), - "::", - stringify!(ai_addrlen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ai_canonname) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(addrinfo), - "::", - stringify!(ai_canonname) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ai_addr) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(addrinfo), - "::", - stringify!(ai_addr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ai_next) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(addrinfo), - "::", - stringify!(ai_next) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of addrinfo"][::std::mem::size_of::() - 48usize]; + ["Alignment of addrinfo"][::std::mem::align_of::() - 8usize]; + ["Offset of field: addrinfo::ai_flags"][::std::mem::offset_of!(addrinfo, ai_flags) - 0usize]; + ["Offset of field: addrinfo::ai_family"][::std::mem::offset_of!(addrinfo, ai_family) - 4usize]; + ["Offset of field: addrinfo::ai_socktype"] + [::std::mem::offset_of!(addrinfo, ai_socktype) - 8usize]; + ["Offset of field: addrinfo::ai_protocol"] + [::std::mem::offset_of!(addrinfo, ai_protocol) - 12usize]; + ["Offset of field: addrinfo::ai_addrlen"] + [::std::mem::offset_of!(addrinfo, ai_addrlen) - 16usize]; + ["Offset of field: addrinfo::ai_canonname"] + [::std::mem::offset_of!(addrinfo, ai_canonname) - 24usize]; + ["Offset of field: addrinfo::ai_addr"][::std::mem::offset_of!(addrinfo, ai_addr) - 32usize]; + ["Offset of field: addrinfo::ai_next"][::std::mem::offset_of!(addrinfo, ai_next) - 40usize]; +}; extern "C" { pub fn getaddrinfo( __node: *const ::std::os::raw::c_char, @@ -7092,121 +5557,21 @@ pub struct mallinfo { pub fordblks: usize, pub keepcost: usize, } -#[test] -fn bindgen_test_layout_mallinfo() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 80usize, - concat!("Size of: ", stringify!(mallinfo)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(mallinfo)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).arena) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(mallinfo), - "::", - stringify!(arena) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ordblks) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(mallinfo), - "::", - stringify!(ordblks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).smblks) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(mallinfo), - "::", - stringify!(smblks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hblks) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(mallinfo), - "::", - stringify!(hblks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hblkhd) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(mallinfo), - "::", - stringify!(hblkhd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).usmblks) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(mallinfo), - "::", - stringify!(usmblks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fsmblks) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(mallinfo), - "::", - stringify!(fsmblks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uordblks) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(mallinfo), - "::", - stringify!(uordblks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fordblks) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(mallinfo), - "::", - stringify!(fordblks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).keepcost) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(mallinfo), - "::", - stringify!(keepcost) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of mallinfo"][::std::mem::size_of::() - 80usize]; + ["Alignment of mallinfo"][::std::mem::align_of::() - 8usize]; + ["Offset of field: mallinfo::arena"][::std::mem::offset_of!(mallinfo, arena) - 0usize]; + ["Offset of field: mallinfo::ordblks"][::std::mem::offset_of!(mallinfo, ordblks) - 8usize]; + ["Offset of field: mallinfo::smblks"][::std::mem::offset_of!(mallinfo, smblks) - 16usize]; + ["Offset of field: mallinfo::hblks"][::std::mem::offset_of!(mallinfo, hblks) - 24usize]; + ["Offset of field: mallinfo::hblkhd"][::std::mem::offset_of!(mallinfo, hblkhd) - 32usize]; + ["Offset of field: mallinfo::usmblks"][::std::mem::offset_of!(mallinfo, usmblks) - 40usize]; + ["Offset of field: mallinfo::fsmblks"][::std::mem::offset_of!(mallinfo, fsmblks) - 48usize]; + ["Offset of field: mallinfo::uordblks"][::std::mem::offset_of!(mallinfo, uordblks) - 56usize]; + ["Offset of field: mallinfo::fordblks"][::std::mem::offset_of!(mallinfo, fordblks) - 64usize]; + ["Offset of field: mallinfo::keepcost"][::std::mem::offset_of!(mallinfo, keepcost) - 72usize]; +}; extern "C" { pub fn mallinfo() -> mallinfo; } @@ -7224,121 +5589,21 @@ pub struct mallinfo2 { pub fordblks: usize, pub keepcost: usize, } -#[test] -fn bindgen_test_layout_mallinfo2() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 80usize, - concat!("Size of: ", stringify!(mallinfo2)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(mallinfo2)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).arena) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(mallinfo2), - "::", - stringify!(arena) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ordblks) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(mallinfo2), - "::", - stringify!(ordblks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).smblks) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(mallinfo2), - "::", - stringify!(smblks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hblks) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(mallinfo2), - "::", - stringify!(hblks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hblkhd) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(mallinfo2), - "::", - stringify!(hblkhd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).usmblks) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(mallinfo2), - "::", - stringify!(usmblks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fsmblks) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(mallinfo2), - "::", - stringify!(fsmblks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uordblks) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(mallinfo2), - "::", - stringify!(uordblks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fordblks) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(mallinfo2), - "::", - stringify!(fordblks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).keepcost) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(mallinfo2), - "::", - stringify!(keepcost) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of mallinfo2"][::std::mem::size_of::() - 80usize]; + ["Alignment of mallinfo2"][::std::mem::align_of::() - 8usize]; + ["Offset of field: mallinfo2::arena"][::std::mem::offset_of!(mallinfo2, arena) - 0usize]; + ["Offset of field: mallinfo2::ordblks"][::std::mem::offset_of!(mallinfo2, ordblks) - 8usize]; + ["Offset of field: mallinfo2::smblks"][::std::mem::offset_of!(mallinfo2, smblks) - 16usize]; + ["Offset of field: mallinfo2::hblks"][::std::mem::offset_of!(mallinfo2, hblks) - 24usize]; + ["Offset of field: mallinfo2::hblkhd"][::std::mem::offset_of!(mallinfo2, hblkhd) - 32usize]; + ["Offset of field: mallinfo2::usmblks"][::std::mem::offset_of!(mallinfo2, usmblks) - 40usize]; + ["Offset of field: mallinfo2::fsmblks"][::std::mem::offset_of!(mallinfo2, fsmblks) - 48usize]; + ["Offset of field: mallinfo2::uordblks"][::std::mem::offset_of!(mallinfo2, uordblks) - 56usize]; + ["Offset of field: mallinfo2::fordblks"][::std::mem::offset_of!(mallinfo2, fordblks) - 64usize]; + ["Offset of field: mallinfo2::keepcost"][::std::mem::offset_of!(mallinfo2, keepcost) - 72usize]; +}; extern "C" { pub fn malloc_info( __must_be_zero: ::std::os::raw::c_int, @@ -7679,41 +5944,13 @@ pub struct div_t { pub quot: ::std::os::raw::c_int, pub rem: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_div_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(div_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(div_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).quot) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(div_t), - "::", - stringify!(quot) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rem) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(div_t), - "::", - stringify!(rem) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of div_t"][::std::mem::size_of::() - 8usize]; + ["Alignment of div_t"][::std::mem::align_of::() - 4usize]; + ["Offset of field: div_t::quot"][::std::mem::offset_of!(div_t, quot) - 0usize]; + ["Offset of field: div_t::rem"][::std::mem::offset_of!(div_t, rem) - 4usize]; +}; extern "C" { pub fn div(__numerator: ::std::os::raw::c_int, __denominator: ::std::os::raw::c_int) -> div_t; } @@ -7723,41 +5960,13 @@ pub struct ldiv_t { pub quot: ::std::os::raw::c_long, pub rem: ::std::os::raw::c_long, } -#[test] -fn bindgen_test_layout_ldiv_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(ldiv_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(ldiv_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).quot) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ldiv_t), - "::", - stringify!(quot) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rem) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ldiv_t), - "::", - stringify!(rem) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ldiv_t"][::std::mem::size_of::() - 16usize]; + ["Alignment of ldiv_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: ldiv_t::quot"][::std::mem::offset_of!(ldiv_t, quot) - 0usize]; + ["Offset of field: ldiv_t::rem"][::std::mem::offset_of!(ldiv_t, rem) - 8usize]; +}; extern "C" { pub fn ldiv( __numerator: ::std::os::raw::c_long, @@ -7770,41 +5979,13 @@ pub struct lldiv_t { pub quot: ::std::os::raw::c_longlong, pub rem: ::std::os::raw::c_longlong, } -#[test] -fn bindgen_test_layout_lldiv_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(lldiv_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(lldiv_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).quot) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(lldiv_t), - "::", - stringify!(quot) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rem) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(lldiv_t), - "::", - stringify!(rem) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of lldiv_t"][::std::mem::size_of::() - 16usize]; + ["Alignment of lldiv_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: lldiv_t::quot"][::std::mem::offset_of!(lldiv_t, quot) - 0usize]; + ["Offset of field: lldiv_t::rem"][::std::mem::offset_of!(lldiv_t, rem) - 8usize]; +}; extern "C" { pub fn lldiv( __numerator: ::std::os::raw::c_longlong, @@ -8055,81 +6236,23 @@ pub struct ANativeWindow_Buffer { pub bits: *mut ::std::os::raw::c_void, pub reserved: [u32; 6usize], } -#[test] -fn bindgen_test_layout_ANativeWindow_Buffer() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(ANativeWindow_Buffer)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(ANativeWindow_Buffer)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ANativeWindow_Buffer), - "::", - stringify!(width) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ANativeWindow_Buffer), - "::", - stringify!(height) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).stride) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ANativeWindow_Buffer), - "::", - stringify!(stride) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).format) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(ANativeWindow_Buffer), - "::", - stringify!(format) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bits) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(ANativeWindow_Buffer), - "::", - stringify!(bits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(ANativeWindow_Buffer), - "::", - stringify!(reserved) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ANativeWindow_Buffer"][::std::mem::size_of::() - 48usize]; + ["Alignment of ANativeWindow_Buffer"][::std::mem::align_of::() - 8usize]; + ["Offset of field: ANativeWindow_Buffer::width"] + [::std::mem::offset_of!(ANativeWindow_Buffer, width) - 0usize]; + ["Offset of field: ANativeWindow_Buffer::height"] + [::std::mem::offset_of!(ANativeWindow_Buffer, height) - 4usize]; + ["Offset of field: ANativeWindow_Buffer::stride"] + [::std::mem::offset_of!(ANativeWindow_Buffer, stride) - 8usize]; + ["Offset of field: ANativeWindow_Buffer::format"] + [::std::mem::offset_of!(ANativeWindow_Buffer, format) - 12usize]; + ["Offset of field: ANativeWindow_Buffer::bits"] + [::std::mem::offset_of!(ANativeWindow_Buffer, bits) - 16usize]; + ["Offset of field: ANativeWindow_Buffer::reserved"] + [::std::mem::offset_of!(ANativeWindow_Buffer, reserved) - 24usize]; +}; extern "C" { pub fn ANativeWindow_acquire(window: *mut ANativeWindow); } @@ -8228,121 +6351,30 @@ pub struct ANativeActivity { pub assetManager: *mut AAssetManager, pub obbPath: *const ::std::os::raw::c_char, } -#[test] -fn bindgen_test_layout_ANativeActivity() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 80usize, - concat!("Size of: ", stringify!(ANativeActivity)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(ANativeActivity)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).callbacks) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivity), - "::", - stringify!(callbacks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).vm) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivity), - "::", - stringify!(vm) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).env) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivity), - "::", - stringify!(env) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clazz) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivity), - "::", - stringify!(clazz) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).internalDataPath) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivity), - "::", - stringify!(internalDataPath) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).externalDataPath) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivity), - "::", - stringify!(externalDataPath) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sdkVersion) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivity), - "::", - stringify!(sdkVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).instance) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivity), - "::", - stringify!(instance) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).assetManager) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivity), - "::", - stringify!(assetManager) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).obbPath) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivity), - "::", - stringify!(obbPath) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ANativeActivity"][::std::mem::size_of::() - 80usize]; + ["Alignment of ANativeActivity"][::std::mem::align_of::() - 8usize]; + ["Offset of field: ANativeActivity::callbacks"] + [::std::mem::offset_of!(ANativeActivity, callbacks) - 0usize]; + ["Offset of field: ANativeActivity::vm"][::std::mem::offset_of!(ANativeActivity, vm) - 8usize]; + ["Offset of field: ANativeActivity::env"] + [::std::mem::offset_of!(ANativeActivity, env) - 16usize]; + ["Offset of field: ANativeActivity::clazz"] + [::std::mem::offset_of!(ANativeActivity, clazz) - 24usize]; + ["Offset of field: ANativeActivity::internalDataPath"] + [::std::mem::offset_of!(ANativeActivity, internalDataPath) - 32usize]; + ["Offset of field: ANativeActivity::externalDataPath"] + [::std::mem::offset_of!(ANativeActivity, externalDataPath) - 40usize]; + ["Offset of field: ANativeActivity::sdkVersion"] + [::std::mem::offset_of!(ANativeActivity, sdkVersion) - 48usize]; + ["Offset of field: ANativeActivity::instance"] + [::std::mem::offset_of!(ANativeActivity, instance) - 56usize]; + ["Offset of field: ANativeActivity::assetManager"] + [::std::mem::offset_of!(ANativeActivity, assetManager) - 64usize]; + ["Offset of field: ANativeActivity::obbPath"] + [::std::mem::offset_of!(ANativeActivity, obbPath) - 72usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ANativeActivityCallbacks { @@ -8385,182 +6417,45 @@ pub struct ANativeActivityCallbacks { ::std::option::Option, pub onLowMemory: ::std::option::Option, } -#[test] -fn bindgen_test_layout_ANativeActivityCallbacks() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 128usize, - concat!("Size of: ", stringify!(ANativeActivityCallbacks)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(ANativeActivityCallbacks)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onStart) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivityCallbacks), - "::", - stringify!(onStart) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onResume) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivityCallbacks), - "::", - stringify!(onResume) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onSaveInstanceState) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivityCallbacks), - "::", - stringify!(onSaveInstanceState) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onPause) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivityCallbacks), - "::", - stringify!(onPause) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onStop) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivityCallbacks), - "::", - stringify!(onStop) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onDestroy) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivityCallbacks), - "::", - stringify!(onDestroy) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onWindowFocusChanged) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivityCallbacks), - "::", - stringify!(onWindowFocusChanged) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onNativeWindowCreated) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivityCallbacks), - "::", - stringify!(onNativeWindowCreated) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onNativeWindowResized) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivityCallbacks), - "::", - stringify!(onNativeWindowResized) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onNativeWindowRedrawNeeded) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivityCallbacks), - "::", - stringify!(onNativeWindowRedrawNeeded) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onNativeWindowDestroyed) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivityCallbacks), - "::", - stringify!(onNativeWindowDestroyed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onInputQueueCreated) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivityCallbacks), - "::", - stringify!(onInputQueueCreated) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onInputQueueDestroyed) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivityCallbacks), - "::", - stringify!(onInputQueueDestroyed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onContentRectChanged) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivityCallbacks), - "::", - stringify!(onContentRectChanged) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onConfigurationChanged) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivityCallbacks), - "::", - stringify!(onConfigurationChanged) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onLowMemory) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(ANativeActivityCallbacks), - "::", - stringify!(onLowMemory) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ANativeActivityCallbacks"] + [::std::mem::size_of::() - 128usize]; + ["Alignment of ANativeActivityCallbacks"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: ANativeActivityCallbacks::onStart"] + [::std::mem::offset_of!(ANativeActivityCallbacks, onStart) - 0usize]; + ["Offset of field: ANativeActivityCallbacks::onResume"] + [::std::mem::offset_of!(ANativeActivityCallbacks, onResume) - 8usize]; + ["Offset of field: ANativeActivityCallbacks::onSaveInstanceState"] + [::std::mem::offset_of!(ANativeActivityCallbacks, onSaveInstanceState) - 16usize]; + ["Offset of field: ANativeActivityCallbacks::onPause"] + [::std::mem::offset_of!(ANativeActivityCallbacks, onPause) - 24usize]; + ["Offset of field: ANativeActivityCallbacks::onStop"] + [::std::mem::offset_of!(ANativeActivityCallbacks, onStop) - 32usize]; + ["Offset of field: ANativeActivityCallbacks::onDestroy"] + [::std::mem::offset_of!(ANativeActivityCallbacks, onDestroy) - 40usize]; + ["Offset of field: ANativeActivityCallbacks::onWindowFocusChanged"] + [::std::mem::offset_of!(ANativeActivityCallbacks, onWindowFocusChanged) - 48usize]; + ["Offset of field: ANativeActivityCallbacks::onNativeWindowCreated"] + [::std::mem::offset_of!(ANativeActivityCallbacks, onNativeWindowCreated) - 56usize]; + ["Offset of field: ANativeActivityCallbacks::onNativeWindowResized"] + [::std::mem::offset_of!(ANativeActivityCallbacks, onNativeWindowResized) - 64usize]; + ["Offset of field: ANativeActivityCallbacks::onNativeWindowRedrawNeeded"] + [::std::mem::offset_of!(ANativeActivityCallbacks, onNativeWindowRedrawNeeded) - 72usize]; + ["Offset of field: ANativeActivityCallbacks::onNativeWindowDestroyed"] + [::std::mem::offset_of!(ANativeActivityCallbacks, onNativeWindowDestroyed) - 80usize]; + ["Offset of field: ANativeActivityCallbacks::onInputQueueCreated"] + [::std::mem::offset_of!(ANativeActivityCallbacks, onInputQueueCreated) - 88usize]; + ["Offset of field: ANativeActivityCallbacks::onInputQueueDestroyed"] + [::std::mem::offset_of!(ANativeActivityCallbacks, onInputQueueDestroyed) - 96usize]; + ["Offset of field: ANativeActivityCallbacks::onContentRectChanged"] + [::std::mem::offset_of!(ANativeActivityCallbacks, onContentRectChanged) - 104usize]; + ["Offset of field: ANativeActivityCallbacks::onConfigurationChanged"] + [::std::mem::offset_of!(ANativeActivityCallbacks, onConfigurationChanged) - 112usize]; + ["Offset of field: ANativeActivityCallbacks::onLowMemory"] + [::std::mem::offset_of!(ANativeActivityCallbacks, onLowMemory) - 120usize]; +}; pub type ANativeActivity_createFunc = ::std::option::Option< unsafe extern "C" fn( activity: *mut ANativeActivity, @@ -9168,58 +7063,19 @@ pub struct ANeuralNetworksSymmPerChannelQuantParams { pub scaleCount: u32, pub scales: *const f32, } -#[test] -fn bindgen_test_layout_ANeuralNetworksSymmPerChannelQuantParams() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!( - "Size of: ", - stringify!(ANeuralNetworksSymmPerChannelQuantParams) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(ANeuralNetworksSymmPerChannelQuantParams) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).channelDim) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ANeuralNetworksSymmPerChannelQuantParams), - "::", - stringify!(channelDim) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).scaleCount) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ANeuralNetworksSymmPerChannelQuantParams), - "::", - stringify!(scaleCount) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).scales) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ANeuralNetworksSymmPerChannelQuantParams), - "::", - stringify!(scales) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ANeuralNetworksSymmPerChannelQuantParams"] + [::std::mem::size_of::() - 16usize]; + ["Alignment of ANeuralNetworksSymmPerChannelQuantParams"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: ANeuralNetworksSymmPerChannelQuantParams::channelDim"] + [::std::mem::offset_of!(ANeuralNetworksSymmPerChannelQuantParams, channelDim) - 0usize]; + ["Offset of field: ANeuralNetworksSymmPerChannelQuantParams::scaleCount"] + [::std::mem::offset_of!(ANeuralNetworksSymmPerChannelQuantParams, scaleCount) - 4usize]; + ["Offset of field: ANeuralNetworksSymmPerChannelQuantParams::scales"] + [::std::mem::offset_of!(ANeuralNetworksSymmPerChannelQuantParams, scales) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ANeuralNetworksBurst { @@ -9234,72 +7090,23 @@ pub struct ANeuralNetworksOperandType { pub scale: f32, pub zeroPoint: i32, } -#[test] -fn bindgen_test_layout_ANeuralNetworksOperandType() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(ANeuralNetworksOperandType)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(ANeuralNetworksOperandType)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ANeuralNetworksOperandType), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dimensionCount) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ANeuralNetworksOperandType), - "::", - stringify!(dimensionCount) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dimensions) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ANeuralNetworksOperandType), - "::", - stringify!(dimensions) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).scale) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(ANeuralNetworksOperandType), - "::", - stringify!(scale) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).zeroPoint) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(ANeuralNetworksOperandType), - "::", - stringify!(zeroPoint) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ANeuralNetworksOperandType"] + [::std::mem::size_of::() - 24usize]; + ["Alignment of ANeuralNetworksOperandType"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: ANeuralNetworksOperandType::type_"] + [::std::mem::offset_of!(ANeuralNetworksOperandType, type_) - 0usize]; + ["Offset of field: ANeuralNetworksOperandType::dimensionCount"] + [::std::mem::offset_of!(ANeuralNetworksOperandType, dimensionCount) - 4usize]; + ["Offset of field: ANeuralNetworksOperandType::dimensions"] + [::std::mem::offset_of!(ANeuralNetworksOperandType, dimensions) - 8usize]; + ["Offset of field: ANeuralNetworksOperandType::scale"] + [::std::mem::offset_of!(ANeuralNetworksOperandType, scale) - 16usize]; + ["Offset of field: ANeuralNetworksOperandType::zeroPoint"] + [::std::mem::offset_of!(ANeuralNetworksOperandType, zeroPoint) - 20usize]; +}; pub type ANeuralNetworksOperationType = i32; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -9764,371 +7571,132 @@ pub struct timespec { pub tv_sec: time_t, pub tv_nsec: ::std::os::raw::c_long, } -#[test] -fn bindgen_test_layout_timespec() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(timespec)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(timespec)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tv_sec) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(timespec), - "::", - stringify!(tv_sec) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tv_nsec) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(timespec), - "::", - stringify!(tv_nsec) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of timespec"][::std::mem::size_of::() - 16usize]; + ["Alignment of timespec"][::std::mem::align_of::() - 8usize]; + ["Offset of field: timespec::tv_sec"][::std::mem::offset_of!(timespec, tv_sec) - 0usize]; + ["Offset of field: timespec::tv_nsec"][::std::mem::offset_of!(timespec, tv_nsec) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __kernel_timespec { pub tv_sec: __kernel_time64_t, pub tv_nsec: ::std::os::raw::c_longlong, } -#[test] -fn bindgen_test_layout___kernel_timespec() { - const UNINIT: ::std::mem::MaybeUninit<__kernel_timespec> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__kernel_timespec>(), - 16usize, - concat!("Size of: ", stringify!(__kernel_timespec)) - ); - assert_eq!( - ::std::mem::align_of::<__kernel_timespec>(), - 8usize, - concat!("Alignment of ", stringify!(__kernel_timespec)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tv_sec) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__kernel_timespec), - "::", - stringify!(tv_sec) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tv_nsec) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__kernel_timespec), - "::", - stringify!(tv_nsec) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __kernel_timespec"][::std::mem::size_of::<__kernel_timespec>() - 16usize]; + ["Alignment of __kernel_timespec"][::std::mem::align_of::<__kernel_timespec>() - 8usize]; + ["Offset of field: __kernel_timespec::tv_sec"] + [::std::mem::offset_of!(__kernel_timespec, tv_sec) - 0usize]; + ["Offset of field: __kernel_timespec::tv_nsec"] + [::std::mem::offset_of!(__kernel_timespec, tv_nsec) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __kernel_itimerspec { pub it_interval: __kernel_timespec, pub it_value: __kernel_timespec, } -#[test] -fn bindgen_test_layout___kernel_itimerspec() { - const UNINIT: ::std::mem::MaybeUninit<__kernel_itimerspec> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__kernel_itimerspec>(), - 32usize, - concat!("Size of: ", stringify!(__kernel_itimerspec)) - ); - assert_eq!( - ::std::mem::align_of::<__kernel_itimerspec>(), - 8usize, - concat!("Alignment of ", stringify!(__kernel_itimerspec)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).it_interval) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__kernel_itimerspec), - "::", - stringify!(it_interval) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).it_value) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__kernel_itimerspec), - "::", - stringify!(it_value) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __kernel_itimerspec"][::std::mem::size_of::<__kernel_itimerspec>() - 32usize]; + ["Alignment of __kernel_itimerspec"][::std::mem::align_of::<__kernel_itimerspec>() - 8usize]; + ["Offset of field: __kernel_itimerspec::it_interval"] + [::std::mem::offset_of!(__kernel_itimerspec, it_interval) - 0usize]; + ["Offset of field: __kernel_itimerspec::it_value"] + [::std::mem::offset_of!(__kernel_itimerspec, it_value) - 16usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __kernel_old_timespec { pub tv_sec: __kernel_old_time_t, pub tv_nsec: ::std::os::raw::c_long, } -#[test] -fn bindgen_test_layout___kernel_old_timespec() { - const UNINIT: ::std::mem::MaybeUninit<__kernel_old_timespec> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__kernel_old_timespec>(), - 16usize, - concat!("Size of: ", stringify!(__kernel_old_timespec)) - ); - assert_eq!( - ::std::mem::align_of::<__kernel_old_timespec>(), - 8usize, - concat!("Alignment of ", stringify!(__kernel_old_timespec)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tv_sec) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__kernel_old_timespec), - "::", - stringify!(tv_sec) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tv_nsec) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__kernel_old_timespec), - "::", - stringify!(tv_nsec) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __kernel_old_timespec"][::std::mem::size_of::<__kernel_old_timespec>() - 16usize]; + ["Alignment of __kernel_old_timespec"] + [::std::mem::align_of::<__kernel_old_timespec>() - 8usize]; + ["Offset of field: __kernel_old_timespec::tv_sec"] + [::std::mem::offset_of!(__kernel_old_timespec, tv_sec) - 0usize]; + ["Offset of field: __kernel_old_timespec::tv_nsec"] + [::std::mem::offset_of!(__kernel_old_timespec, tv_nsec) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __kernel_sock_timeval { pub tv_sec: __s64, pub tv_usec: __s64, } -#[test] -fn bindgen_test_layout___kernel_sock_timeval() { - const UNINIT: ::std::mem::MaybeUninit<__kernel_sock_timeval> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__kernel_sock_timeval>(), - 16usize, - concat!("Size of: ", stringify!(__kernel_sock_timeval)) - ); - assert_eq!( - ::std::mem::align_of::<__kernel_sock_timeval>(), - 8usize, - concat!("Alignment of ", stringify!(__kernel_sock_timeval)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tv_sec) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__kernel_sock_timeval), - "::", - stringify!(tv_sec) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tv_usec) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__kernel_sock_timeval), - "::", - stringify!(tv_usec) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __kernel_sock_timeval"][::std::mem::size_of::<__kernel_sock_timeval>() - 16usize]; + ["Alignment of __kernel_sock_timeval"] + [::std::mem::align_of::<__kernel_sock_timeval>() - 8usize]; + ["Offset of field: __kernel_sock_timeval::tv_sec"] + [::std::mem::offset_of!(__kernel_sock_timeval, tv_sec) - 0usize]; + ["Offset of field: __kernel_sock_timeval::tv_usec"] + [::std::mem::offset_of!(__kernel_sock_timeval, tv_usec) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct timeval { pub tv_sec: __kernel_old_time_t, pub tv_usec: __kernel_suseconds_t, } -#[test] -fn bindgen_test_layout_timeval() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(timeval)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(timeval)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tv_sec) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(timeval), - "::", - stringify!(tv_sec) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tv_usec) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(timeval), - "::", - stringify!(tv_usec) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of timeval"][::std::mem::size_of::() - 16usize]; + ["Alignment of timeval"][::std::mem::align_of::() - 8usize]; + ["Offset of field: timeval::tv_sec"][::std::mem::offset_of!(timeval, tv_sec) - 0usize]; + ["Offset of field: timeval::tv_usec"][::std::mem::offset_of!(timeval, tv_usec) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct itimerspec { pub it_interval: timespec, pub it_value: timespec, } -#[test] -fn bindgen_test_layout_itimerspec() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(itimerspec)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(itimerspec)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).it_interval) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(itimerspec), - "::", - stringify!(it_interval) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).it_value) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(itimerspec), - "::", - stringify!(it_value) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of itimerspec"][::std::mem::size_of::() - 32usize]; + ["Alignment of itimerspec"][::std::mem::align_of::() - 8usize]; + ["Offset of field: itimerspec::it_interval"] + [::std::mem::offset_of!(itimerspec, it_interval) - 0usize]; + ["Offset of field: itimerspec::it_value"] + [::std::mem::offset_of!(itimerspec, it_value) - 16usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct itimerval { pub it_interval: timeval, pub it_value: timeval, } -#[test] -fn bindgen_test_layout_itimerval() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(itimerval)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(itimerval)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).it_interval) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(itimerval), - "::", - stringify!(it_interval) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).it_value) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(itimerval), - "::", - stringify!(it_value) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of itimerval"][::std::mem::size_of::() - 32usize]; + ["Alignment of itimerval"][::std::mem::align_of::() - 8usize]; + ["Offset of field: itimerval::it_interval"] + [::std::mem::offset_of!(itimerval, it_interval) - 0usize]; + ["Offset of field: itimerval::it_value"][::std::mem::offset_of!(itimerval, it_value) - 16usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct timezone { pub tz_minuteswest: ::std::os::raw::c_int, pub tz_dsttime: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_timezone() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(timezone)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(timezone)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tz_minuteswest) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(timezone), - "::", - stringify!(tz_minuteswest) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tz_dsttime) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(timezone), - "::", - stringify!(tz_dsttime) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of timezone"][::std::mem::size_of::() - 8usize]; + ["Alignment of timezone"][::std::mem::align_of::() - 4usize]; + ["Offset of field: timezone::tz_minuteswest"] + [::std::mem::offset_of!(timezone, tz_minuteswest) - 0usize]; + ["Offset of field: timezone::tz_dsttime"] + [::std::mem::offset_of!(timezone, tz_dsttime) - 4usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _fpx_sw_bytes { @@ -10138,112 +7706,34 @@ pub struct _fpx_sw_bytes { pub xstate_size: __u32, pub padding: [__u32; 7usize], } -#[test] -fn bindgen_test_layout__fpx_sw_bytes() { - const UNINIT: ::std::mem::MaybeUninit<_fpx_sw_bytes> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_fpx_sw_bytes>(), - 48usize, - concat!("Size of: ", stringify!(_fpx_sw_bytes)) - ); - assert_eq!( - ::std::mem::align_of::<_fpx_sw_bytes>(), - 8usize, - concat!("Alignment of ", stringify!(_fpx_sw_bytes)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).magic1) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_fpx_sw_bytes), - "::", - stringify!(magic1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).extended_size) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_fpx_sw_bytes), - "::", - stringify!(extended_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).xfeatures) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_fpx_sw_bytes), - "::", - stringify!(xfeatures) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).xstate_size) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_fpx_sw_bytes), - "::", - stringify!(xstate_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).padding) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_fpx_sw_bytes), - "::", - stringify!(padding) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of _fpx_sw_bytes"][::std::mem::size_of::<_fpx_sw_bytes>() - 48usize]; + ["Alignment of _fpx_sw_bytes"][::std::mem::align_of::<_fpx_sw_bytes>() - 8usize]; + ["Offset of field: _fpx_sw_bytes::magic1"] + [::std::mem::offset_of!(_fpx_sw_bytes, magic1) - 0usize]; + ["Offset of field: _fpx_sw_bytes::extended_size"] + [::std::mem::offset_of!(_fpx_sw_bytes, extended_size) - 4usize]; + ["Offset of field: _fpx_sw_bytes::xfeatures"] + [::std::mem::offset_of!(_fpx_sw_bytes, xfeatures) - 8usize]; + ["Offset of field: _fpx_sw_bytes::xstate_size"] + [::std::mem::offset_of!(_fpx_sw_bytes, xstate_size) - 16usize]; + ["Offset of field: _fpx_sw_bytes::padding"] + [::std::mem::offset_of!(_fpx_sw_bytes, padding) - 20usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _fpreg { pub significand: [__u16; 4usize], pub exponent: __u16, } -#[test] -fn bindgen_test_layout__fpreg() { - const UNINIT: ::std::mem::MaybeUninit<_fpreg> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_fpreg>(), - 10usize, - concat!("Size of: ", stringify!(_fpreg)) - ); - assert_eq!( - ::std::mem::align_of::<_fpreg>(), - 2usize, - concat!("Alignment of ", stringify!(_fpreg)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).significand) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_fpreg), - "::", - stringify!(significand) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).exponent) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_fpreg), - "::", - stringify!(exponent) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of _fpreg"][::std::mem::size_of::<_fpreg>() - 10usize]; + ["Alignment of _fpreg"][::std::mem::align_of::<_fpreg>() - 2usize]; + ["Offset of field: _fpreg::significand"][::std::mem::offset_of!(_fpreg, significand) - 0usize]; + ["Offset of field: _fpreg::exponent"][::std::mem::offset_of!(_fpreg, exponent) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _fpxreg { @@ -10251,81 +7741,26 @@ pub struct _fpxreg { pub exponent: __u16, pub padding: [__u16; 3usize], } -#[test] -fn bindgen_test_layout__fpxreg() { - const UNINIT: ::std::mem::MaybeUninit<_fpxreg> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_fpxreg>(), - 16usize, - concat!("Size of: ", stringify!(_fpxreg)) - ); - assert_eq!( - ::std::mem::align_of::<_fpxreg>(), - 2usize, - concat!("Alignment of ", stringify!(_fpxreg)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).significand) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_fpxreg), - "::", - stringify!(significand) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).exponent) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_fpxreg), - "::", - stringify!(exponent) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).padding) as usize - ptr as usize }, - 10usize, - concat!( - "Offset of field: ", - stringify!(_fpxreg), - "::", - stringify!(padding) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of _fpxreg"][::std::mem::size_of::<_fpxreg>() - 16usize]; + ["Alignment of _fpxreg"][::std::mem::align_of::<_fpxreg>() - 2usize]; + ["Offset of field: _fpxreg::significand"] + [::std::mem::offset_of!(_fpxreg, significand) - 0usize]; + ["Offset of field: _fpxreg::exponent"][::std::mem::offset_of!(_fpxreg, exponent) - 8usize]; + ["Offset of field: _fpxreg::padding"][::std::mem::offset_of!(_fpxreg, padding) - 10usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _xmmreg { pub element: [__u32; 4usize], } -#[test] -fn bindgen_test_layout__xmmreg() { - const UNINIT: ::std::mem::MaybeUninit<_xmmreg> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_xmmreg>(), - 16usize, - concat!("Size of: ", stringify!(_xmmreg)) - ); - assert_eq!( - ::std::mem::align_of::<_xmmreg>(), - 4usize, - concat!("Alignment of ", stringify!(_xmmreg)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).element) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_xmmreg), - "::", - stringify!(element) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of _xmmreg"][::std::mem::size_of::<_xmmreg>() - 16usize]; + ["Alignment of _xmmreg"][::std::mem::align_of::<_xmmreg>() - 4usize]; + ["Offset of field: _xmmreg::element"][::std::mem::offset_of!(_xmmreg, element) - 0usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub struct _fpstate_32 { @@ -10353,249 +7788,60 @@ pub union _fpstate_32__bindgen_ty_1 { pub padding1: [__u32; 44usize], pub padding: [__u32; 44usize], } -#[test] -fn bindgen_test_layout__fpstate_32__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit<_fpstate_32__bindgen_ty_1> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_fpstate_32__bindgen_ty_1>(), - 176usize, - concat!("Size of: ", stringify!(_fpstate_32__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::<_fpstate_32__bindgen_ty_1>(), - 4usize, - concat!("Alignment of ", stringify!(_fpstate_32__bindgen_ty_1)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).padding1) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32__bindgen_ty_1), - "::", - stringify!(padding1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).padding) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32__bindgen_ty_1), - "::", - stringify!(padding) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of _fpstate_32__bindgen_ty_1"] + [::std::mem::size_of::<_fpstate_32__bindgen_ty_1>() - 176usize]; + ["Alignment of _fpstate_32__bindgen_ty_1"] + [::std::mem::align_of::<_fpstate_32__bindgen_ty_1>() - 4usize]; + ["Offset of field: _fpstate_32__bindgen_ty_1::padding1"] + [::std::mem::offset_of!(_fpstate_32__bindgen_ty_1, padding1) - 0usize]; + ["Offset of field: _fpstate_32__bindgen_ty_1::padding"] + [::std::mem::offset_of!(_fpstate_32__bindgen_ty_1, padding) - 0usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub union _fpstate_32__bindgen_ty_2 { pub padding2: [__u32; 12usize], pub sw_reserved: _fpx_sw_bytes, } -#[test] -fn bindgen_test_layout__fpstate_32__bindgen_ty_2() { - const UNINIT: ::std::mem::MaybeUninit<_fpstate_32__bindgen_ty_2> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_fpstate_32__bindgen_ty_2>(), - 48usize, - concat!("Size of: ", stringify!(_fpstate_32__bindgen_ty_2)) - ); - assert_eq!( - ::std::mem::align_of::<_fpstate_32__bindgen_ty_2>(), - 8usize, - concat!("Alignment of ", stringify!(_fpstate_32__bindgen_ty_2)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).padding2) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32__bindgen_ty_2), - "::", - stringify!(padding2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sw_reserved) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32__bindgen_ty_2), - "::", - stringify!(sw_reserved) - ) - ); -} -#[test] -fn bindgen_test_layout__fpstate_32() { - const UNINIT: ::std::mem::MaybeUninit<_fpstate_32> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_fpstate_32>(), - 624usize, - concat!("Size of: ", stringify!(_fpstate_32)) - ); - assert_eq!( - ::std::mem::align_of::<_fpstate_32>(), - 8usize, - concat!("Alignment of ", stringify!(_fpstate_32)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cw) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32), - "::", - stringify!(cw) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sw) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32), - "::", - stringify!(sw) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tag) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32), - "::", - stringify!(tag) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ipoff) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32), - "::", - stringify!(ipoff) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cssel) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32), - "::", - stringify!(cssel) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dataoff) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32), - "::", - stringify!(dataoff) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).datasel) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32), - "::", - stringify!(datasel) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._st) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32), - "::", - stringify!(_st) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).status) as usize - ptr as usize }, - 108usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32), - "::", - stringify!(status) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).magic) as usize - ptr as usize }, - 110usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32), - "::", - stringify!(magic) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._fxsr_env) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32), - "::", - stringify!(_fxsr_env) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mxcsr) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32), - "::", - stringify!(mxcsr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, - 140usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32), - "::", - stringify!(reserved) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._fxsr_st) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32), - "::", - stringify!(_fxsr_st) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._xmm) as usize - ptr as usize }, - 272usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32), - "::", - stringify!(_xmm) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of _fpstate_32__bindgen_ty_2"] + [::std::mem::size_of::<_fpstate_32__bindgen_ty_2>() - 48usize]; + ["Alignment of _fpstate_32__bindgen_ty_2"] + [::std::mem::align_of::<_fpstate_32__bindgen_ty_2>() - 8usize]; + ["Offset of field: _fpstate_32__bindgen_ty_2::padding2"] + [::std::mem::offset_of!(_fpstate_32__bindgen_ty_2, padding2) - 0usize]; + ["Offset of field: _fpstate_32__bindgen_ty_2::sw_reserved"] + [::std::mem::offset_of!(_fpstate_32__bindgen_ty_2, sw_reserved) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of _fpstate_32"][::std::mem::size_of::<_fpstate_32>() - 624usize]; + ["Alignment of _fpstate_32"][::std::mem::align_of::<_fpstate_32>() - 8usize]; + ["Offset of field: _fpstate_32::cw"][::std::mem::offset_of!(_fpstate_32, cw) - 0usize]; + ["Offset of field: _fpstate_32::sw"][::std::mem::offset_of!(_fpstate_32, sw) - 4usize]; + ["Offset of field: _fpstate_32::tag"][::std::mem::offset_of!(_fpstate_32, tag) - 8usize]; + ["Offset of field: _fpstate_32::ipoff"][::std::mem::offset_of!(_fpstate_32, ipoff) - 12usize]; + ["Offset of field: _fpstate_32::cssel"][::std::mem::offset_of!(_fpstate_32, cssel) - 16usize]; + ["Offset of field: _fpstate_32::dataoff"] + [::std::mem::offset_of!(_fpstate_32, dataoff) - 20usize]; + ["Offset of field: _fpstate_32::datasel"] + [::std::mem::offset_of!(_fpstate_32, datasel) - 24usize]; + ["Offset of field: _fpstate_32::_st"][::std::mem::offset_of!(_fpstate_32, _st) - 28usize]; + ["Offset of field: _fpstate_32::status"] + [::std::mem::offset_of!(_fpstate_32, status) - 108usize]; + ["Offset of field: _fpstate_32::magic"][::std::mem::offset_of!(_fpstate_32, magic) - 110usize]; + ["Offset of field: _fpstate_32::_fxsr_env"] + [::std::mem::offset_of!(_fpstate_32, _fxsr_env) - 112usize]; + ["Offset of field: _fpstate_32::mxcsr"][::std::mem::offset_of!(_fpstate_32, mxcsr) - 136usize]; + ["Offset of field: _fpstate_32::reserved"] + [::std::mem::offset_of!(_fpstate_32, reserved) - 140usize]; + ["Offset of field: _fpstate_32::_fxsr_st"] + [::std::mem::offset_of!(_fpstate_32, _fxsr_st) - 144usize]; + ["Offset of field: _fpstate_32::_xmm"][::std::mem::offset_of!(_fpstate_32, _xmm) - 272usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub struct _fpstate_64 { @@ -10618,167 +7864,37 @@ pub union _fpstate_64__bindgen_ty_1 { pub reserved3: [__u32; 12usize], pub sw_reserved: _fpx_sw_bytes, } -#[test] -fn bindgen_test_layout__fpstate_64__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit<_fpstate_64__bindgen_ty_1> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_fpstate_64__bindgen_ty_1>(), - 48usize, - concat!("Size of: ", stringify!(_fpstate_64__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::<_fpstate_64__bindgen_ty_1>(), - 8usize, - concat!("Alignment of ", stringify!(_fpstate_64__bindgen_ty_1)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved3) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_64__bindgen_ty_1), - "::", - stringify!(reserved3) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sw_reserved) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_64__bindgen_ty_1), - "::", - stringify!(sw_reserved) - ) - ); -} -#[test] -fn bindgen_test_layout__fpstate_64() { - const UNINIT: ::std::mem::MaybeUninit<_fpstate_64> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_fpstate_64>(), - 512usize, - concat!("Size of: ", stringify!(_fpstate_64)) - ); - assert_eq!( - ::std::mem::align_of::<_fpstate_64>(), - 8usize, - concat!("Alignment of ", stringify!(_fpstate_64)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cwd) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_64), - "::", - stringify!(cwd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).swd) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_64), - "::", - stringify!(swd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).twd) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_64), - "::", - stringify!(twd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fop) as usize - ptr as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_64), - "::", - stringify!(fop) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rip) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_64), - "::", - stringify!(rip) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rdp) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_64), - "::", - stringify!(rdp) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mxcsr) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_64), - "::", - stringify!(mxcsr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mxcsr_mask) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_64), - "::", - stringify!(mxcsr_mask) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).st_space) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_64), - "::", - stringify!(st_space) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).xmm_space) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_64), - "::", - stringify!(xmm_space) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved2) as usize - ptr as usize }, - 416usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_64), - "::", - stringify!(reserved2) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of _fpstate_64__bindgen_ty_1"] + [::std::mem::size_of::<_fpstate_64__bindgen_ty_1>() - 48usize]; + ["Alignment of _fpstate_64__bindgen_ty_1"] + [::std::mem::align_of::<_fpstate_64__bindgen_ty_1>() - 8usize]; + ["Offset of field: _fpstate_64__bindgen_ty_1::reserved3"] + [::std::mem::offset_of!(_fpstate_64__bindgen_ty_1, reserved3) - 0usize]; + ["Offset of field: _fpstate_64__bindgen_ty_1::sw_reserved"] + [::std::mem::offset_of!(_fpstate_64__bindgen_ty_1, sw_reserved) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of _fpstate_64"][::std::mem::size_of::<_fpstate_64>() - 512usize]; + ["Alignment of _fpstate_64"][::std::mem::align_of::<_fpstate_64>() - 8usize]; + ["Offset of field: _fpstate_64::cwd"][::std::mem::offset_of!(_fpstate_64, cwd) - 0usize]; + ["Offset of field: _fpstate_64::swd"][::std::mem::offset_of!(_fpstate_64, swd) - 2usize]; + ["Offset of field: _fpstate_64::twd"][::std::mem::offset_of!(_fpstate_64, twd) - 4usize]; + ["Offset of field: _fpstate_64::fop"][::std::mem::offset_of!(_fpstate_64, fop) - 6usize]; + ["Offset of field: _fpstate_64::rip"][::std::mem::offset_of!(_fpstate_64, rip) - 8usize]; + ["Offset of field: _fpstate_64::rdp"][::std::mem::offset_of!(_fpstate_64, rdp) - 16usize]; + ["Offset of field: _fpstate_64::mxcsr"][::std::mem::offset_of!(_fpstate_64, mxcsr) - 24usize]; + ["Offset of field: _fpstate_64::mxcsr_mask"] + [::std::mem::offset_of!(_fpstate_64, mxcsr_mask) - 28usize]; + ["Offset of field: _fpstate_64::st_space"] + [::std::mem::offset_of!(_fpstate_64, st_space) - 32usize]; + ["Offset of field: _fpstate_64::xmm_space"] + [::std::mem::offset_of!(_fpstate_64, xmm_space) - 160usize]; + ["Offset of field: _fpstate_64::reserved2"] + [::std::mem::offset_of!(_fpstate_64, reserved2) - 416usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _header { @@ -10786,81 +7902,26 @@ pub struct _header { pub reserved1: [__u64; 2usize], pub reserved2: [__u64; 5usize], } -#[test] -fn bindgen_test_layout__header() { - const UNINIT: ::std::mem::MaybeUninit<_header> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_header>(), - 64usize, - concat!("Size of: ", stringify!(_header)) - ); - assert_eq!( - ::std::mem::align_of::<_header>(), - 8usize, - concat!("Alignment of ", stringify!(_header)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).xfeatures) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_header), - "::", - stringify!(xfeatures) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved1) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_header), - "::", - stringify!(reserved1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved2) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_header), - "::", - stringify!(reserved2) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of _header"][::std::mem::size_of::<_header>() - 64usize]; + ["Alignment of _header"][::std::mem::align_of::<_header>() - 8usize]; + ["Offset of field: _header::xfeatures"][::std::mem::offset_of!(_header, xfeatures) - 0usize]; + ["Offset of field: _header::reserved1"][::std::mem::offset_of!(_header, reserved1) - 8usize]; + ["Offset of field: _header::reserved2"][::std::mem::offset_of!(_header, reserved2) - 24usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _ymmh_state { pub ymmh_space: [__u32; 64usize], } -#[test] -fn bindgen_test_layout__ymmh_state() { - const UNINIT: ::std::mem::MaybeUninit<_ymmh_state> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_ymmh_state>(), - 256usize, - concat!("Size of: ", stringify!(_ymmh_state)) - ); - assert_eq!( - ::std::mem::align_of::<_ymmh_state>(), - 4usize, - concat!("Alignment of ", stringify!(_ymmh_state)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ymmh_space) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_ymmh_state), - "::", - stringify!(ymmh_space) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of _ymmh_state"][::std::mem::size_of::<_ymmh_state>() - 256usize]; + ["Alignment of _ymmh_state"][::std::mem::align_of::<_ymmh_state>() - 4usize]; + ["Offset of field: _ymmh_state::ymmh_space"] + [::std::mem::offset_of!(_ymmh_state, ymmh_space) - 0usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub struct _xstate { @@ -10868,51 +7929,15 @@ pub struct _xstate { pub xstate_hdr: _header, pub ymmh: _ymmh_state, } -#[test] -fn bindgen_test_layout__xstate() { - const UNINIT: ::std::mem::MaybeUninit<_xstate> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_xstate>(), - 832usize, - concat!("Size of: ", stringify!(_xstate)) - ); - assert_eq!( - ::std::mem::align_of::<_xstate>(), - 8usize, - concat!("Alignment of ", stringify!(_xstate)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fpstate) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_xstate), - "::", - stringify!(fpstate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).xstate_hdr) as usize - ptr as usize }, - 512usize, - concat!( - "Offset of field: ", - stringify!(_xstate), - "::", - stringify!(xstate_hdr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ymmh) as usize - ptr as usize }, - 576usize, - concat!( - "Offset of field: ", - stringify!(_xstate), - "::", - stringify!(ymmh) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of _xstate"][::std::mem::size_of::<_xstate>() - 832usize]; + ["Alignment of _xstate"][::std::mem::align_of::<_xstate>() - 8usize]; + ["Offset of field: _xstate::fpstate"][::std::mem::offset_of!(_xstate, fpstate) - 0usize]; + ["Offset of field: _xstate::xstate_hdr"] + [::std::mem::offset_of!(_xstate, xstate_hdr) - 512usize]; + ["Offset of field: _xstate::ymmh"][::std::mem::offset_of!(_xstate, ymmh) - 576usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct sigcontext_32 { @@ -10945,301 +7970,50 @@ pub struct sigcontext_32 { pub oldmask: __u32, pub cr2: __u32, } -#[test] -fn bindgen_test_layout_sigcontext_32() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 88usize, - concat!("Size of: ", stringify!(sigcontext_32)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(sigcontext_32)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gs) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(gs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__gsh) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(__gsh) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fs) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(fs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__fsh) as usize - ptr as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(__fsh) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).es) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(es) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__esh) as usize - ptr as usize }, - 10usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(__esh) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ds) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(ds) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__dsh) as usize - ptr as usize }, - 14usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(__dsh) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).di) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(di) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).si) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(si) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bp) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(bp) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sp) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(sp) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bx) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(bx) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dx) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(dx) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cx) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(cx) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ax) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(ax) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).trapno) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(trapno) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).err) as usize - ptr as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(err) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ip) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(ip) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cs) as usize - ptr as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(cs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__csh) as usize - ptr as usize }, - 62usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(__csh) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sp_at_signal) as usize - ptr as usize }, - 68usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(sp_at_signal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ss) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(ss) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__ssh) as usize - ptr as usize }, - 74usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(__ssh) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fpstate) as usize - ptr as usize }, - 76usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(fpstate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).oldmask) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(oldmask) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cr2) as usize - ptr as usize }, - 84usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(cr2) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sigcontext_32"][::std::mem::size_of::() - 88usize]; + ["Alignment of sigcontext_32"][::std::mem::align_of::() - 4usize]; + ["Offset of field: sigcontext_32::gs"][::std::mem::offset_of!(sigcontext_32, gs) - 0usize]; + ["Offset of field: sigcontext_32::__gsh"] + [::std::mem::offset_of!(sigcontext_32, __gsh) - 2usize]; + ["Offset of field: sigcontext_32::fs"][::std::mem::offset_of!(sigcontext_32, fs) - 4usize]; + ["Offset of field: sigcontext_32::__fsh"] + [::std::mem::offset_of!(sigcontext_32, __fsh) - 6usize]; + ["Offset of field: sigcontext_32::es"][::std::mem::offset_of!(sigcontext_32, es) - 8usize]; + ["Offset of field: sigcontext_32::__esh"] + [::std::mem::offset_of!(sigcontext_32, __esh) - 10usize]; + ["Offset of field: sigcontext_32::ds"][::std::mem::offset_of!(sigcontext_32, ds) - 12usize]; + ["Offset of field: sigcontext_32::__dsh"] + [::std::mem::offset_of!(sigcontext_32, __dsh) - 14usize]; + ["Offset of field: sigcontext_32::di"][::std::mem::offset_of!(sigcontext_32, di) - 16usize]; + ["Offset of field: sigcontext_32::si"][::std::mem::offset_of!(sigcontext_32, si) - 20usize]; + ["Offset of field: sigcontext_32::bp"][::std::mem::offset_of!(sigcontext_32, bp) - 24usize]; + ["Offset of field: sigcontext_32::sp"][::std::mem::offset_of!(sigcontext_32, sp) - 28usize]; + ["Offset of field: sigcontext_32::bx"][::std::mem::offset_of!(sigcontext_32, bx) - 32usize]; + ["Offset of field: sigcontext_32::dx"][::std::mem::offset_of!(sigcontext_32, dx) - 36usize]; + ["Offset of field: sigcontext_32::cx"][::std::mem::offset_of!(sigcontext_32, cx) - 40usize]; + ["Offset of field: sigcontext_32::ax"][::std::mem::offset_of!(sigcontext_32, ax) - 44usize]; + ["Offset of field: sigcontext_32::trapno"] + [::std::mem::offset_of!(sigcontext_32, trapno) - 48usize]; + ["Offset of field: sigcontext_32::err"][::std::mem::offset_of!(sigcontext_32, err) - 52usize]; + ["Offset of field: sigcontext_32::ip"][::std::mem::offset_of!(sigcontext_32, ip) - 56usize]; + ["Offset of field: sigcontext_32::cs"][::std::mem::offset_of!(sigcontext_32, cs) - 60usize]; + ["Offset of field: sigcontext_32::__csh"] + [::std::mem::offset_of!(sigcontext_32, __csh) - 62usize]; + ["Offset of field: sigcontext_32::flags"] + [::std::mem::offset_of!(sigcontext_32, flags) - 64usize]; + ["Offset of field: sigcontext_32::sp_at_signal"] + [::std::mem::offset_of!(sigcontext_32, sp_at_signal) - 68usize]; + ["Offset of field: sigcontext_32::ss"][::std::mem::offset_of!(sigcontext_32, ss) - 72usize]; + ["Offset of field: sigcontext_32::__ssh"] + [::std::mem::offset_of!(sigcontext_32, __ssh) - 74usize]; + ["Offset of field: sigcontext_32::fpstate"] + [::std::mem::offset_of!(sigcontext_32, fpstate) - 76usize]; + ["Offset of field: sigcontext_32::oldmask"] + [::std::mem::offset_of!(sigcontext_32, oldmask) - 80usize]; + ["Offset of field: sigcontext_32::cr2"][::std::mem::offset_of!(sigcontext_32, cr2) - 84usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct sigcontext_64 { @@ -11272,301 +8046,44 @@ pub struct sigcontext_64 { pub fpstate: __u64, pub reserved1: [__u64; 8usize], } -#[test] -fn bindgen_test_layout_sigcontext_64() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 256usize, - concat!("Size of: ", stringify!(sigcontext_64)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(sigcontext_64)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).r8) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(r8) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).r9) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(r9) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).r10) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(r10) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).r11) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(r11) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).r12) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(r12) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).r13) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(r13) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).r14) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(r14) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).r15) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(r15) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).di) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(di) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).si) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(si) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bp) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(bp) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bx) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(bx) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dx) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(dx) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ax) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(ax) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cx) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(cx) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sp) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(sp) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ip) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(ip) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cs) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(cs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gs) as usize - ptr as usize }, - 146usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(gs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fs) as usize - ptr as usize }, - 148usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(fs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ss) as usize - ptr as usize }, - 150usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(ss) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).err) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(err) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).trapno) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(trapno) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).oldmask) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(oldmask) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cr2) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(cr2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fpstate) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(fpstate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved1) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(reserved1) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sigcontext_64"][::std::mem::size_of::() - 256usize]; + ["Alignment of sigcontext_64"][::std::mem::align_of::() - 8usize]; + ["Offset of field: sigcontext_64::r8"][::std::mem::offset_of!(sigcontext_64, r8) - 0usize]; + ["Offset of field: sigcontext_64::r9"][::std::mem::offset_of!(sigcontext_64, r9) - 8usize]; + ["Offset of field: sigcontext_64::r10"][::std::mem::offset_of!(sigcontext_64, r10) - 16usize]; + ["Offset of field: sigcontext_64::r11"][::std::mem::offset_of!(sigcontext_64, r11) - 24usize]; + ["Offset of field: sigcontext_64::r12"][::std::mem::offset_of!(sigcontext_64, r12) - 32usize]; + ["Offset of field: sigcontext_64::r13"][::std::mem::offset_of!(sigcontext_64, r13) - 40usize]; + ["Offset of field: sigcontext_64::r14"][::std::mem::offset_of!(sigcontext_64, r14) - 48usize]; + ["Offset of field: sigcontext_64::r15"][::std::mem::offset_of!(sigcontext_64, r15) - 56usize]; + ["Offset of field: sigcontext_64::di"][::std::mem::offset_of!(sigcontext_64, di) - 64usize]; + ["Offset of field: sigcontext_64::si"][::std::mem::offset_of!(sigcontext_64, si) - 72usize]; + ["Offset of field: sigcontext_64::bp"][::std::mem::offset_of!(sigcontext_64, bp) - 80usize]; + ["Offset of field: sigcontext_64::bx"][::std::mem::offset_of!(sigcontext_64, bx) - 88usize]; + ["Offset of field: sigcontext_64::dx"][::std::mem::offset_of!(sigcontext_64, dx) - 96usize]; + ["Offset of field: sigcontext_64::ax"][::std::mem::offset_of!(sigcontext_64, ax) - 104usize]; + ["Offset of field: sigcontext_64::cx"][::std::mem::offset_of!(sigcontext_64, cx) - 112usize]; + ["Offset of field: sigcontext_64::sp"][::std::mem::offset_of!(sigcontext_64, sp) - 120usize]; + ["Offset of field: sigcontext_64::ip"][::std::mem::offset_of!(sigcontext_64, ip) - 128usize]; + ["Offset of field: sigcontext_64::flags"] + [::std::mem::offset_of!(sigcontext_64, flags) - 136usize]; + ["Offset of field: sigcontext_64::cs"][::std::mem::offset_of!(sigcontext_64, cs) - 144usize]; + ["Offset of field: sigcontext_64::gs"][::std::mem::offset_of!(sigcontext_64, gs) - 146usize]; + ["Offset of field: sigcontext_64::fs"][::std::mem::offset_of!(sigcontext_64, fs) - 148usize]; + ["Offset of field: sigcontext_64::ss"][::std::mem::offset_of!(sigcontext_64, ss) - 150usize]; + ["Offset of field: sigcontext_64::err"][::std::mem::offset_of!(sigcontext_64, err) - 152usize]; + ["Offset of field: sigcontext_64::trapno"] + [::std::mem::offset_of!(sigcontext_64, trapno) - 160usize]; + ["Offset of field: sigcontext_64::oldmask"] + [::std::mem::offset_of!(sigcontext_64, oldmask) - 168usize]; + ["Offset of field: sigcontext_64::cr2"][::std::mem::offset_of!(sigcontext_64, cr2) - 176usize]; + ["Offset of field: sigcontext_64::fpstate"] + [::std::mem::offset_of!(sigcontext_64, fpstate) - 184usize]; + ["Offset of field: sigcontext_64::reserved1"] + [::std::mem::offset_of!(sigcontext_64, reserved1) - 192usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub struct sigcontext { @@ -11605,327 +8122,52 @@ pub union sigcontext__bindgen_ty_1 { pub ss: __u16, pub __pad0: __u16, } -#[test] -fn bindgen_test_layout_sigcontext__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 2usize, - concat!("Size of: ", stringify!(sigcontext__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 2usize, - concat!("Alignment of ", stringify!(sigcontext__bindgen_ty_1)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ss) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigcontext__bindgen_ty_1), - "::", - stringify!(ss) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__pad0) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigcontext__bindgen_ty_1), - "::", - stringify!(__pad0) - ) - ); -} -#[test] -fn bindgen_test_layout_sigcontext() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 256usize, - concat!("Size of: ", stringify!(sigcontext)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(sigcontext)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).r8) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(r8) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).r9) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(r9) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).r10) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(r10) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).r11) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(r11) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).r12) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(r12) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).r13) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(r13) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).r14) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(r14) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).r15) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(r15) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rdi) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(rdi) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rsi) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(rsi) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rbp) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(rbp) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rbx) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(rbx) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rdx) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(rdx) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rax) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(rax) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rcx) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(rcx) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rsp) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(rsp) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rip) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(rip) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).eflags) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(eflags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cs) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(cs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gs) as usize - ptr as usize }, - 146usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(gs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fs) as usize - ptr as usize }, - 148usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(fs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).err) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(err) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).trapno) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(trapno) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).oldmask) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(oldmask) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cr2) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(cr2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fpstate) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(fpstate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved1) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(reserved1) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sigcontext__bindgen_ty_1"] + [::std::mem::size_of::() - 2usize]; + ["Alignment of sigcontext__bindgen_ty_1"] + [::std::mem::align_of::() - 2usize]; + ["Offset of field: sigcontext__bindgen_ty_1::ss"] + [::std::mem::offset_of!(sigcontext__bindgen_ty_1, ss) - 0usize]; + ["Offset of field: sigcontext__bindgen_ty_1::__pad0"] + [::std::mem::offset_of!(sigcontext__bindgen_ty_1, __pad0) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sigcontext"][::std::mem::size_of::() - 256usize]; + ["Alignment of sigcontext"][::std::mem::align_of::() - 8usize]; + ["Offset of field: sigcontext::r8"][::std::mem::offset_of!(sigcontext, r8) - 0usize]; + ["Offset of field: sigcontext::r9"][::std::mem::offset_of!(sigcontext, r9) - 8usize]; + ["Offset of field: sigcontext::r10"][::std::mem::offset_of!(sigcontext, r10) - 16usize]; + ["Offset of field: sigcontext::r11"][::std::mem::offset_of!(sigcontext, r11) - 24usize]; + ["Offset of field: sigcontext::r12"][::std::mem::offset_of!(sigcontext, r12) - 32usize]; + ["Offset of field: sigcontext::r13"][::std::mem::offset_of!(sigcontext, r13) - 40usize]; + ["Offset of field: sigcontext::r14"][::std::mem::offset_of!(sigcontext, r14) - 48usize]; + ["Offset of field: sigcontext::r15"][::std::mem::offset_of!(sigcontext, r15) - 56usize]; + ["Offset of field: sigcontext::rdi"][::std::mem::offset_of!(sigcontext, rdi) - 64usize]; + ["Offset of field: sigcontext::rsi"][::std::mem::offset_of!(sigcontext, rsi) - 72usize]; + ["Offset of field: sigcontext::rbp"][::std::mem::offset_of!(sigcontext, rbp) - 80usize]; + ["Offset of field: sigcontext::rbx"][::std::mem::offset_of!(sigcontext, rbx) - 88usize]; + ["Offset of field: sigcontext::rdx"][::std::mem::offset_of!(sigcontext, rdx) - 96usize]; + ["Offset of field: sigcontext::rax"][::std::mem::offset_of!(sigcontext, rax) - 104usize]; + ["Offset of field: sigcontext::rcx"][::std::mem::offset_of!(sigcontext, rcx) - 112usize]; + ["Offset of field: sigcontext::rsp"][::std::mem::offset_of!(sigcontext, rsp) - 120usize]; + ["Offset of field: sigcontext::rip"][::std::mem::offset_of!(sigcontext, rip) - 128usize]; + ["Offset of field: sigcontext::eflags"][::std::mem::offset_of!(sigcontext, eflags) - 136usize]; + ["Offset of field: sigcontext::cs"][::std::mem::offset_of!(sigcontext, cs) - 144usize]; + ["Offset of field: sigcontext::gs"][::std::mem::offset_of!(sigcontext, gs) - 146usize]; + ["Offset of field: sigcontext::fs"][::std::mem::offset_of!(sigcontext, fs) - 148usize]; + ["Offset of field: sigcontext::err"][::std::mem::offset_of!(sigcontext, err) - 152usize]; + ["Offset of field: sigcontext::trapno"][::std::mem::offset_of!(sigcontext, trapno) - 160usize]; + ["Offset of field: sigcontext::oldmask"] + [::std::mem::offset_of!(sigcontext, oldmask) - 168usize]; + ["Offset of field: sigcontext::cr2"][::std::mem::offset_of!(sigcontext, cr2) - 176usize]; + ["Offset of field: sigcontext::fpstate"] + [::std::mem::offset_of!(sigcontext, fpstate) - 184usize]; + ["Offset of field: sigcontext::reserved1"] + [::std::mem::offset_of!(sigcontext, reserved1) - 192usize]; +}; pub type sigset_t = ::std::os::raw::c_ulong; pub type __signalfn_t = ::std::option::Option; pub type __sighandler_t = __signalfn_t; @@ -11939,61 +8181,19 @@ pub struct __kernel_sigaction { pub sa_restorer: __sigrestore_t, pub sa_mask: sigset_t, } -#[test] -fn bindgen_test_layout___kernel_sigaction() { - const UNINIT: ::std::mem::MaybeUninit<__kernel_sigaction> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__kernel_sigaction>(), - 32usize, - concat!("Size of: ", stringify!(__kernel_sigaction)) - ); - assert_eq!( - ::std::mem::align_of::<__kernel_sigaction>(), - 8usize, - concat!("Alignment of ", stringify!(__kernel_sigaction)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sa_handler) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__kernel_sigaction), - "::", - stringify!(sa_handler) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sa_flags) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__kernel_sigaction), - "::", - stringify!(sa_flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sa_restorer) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__kernel_sigaction), - "::", - stringify!(sa_restorer) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sa_mask) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(__kernel_sigaction), - "::", - stringify!(sa_mask) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __kernel_sigaction"][::std::mem::size_of::<__kernel_sigaction>() - 32usize]; + ["Alignment of __kernel_sigaction"][::std::mem::align_of::<__kernel_sigaction>() - 8usize]; + ["Offset of field: __kernel_sigaction::sa_handler"] + [::std::mem::offset_of!(__kernel_sigaction, sa_handler) - 0usize]; + ["Offset of field: __kernel_sigaction::sa_flags"] + [::std::mem::offset_of!(__kernel_sigaction, sa_flags) - 8usize]; + ["Offset of field: __kernel_sigaction::sa_restorer"] + [::std::mem::offset_of!(__kernel_sigaction, sa_restorer) - 16usize]; + ["Offset of field: __kernel_sigaction::sa_mask"] + [::std::mem::offset_of!(__kernel_sigaction, sa_mask) - 24usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct sigaltstack { @@ -12001,51 +8201,16 @@ pub struct sigaltstack { pub ss_flags: ::std::os::raw::c_int, pub ss_size: __kernel_size_t, } -#[test] -fn bindgen_test_layout_sigaltstack() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(sigaltstack)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(sigaltstack)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ss_sp) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigaltstack), - "::", - stringify!(ss_sp) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ss_flags) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(sigaltstack), - "::", - stringify!(ss_flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ss_size) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(sigaltstack), - "::", - stringify!(ss_size) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sigaltstack"][::std::mem::size_of::() - 24usize]; + ["Alignment of sigaltstack"][::std::mem::align_of::() - 8usize]; + ["Offset of field: sigaltstack::ss_sp"][::std::mem::offset_of!(sigaltstack, ss_sp) - 0usize]; + ["Offset of field: sigaltstack::ss_flags"] + [::std::mem::offset_of!(sigaltstack, ss_flags) - 8usize]; + ["Offset of field: sigaltstack::ss_size"] + [::std::mem::offset_of!(sigaltstack, ss_size) - 16usize]; +}; pub type stack_t = sigaltstack; #[repr(C)] #[derive(Copy, Clone)] @@ -12053,41 +8218,13 @@ pub union sigval { pub sival_int: ::std::os::raw::c_int, pub sival_ptr: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout_sigval() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(sigval)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(sigval)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sival_int) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigval), - "::", - stringify!(sival_int) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sival_ptr) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigval), - "::", - stringify!(sival_ptr) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sigval"][::std::mem::size_of::() - 8usize]; + ["Alignment of sigval"][::std::mem::align_of::() - 8usize]; + ["Offset of field: sigval::sival_int"][::std::mem::offset_of!(sigval, sival_int) - 0usize]; + ["Offset of field: sigval::sival_ptr"][::std::mem::offset_of!(sigval, sival_ptr) - 0usize]; +}; pub type sigval_t = sigval; #[repr(C)] #[derive(Copy, Clone)] @@ -12106,42 +8243,17 @@ pub struct __sifields__bindgen_ty_1 { pub _pid: __kernel_pid_t, pub _uid: __kernel_uid32_t, } -#[test] -fn bindgen_test_layout___sifields__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit<__sifields__bindgen_ty_1> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__sifields__bindgen_ty_1>(), - 8usize, - concat!("Size of: ", stringify!(__sifields__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::<__sifields__bindgen_ty_1>(), - 4usize, - concat!("Alignment of ", stringify!(__sifields__bindgen_ty_1)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._pid) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_1), - "::", - stringify!(_pid) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._uid) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_1), - "::", - stringify!(_uid) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __sifields__bindgen_ty_1"] + [::std::mem::size_of::<__sifields__bindgen_ty_1>() - 8usize]; + ["Alignment of __sifields__bindgen_ty_1"] + [::std::mem::align_of::<__sifields__bindgen_ty_1>() - 4usize]; + ["Offset of field: __sifields__bindgen_ty_1::_pid"] + [::std::mem::offset_of!(__sifields__bindgen_ty_1, _pid) - 0usize]; + ["Offset of field: __sifields__bindgen_ty_1::_uid"] + [::std::mem::offset_of!(__sifields__bindgen_ty_1, _uid) - 4usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub struct __sifields__bindgen_ty_2 { @@ -12150,62 +8262,21 @@ pub struct __sifields__bindgen_ty_2 { pub _sigval: sigval_t, pub _sys_private: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout___sifields__bindgen_ty_2() { - const UNINIT: ::std::mem::MaybeUninit<__sifields__bindgen_ty_2> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__sifields__bindgen_ty_2>(), - 24usize, - concat!("Size of: ", stringify!(__sifields__bindgen_ty_2)) - ); - assert_eq!( - ::std::mem::align_of::<__sifields__bindgen_ty_2>(), - 8usize, - concat!("Alignment of ", stringify!(__sifields__bindgen_ty_2)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._tid) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_2), - "::", - stringify!(_tid) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._overrun) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_2), - "::", - stringify!(_overrun) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._sigval) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_2), - "::", - stringify!(_sigval) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._sys_private) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_2), - "::", - stringify!(_sys_private) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __sifields__bindgen_ty_2"] + [::std::mem::size_of::<__sifields__bindgen_ty_2>() - 24usize]; + ["Alignment of __sifields__bindgen_ty_2"] + [::std::mem::align_of::<__sifields__bindgen_ty_2>() - 8usize]; + ["Offset of field: __sifields__bindgen_ty_2::_tid"] + [::std::mem::offset_of!(__sifields__bindgen_ty_2, _tid) - 0usize]; + ["Offset of field: __sifields__bindgen_ty_2::_overrun"] + [::std::mem::offset_of!(__sifields__bindgen_ty_2, _overrun) - 4usize]; + ["Offset of field: __sifields__bindgen_ty_2::_sigval"] + [::std::mem::offset_of!(__sifields__bindgen_ty_2, _sigval) - 8usize]; + ["Offset of field: __sifields__bindgen_ty_2::_sys_private"] + [::std::mem::offset_of!(__sifields__bindgen_ty_2, _sys_private) - 16usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub struct __sifields__bindgen_ty_3 { @@ -12213,52 +8284,19 @@ pub struct __sifields__bindgen_ty_3 { pub _uid: __kernel_uid32_t, pub _sigval: sigval_t, } -#[test] -fn bindgen_test_layout___sifields__bindgen_ty_3() { - const UNINIT: ::std::mem::MaybeUninit<__sifields__bindgen_ty_3> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__sifields__bindgen_ty_3>(), - 16usize, - concat!("Size of: ", stringify!(__sifields__bindgen_ty_3)) - ); - assert_eq!( - ::std::mem::align_of::<__sifields__bindgen_ty_3>(), - 8usize, - concat!("Alignment of ", stringify!(__sifields__bindgen_ty_3)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._pid) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_3), - "::", - stringify!(_pid) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._uid) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_3), - "::", - stringify!(_uid) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._sigval) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_3), - "::", - stringify!(_sigval) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __sifields__bindgen_ty_3"] + [::std::mem::size_of::<__sifields__bindgen_ty_3>() - 16usize]; + ["Alignment of __sifields__bindgen_ty_3"] + [::std::mem::align_of::<__sifields__bindgen_ty_3>() - 8usize]; + ["Offset of field: __sifields__bindgen_ty_3::_pid"] + [::std::mem::offset_of!(__sifields__bindgen_ty_3, _pid) - 0usize]; + ["Offset of field: __sifields__bindgen_ty_3::_uid"] + [::std::mem::offset_of!(__sifields__bindgen_ty_3, _uid) - 4usize]; + ["Offset of field: __sifields__bindgen_ty_3::_sigval"] + [::std::mem::offset_of!(__sifields__bindgen_ty_3, _sigval) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __sifields__bindgen_ty_4 { @@ -12268,72 +8306,23 @@ pub struct __sifields__bindgen_ty_4 { pub _utime: __kernel_clock_t, pub _stime: __kernel_clock_t, } -#[test] -fn bindgen_test_layout___sifields__bindgen_ty_4() { - const UNINIT: ::std::mem::MaybeUninit<__sifields__bindgen_ty_4> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__sifields__bindgen_ty_4>(), - 32usize, - concat!("Size of: ", stringify!(__sifields__bindgen_ty_4)) - ); - assert_eq!( - ::std::mem::align_of::<__sifields__bindgen_ty_4>(), - 8usize, - concat!("Alignment of ", stringify!(__sifields__bindgen_ty_4)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._pid) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_4), - "::", - stringify!(_pid) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._uid) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_4), - "::", - stringify!(_uid) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._status) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_4), - "::", - stringify!(_status) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._utime) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_4), - "::", - stringify!(_utime) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._stime) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_4), - "::", - stringify!(_stime) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __sifields__bindgen_ty_4"] + [::std::mem::size_of::<__sifields__bindgen_ty_4>() - 32usize]; + ["Alignment of __sifields__bindgen_ty_4"] + [::std::mem::align_of::<__sifields__bindgen_ty_4>() - 8usize]; + ["Offset of field: __sifields__bindgen_ty_4::_pid"] + [::std::mem::offset_of!(__sifields__bindgen_ty_4, _pid) - 0usize]; + ["Offset of field: __sifields__bindgen_ty_4::_uid"] + [::std::mem::offset_of!(__sifields__bindgen_ty_4, _uid) - 4usize]; + ["Offset of field: __sifields__bindgen_ty_4::_status"] + [::std::mem::offset_of!(__sifields__bindgen_ty_4, _status) - 8usize]; + ["Offset of field: __sifields__bindgen_ty_4::_utime"] + [::std::mem::offset_of!(__sifields__bindgen_ty_4, _utime) - 16usize]; + ["Offset of field: __sifields__bindgen_ty_4::_stime"] + [::std::mem::offset_of!(__sifields__bindgen_ty_4, _stime) - 24usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub struct __sifields__bindgen_ty_5 { @@ -12356,106 +8345,48 @@ pub struct __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1 { pub _lower: *mut ::std::os::raw::c_void, pub _upper: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout___sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1>(), - 24usize, - concat!( - "Size of: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1>(), - 8usize, - concat!( - "Alignment of ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._dummy_bnd) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(_dummy_bnd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._lower) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(_lower) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._upper) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(_upper) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::size_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1>() - 24usize]; + ["Alignment of __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::align_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1>() - 8usize]; + ["Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1::_dummy_bnd"][::std::mem::offset_of!( + __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1, + _dummy_bnd + ) + - 0usize]; + ["Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1::_lower"][::std::mem::offset_of!( + __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1, + _lower + ) - 8usize]; + ["Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1::_upper"][::std::mem::offset_of!( + __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1, + _upper + ) - 16usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2 { pub _dummy_pkey: [::std::os::raw::c_char; 8usize], pub _pkey: __u32, } -#[test] -fn bindgen_test_layout___sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2() { - const UNINIT: ::std::mem::MaybeUninit<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2>(), - 12usize, - concat!( - "Size of: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2) - ) - ); - assert_eq!( - ::std::mem::align_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2>(), - 4usize, - concat!( - "Alignment of ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._dummy_pkey) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(_dummy_pkey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._pkey) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(_pkey) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2"] + [::std::mem::size_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2>() - 12usize]; + ["Alignment of __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2"] + [::std::mem::align_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2>() - 4usize]; + ["Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2::_dummy_pkey"][::std::mem::offset_of!( + __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2, + _dummy_pkey + ) + - 0usize]; + ["Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2::_pkey"][::std::mem::offset_of!( + __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2, + _pkey + ) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3 { @@ -12463,198 +8394,68 @@ pub struct __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3 { pub _type: __u32, pub _flags: __u32, } -#[test] -fn bindgen_test_layout___sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3() { - const UNINIT: ::std::mem::MaybeUninit<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3>(), - 16usize, - concat!( - "Size of: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3) - ) - ); - assert_eq!( - ::std::mem::align_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3>(), - 8usize, - concat!( - "Alignment of ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._data) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(_data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._type) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(_type) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._flags) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(_flags) - ) - ); -} -#[test] -fn bindgen_test_layout___sifields__bindgen_ty_5__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit<__sifields__bindgen_ty_5__bindgen_ty_1> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__sifields__bindgen_ty_5__bindgen_ty_1>(), - 24usize, - concat!( - "Size of: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::<__sifields__bindgen_ty_5__bindgen_ty_1>(), - 8usize, - concat!( - "Alignment of ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._trapno) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1), - "::", - stringify!(_trapno) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._addr_lsb) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1), - "::", - stringify!(_addr_lsb) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._addr_bnd) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1), - "::", - stringify!(_addr_bnd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._addr_pkey) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1), - "::", - stringify!(_addr_pkey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._perf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1), - "::", - stringify!(_perf) - ) - ); -} -#[test] -fn bindgen_test_layout___sifields__bindgen_ty_5() { - const UNINIT: ::std::mem::MaybeUninit<__sifields__bindgen_ty_5> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__sifields__bindgen_ty_5>(), - 32usize, - concat!("Size of: ", stringify!(__sifields__bindgen_ty_5)) - ); - assert_eq!( - ::std::mem::align_of::<__sifields__bindgen_ty_5>(), - 8usize, - concat!("Alignment of ", stringify!(__sifields__bindgen_ty_5)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._addr) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5), - "::", - stringify!(_addr) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3"] + [::std::mem::size_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3>() - 16usize]; + ["Alignment of __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3"] + [::std::mem::align_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3>() - 8usize]; + ["Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3::_data"][::std::mem::offset_of!( + __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3, + _data + ) - 0usize]; + ["Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3::_type"][::std::mem::offset_of!( + __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3, + _type + ) - 8usize]; + ["Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3::_flags"][::std::mem::offset_of!( + __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3, + _flags + ) - 12usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __sifields__bindgen_ty_5__bindgen_ty_1"] + [::std::mem::size_of::<__sifields__bindgen_ty_5__bindgen_ty_1>() - 24usize]; + ["Alignment of __sifields__bindgen_ty_5__bindgen_ty_1"] + [::std::mem::align_of::<__sifields__bindgen_ty_5__bindgen_ty_1>() - 8usize]; + ["Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1::_trapno"] + [::std::mem::offset_of!(__sifields__bindgen_ty_5__bindgen_ty_1, _trapno) - 0usize]; + ["Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1::_addr_lsb"] + [::std::mem::offset_of!(__sifields__bindgen_ty_5__bindgen_ty_1, _addr_lsb) - 0usize]; + ["Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1::_addr_bnd"] + [::std::mem::offset_of!(__sifields__bindgen_ty_5__bindgen_ty_1, _addr_bnd) - 0usize]; + ["Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1::_addr_pkey"] + [::std::mem::offset_of!(__sifields__bindgen_ty_5__bindgen_ty_1, _addr_pkey) - 0usize]; + ["Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1::_perf"] + [::std::mem::offset_of!(__sifields__bindgen_ty_5__bindgen_ty_1, _perf) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __sifields__bindgen_ty_5"] + [::std::mem::size_of::<__sifields__bindgen_ty_5>() - 32usize]; + ["Alignment of __sifields__bindgen_ty_5"] + [::std::mem::align_of::<__sifields__bindgen_ty_5>() - 8usize]; + ["Offset of field: __sifields__bindgen_ty_5::_addr"] + [::std::mem::offset_of!(__sifields__bindgen_ty_5, _addr) - 0usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __sifields__bindgen_ty_6 { pub _band: ::std::os::raw::c_long, pub _fd: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout___sifields__bindgen_ty_6() { - const UNINIT: ::std::mem::MaybeUninit<__sifields__bindgen_ty_6> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__sifields__bindgen_ty_6>(), - 16usize, - concat!("Size of: ", stringify!(__sifields__bindgen_ty_6)) - ); - assert_eq!( - ::std::mem::align_of::<__sifields__bindgen_ty_6>(), - 8usize, - concat!("Alignment of ", stringify!(__sifields__bindgen_ty_6)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._band) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_6), - "::", - stringify!(_band) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._fd) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_6), - "::", - stringify!(_fd) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __sifields__bindgen_ty_6"] + [::std::mem::size_of::<__sifields__bindgen_ty_6>() - 16usize]; + ["Alignment of __sifields__bindgen_ty_6"] + [::std::mem::align_of::<__sifields__bindgen_ty_6>() - 8usize]; + ["Offset of field: __sifields__bindgen_ty_6::_band"] + [::std::mem::offset_of!(__sifields__bindgen_ty_6, _band) - 0usize]; + ["Offset of field: __sifields__bindgen_ty_6::_fd"] + [::std::mem::offset_of!(__sifields__bindgen_ty_6, _fd) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __sifields__bindgen_ty_7 { @@ -12662,137 +8463,34 @@ pub struct __sifields__bindgen_ty_7 { pub _syscall: ::std::os::raw::c_int, pub _arch: ::std::os::raw::c_uint, } -#[test] -fn bindgen_test_layout___sifields__bindgen_ty_7() { - const UNINIT: ::std::mem::MaybeUninit<__sifields__bindgen_ty_7> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__sifields__bindgen_ty_7>(), - 16usize, - concat!("Size of: ", stringify!(__sifields__bindgen_ty_7)) - ); - assert_eq!( - ::std::mem::align_of::<__sifields__bindgen_ty_7>(), - 8usize, - concat!("Alignment of ", stringify!(__sifields__bindgen_ty_7)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._call_addr) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_7), - "::", - stringify!(_call_addr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._syscall) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_7), - "::", - stringify!(_syscall) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._arch) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_7), - "::", - stringify!(_arch) - ) - ); -} -#[test] -fn bindgen_test_layout___sifields() { - const UNINIT: ::std::mem::MaybeUninit<__sifields> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__sifields>(), - 32usize, - concat!("Size of: ", stringify!(__sifields)) - ); - assert_eq!( - ::std::mem::align_of::<__sifields>(), - 8usize, - concat!("Alignment of ", stringify!(__sifields)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._kill) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields), - "::", - stringify!(_kill) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._timer) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields), - "::", - stringify!(_timer) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._rt) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields), - "::", - stringify!(_rt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._sigchld) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields), - "::", - stringify!(_sigchld) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._sigfault) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields), - "::", - stringify!(_sigfault) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._sigpoll) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields), - "::", - stringify!(_sigpoll) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._sigsys) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields), - "::", - stringify!(_sigsys) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __sifields__bindgen_ty_7"] + [::std::mem::size_of::<__sifields__bindgen_ty_7>() - 16usize]; + ["Alignment of __sifields__bindgen_ty_7"] + [::std::mem::align_of::<__sifields__bindgen_ty_7>() - 8usize]; + ["Offset of field: __sifields__bindgen_ty_7::_call_addr"] + [::std::mem::offset_of!(__sifields__bindgen_ty_7, _call_addr) - 0usize]; + ["Offset of field: __sifields__bindgen_ty_7::_syscall"] + [::std::mem::offset_of!(__sifields__bindgen_ty_7, _syscall) - 8usize]; + ["Offset of field: __sifields__bindgen_ty_7::_arch"] + [::std::mem::offset_of!(__sifields__bindgen_ty_7, _arch) - 12usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __sifields"][::std::mem::size_of::<__sifields>() - 32usize]; + ["Alignment of __sifields"][::std::mem::align_of::<__sifields>() - 8usize]; + ["Offset of field: __sifields::_kill"][::std::mem::offset_of!(__sifields, _kill) - 0usize]; + ["Offset of field: __sifields::_timer"][::std::mem::offset_of!(__sifields, _timer) - 0usize]; + ["Offset of field: __sifields::_rt"][::std::mem::offset_of!(__sifields, _rt) - 0usize]; + ["Offset of field: __sifields::_sigchld"] + [::std::mem::offset_of!(__sifields, _sigchld) - 0usize]; + ["Offset of field: __sifields::_sigfault"] + [::std::mem::offset_of!(__sifields, _sigfault) - 0usize]; + ["Offset of field: __sifields::_sigpoll"] + [::std::mem::offset_of!(__sifields, _sigpoll) - 0usize]; + ["Offset of field: __sifields::_sigsys"][::std::mem::offset_of!(__sifields, _sigsys) - 0usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub struct siginfo { @@ -12812,104 +8510,34 @@ pub struct siginfo__bindgen_ty_1__bindgen_ty_1 { pub si_code: ::std::os::raw::c_int, pub _sifields: __sifields, } -#[test] -fn bindgen_test_layout_siginfo__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(siginfo__bindgen_ty_1__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(siginfo__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).si_signo) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(siginfo__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(si_signo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).si_errno) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(siginfo__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(si_errno) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).si_code) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(siginfo__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(si_code) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._sifields) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(siginfo__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(_sifields) - ) - ); -} -#[test] -fn bindgen_test_layout_siginfo__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 128usize, - concat!("Size of: ", stringify!(siginfo__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(siginfo__bindgen_ty_1)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._si_pad) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(siginfo__bindgen_ty_1), - "::", - stringify!(_si_pad) - ) - ); -} -#[test] -fn bindgen_test_layout_siginfo() { - assert_eq!( - ::std::mem::size_of::(), - 128usize, - concat!("Size of: ", stringify!(siginfo)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(siginfo)) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of siginfo__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::size_of::() - 48usize]; + ["Alignment of siginfo__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: siginfo__bindgen_ty_1__bindgen_ty_1::si_signo"] + [::std::mem::offset_of!(siginfo__bindgen_ty_1__bindgen_ty_1, si_signo) - 0usize]; + ["Offset of field: siginfo__bindgen_ty_1__bindgen_ty_1::si_errno"] + [::std::mem::offset_of!(siginfo__bindgen_ty_1__bindgen_ty_1, si_errno) - 4usize]; + ["Offset of field: siginfo__bindgen_ty_1__bindgen_ty_1::si_code"] + [::std::mem::offset_of!(siginfo__bindgen_ty_1__bindgen_ty_1, si_code) - 8usize]; + ["Offset of field: siginfo__bindgen_ty_1__bindgen_ty_1::_sifields"] + [::std::mem::offset_of!(siginfo__bindgen_ty_1__bindgen_ty_1, _sifields) - 16usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of siginfo__bindgen_ty_1"][::std::mem::size_of::() - 128usize]; + ["Alignment of siginfo__bindgen_ty_1"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: siginfo__bindgen_ty_1::_si_pad"] + [::std::mem::offset_of!(siginfo__bindgen_ty_1, _si_pad) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of siginfo"][::std::mem::size_of::() - 128usize]; + ["Alignment of siginfo"][::std::mem::align_of::() - 8usize]; +}; pub type siginfo_t = siginfo; #[repr(C)] #[derive(Copy, Clone)] @@ -12932,149 +8560,41 @@ pub struct sigevent__bindgen_ty_1__bindgen_ty_1 { pub _function: ::std::option::Option, pub _attribute: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout_sigevent__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!( - "Size of: ", - stringify!(sigevent__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(sigevent__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._function) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigevent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(_function) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._attribute) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(sigevent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(_attribute) - ) - ); -} -#[test] -fn bindgen_test_layout_sigevent__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(sigevent__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(sigevent__bindgen_ty_1)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._pad) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigevent__bindgen_ty_1), - "::", - stringify!(_pad) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._tid) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigevent__bindgen_ty_1), - "::", - stringify!(_tid) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._sigev_thread) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigevent__bindgen_ty_1), - "::", - stringify!(_sigev_thread) - ) - ); -} -#[test] -fn bindgen_test_layout_sigevent() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(sigevent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(sigevent)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sigev_value) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigevent), - "::", - stringify!(sigev_value) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sigev_signo) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(sigevent), - "::", - stringify!(sigev_signo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sigev_notify) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(sigevent), - "::", - stringify!(sigev_notify) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._sigev_un) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(sigevent), - "::", - stringify!(_sigev_un) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sigevent__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::size_of::() - 16usize]; + ["Alignment of sigevent__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: sigevent__bindgen_ty_1__bindgen_ty_1::_function"] + [::std::mem::offset_of!(sigevent__bindgen_ty_1__bindgen_ty_1, _function) - 0usize]; + ["Offset of field: sigevent__bindgen_ty_1__bindgen_ty_1::_attribute"] + [::std::mem::offset_of!(sigevent__bindgen_ty_1__bindgen_ty_1, _attribute) - 8usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sigevent__bindgen_ty_1"][::std::mem::size_of::() - 48usize]; + ["Alignment of sigevent__bindgen_ty_1"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: sigevent__bindgen_ty_1::_pad"] + [::std::mem::offset_of!(sigevent__bindgen_ty_1, _pad) - 0usize]; + ["Offset of field: sigevent__bindgen_ty_1::_tid"] + [::std::mem::offset_of!(sigevent__bindgen_ty_1, _tid) - 0usize]; + ["Offset of field: sigevent__bindgen_ty_1::_sigev_thread"] + [::std::mem::offset_of!(sigevent__bindgen_ty_1, _sigev_thread) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sigevent"][::std::mem::size_of::() - 64usize]; + ["Alignment of sigevent"][::std::mem::align_of::() - 8usize]; + ["Offset of field: sigevent::sigev_value"] + [::std::mem::offset_of!(sigevent, sigev_value) - 0usize]; + ["Offset of field: sigevent::sigev_signo"] + [::std::mem::offset_of!(sigevent, sigev_signo) - 8usize]; + ["Offset of field: sigevent::sigev_notify"] + [::std::mem::offset_of!(sigevent, sigev_notify) - 12usize]; + ["Offset of field: sigevent::_sigev_un"][::std::mem::offset_of!(sigevent, _sigev_un) - 16usize]; +}; pub type sigevent_t = sigevent; pub type sig_atomic_t = ::std::os::raw::c_int; pub type sig_t = __sighandler_t; @@ -13100,87 +8620,25 @@ pub union sigaction__bindgen_ty_1 { ), >, } -#[test] -fn bindgen_test_layout_sigaction__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(sigaction__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(sigaction__bindgen_ty_1)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sa_handler) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigaction__bindgen_ty_1), - "::", - stringify!(sa_handler) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sa_sigaction) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigaction__bindgen_ty_1), - "::", - stringify!(sa_sigaction) - ) - ); -} -#[test] -fn bindgen_test_layout_sigaction() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(sigaction)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(sigaction)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sa_flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigaction), - "::", - stringify!(sa_flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sa_mask) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(sigaction), - "::", - stringify!(sa_mask) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sa_restorer) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(sigaction), - "::", - stringify!(sa_restorer) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sigaction__bindgen_ty_1"][::std::mem::size_of::() - 8usize]; + ["Alignment of sigaction__bindgen_ty_1"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: sigaction__bindgen_ty_1::sa_handler"] + [::std::mem::offset_of!(sigaction__bindgen_ty_1, sa_handler) - 0usize]; + ["Offset of field: sigaction__bindgen_ty_1::sa_sigaction"] + [::std::mem::offset_of!(sigaction__bindgen_ty_1, sa_sigaction) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sigaction"][::std::mem::size_of::() - 32usize]; + ["Alignment of sigaction"][::std::mem::align_of::() - 8usize]; + ["Offset of field: sigaction::sa_flags"][::std::mem::offset_of!(sigaction, sa_flags) - 0usize]; + ["Offset of field: sigaction::sa_mask"][::std::mem::offset_of!(sigaction, sa_mask) - 16usize]; + ["Offset of field: sigaction::sa_restorer"] + [::std::mem::offset_of!(sigaction, sa_restorer) - 24usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub struct sigaction64 { @@ -13201,87 +8659,28 @@ pub union sigaction64__bindgen_ty_1 { ), >, } -#[test] -fn bindgen_test_layout_sigaction64__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(sigaction64__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(sigaction64__bindgen_ty_1)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sa_handler) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigaction64__bindgen_ty_1), - "::", - stringify!(sa_handler) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sa_sigaction) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigaction64__bindgen_ty_1), - "::", - stringify!(sa_sigaction) - ) - ); -} -#[test] -fn bindgen_test_layout_sigaction64() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(sigaction64)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(sigaction64)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sa_flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigaction64), - "::", - stringify!(sa_flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sa_mask) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(sigaction64), - "::", - stringify!(sa_mask) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sa_restorer) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(sigaction64), - "::", - stringify!(sa_restorer) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sigaction64__bindgen_ty_1"] + [::std::mem::size_of::() - 8usize]; + ["Alignment of sigaction64__bindgen_ty_1"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: sigaction64__bindgen_ty_1::sa_handler"] + [::std::mem::offset_of!(sigaction64__bindgen_ty_1, sa_handler) - 0usize]; + ["Offset of field: sigaction64__bindgen_ty_1::sa_sigaction"] + [::std::mem::offset_of!(sigaction64__bindgen_ty_1, sa_sigaction) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sigaction64"][::std::mem::size_of::() - 32usize]; + ["Alignment of sigaction64"][::std::mem::align_of::() - 8usize]; + ["Offset of field: sigaction64::sa_flags"] + [::std::mem::offset_of!(sigaction64, sa_flags) - 0usize]; + ["Offset of field: sigaction64::sa_mask"] + [::std::mem::offset_of!(sigaction64, sa_mask) - 16usize]; + ["Offset of field: sigaction64::sa_restorer"] + [::std::mem::offset_of!(sigaction64, sa_restorer) - 24usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct user_fpregs_struct { @@ -13297,131 +8696,33 @@ pub struct user_fpregs_struct { pub xmm_space: [::std::os::raw::c_uint; 64usize], pub padding: [::std::os::raw::c_uint; 24usize], } -#[test] -fn bindgen_test_layout_user_fpregs_struct() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 512usize, - concat!("Size of: ", stringify!(user_fpregs_struct)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(user_fpregs_struct)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cwd) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(user_fpregs_struct), - "::", - stringify!(cwd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).swd) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(user_fpregs_struct), - "::", - stringify!(swd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ftw) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(user_fpregs_struct), - "::", - stringify!(ftw) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fop) as usize - ptr as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(user_fpregs_struct), - "::", - stringify!(fop) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rip) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(user_fpregs_struct), - "::", - stringify!(rip) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rdp) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(user_fpregs_struct), - "::", - stringify!(rdp) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mxcsr) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(user_fpregs_struct), - "::", - stringify!(mxcsr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mxcr_mask) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(user_fpregs_struct), - "::", - stringify!(mxcr_mask) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).st_space) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(user_fpregs_struct), - "::", - stringify!(st_space) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).xmm_space) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(user_fpregs_struct), - "::", - stringify!(xmm_space) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).padding) as usize - ptr as usize }, - 416usize, - concat!( - "Offset of field: ", - stringify!(user_fpregs_struct), - "::", - stringify!(padding) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of user_fpregs_struct"][::std::mem::size_of::() - 512usize]; + ["Alignment of user_fpregs_struct"][::std::mem::align_of::() - 8usize]; + ["Offset of field: user_fpregs_struct::cwd"] + [::std::mem::offset_of!(user_fpregs_struct, cwd) - 0usize]; + ["Offset of field: user_fpregs_struct::swd"] + [::std::mem::offset_of!(user_fpregs_struct, swd) - 2usize]; + ["Offset of field: user_fpregs_struct::ftw"] + [::std::mem::offset_of!(user_fpregs_struct, ftw) - 4usize]; + ["Offset of field: user_fpregs_struct::fop"] + [::std::mem::offset_of!(user_fpregs_struct, fop) - 6usize]; + ["Offset of field: user_fpregs_struct::rip"] + [::std::mem::offset_of!(user_fpregs_struct, rip) - 8usize]; + ["Offset of field: user_fpregs_struct::rdp"] + [::std::mem::offset_of!(user_fpregs_struct, rdp) - 16usize]; + ["Offset of field: user_fpregs_struct::mxcsr"] + [::std::mem::offset_of!(user_fpregs_struct, mxcsr) - 24usize]; + ["Offset of field: user_fpregs_struct::mxcr_mask"] + [::std::mem::offset_of!(user_fpregs_struct, mxcr_mask) - 28usize]; + ["Offset of field: user_fpregs_struct::st_space"] + [::std::mem::offset_of!(user_fpregs_struct, st_space) - 32usize]; + ["Offset of field: user_fpregs_struct::xmm_space"] + [::std::mem::offset_of!(user_fpregs_struct, xmm_space) - 160usize]; + ["Offset of field: user_fpregs_struct::padding"] + [::std::mem::offset_of!(user_fpregs_struct, padding) - 416usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct user_regs_struct { @@ -13453,519 +8754,113 @@ pub struct user_regs_struct { pub fs: ::std::os::raw::c_ulong, pub gs: ::std::os::raw::c_ulong, } -#[test] -fn bindgen_test_layout_user_regs_struct() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 216usize, - concat!("Size of: ", stringify!(user_regs_struct)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(user_regs_struct)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).r15) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(r15) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).r14) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(r14) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).r13) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(r13) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).r12) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(r12) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rbp) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(rbp) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rbx) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(rbx) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).r11) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(r11) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).r10) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(r10) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).r9) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(r9) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).r8) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(r8) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rax) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(rax) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rcx) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(rcx) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rdx) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(rdx) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rsi) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(rsi) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rdi) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(rdi) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).orig_rax) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(orig_rax) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rip) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(rip) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cs) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(cs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).eflags) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(eflags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rsp) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(rsp) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ss) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(ss) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fs_base) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(fs_base) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gs_base) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(gs_base) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ds) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(ds) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).es) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(es) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fs) as usize - ptr as usize }, - 200usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(fs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gs) as usize - ptr as usize }, - 208usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(gs) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of user_regs_struct"][::std::mem::size_of::() - 216usize]; + ["Alignment of user_regs_struct"][::std::mem::align_of::() - 8usize]; + ["Offset of field: user_regs_struct::r15"] + [::std::mem::offset_of!(user_regs_struct, r15) - 0usize]; + ["Offset of field: user_regs_struct::r14"] + [::std::mem::offset_of!(user_regs_struct, r14) - 8usize]; + ["Offset of field: user_regs_struct::r13"] + [::std::mem::offset_of!(user_regs_struct, r13) - 16usize]; + ["Offset of field: user_regs_struct::r12"] + [::std::mem::offset_of!(user_regs_struct, r12) - 24usize]; + ["Offset of field: user_regs_struct::rbp"] + [::std::mem::offset_of!(user_regs_struct, rbp) - 32usize]; + ["Offset of field: user_regs_struct::rbx"] + [::std::mem::offset_of!(user_regs_struct, rbx) - 40usize]; + ["Offset of field: user_regs_struct::r11"] + [::std::mem::offset_of!(user_regs_struct, r11) - 48usize]; + ["Offset of field: user_regs_struct::r10"] + [::std::mem::offset_of!(user_regs_struct, r10) - 56usize]; + ["Offset of field: user_regs_struct::r9"] + [::std::mem::offset_of!(user_regs_struct, r9) - 64usize]; + ["Offset of field: user_regs_struct::r8"] + [::std::mem::offset_of!(user_regs_struct, r8) - 72usize]; + ["Offset of field: user_regs_struct::rax"] + [::std::mem::offset_of!(user_regs_struct, rax) - 80usize]; + ["Offset of field: user_regs_struct::rcx"] + [::std::mem::offset_of!(user_regs_struct, rcx) - 88usize]; + ["Offset of field: user_regs_struct::rdx"] + [::std::mem::offset_of!(user_regs_struct, rdx) - 96usize]; + ["Offset of field: user_regs_struct::rsi"] + [::std::mem::offset_of!(user_regs_struct, rsi) - 104usize]; + ["Offset of field: user_regs_struct::rdi"] + [::std::mem::offset_of!(user_regs_struct, rdi) - 112usize]; + ["Offset of field: user_regs_struct::orig_rax"] + [::std::mem::offset_of!(user_regs_struct, orig_rax) - 120usize]; + ["Offset of field: user_regs_struct::rip"] + [::std::mem::offset_of!(user_regs_struct, rip) - 128usize]; + ["Offset of field: user_regs_struct::cs"] + [::std::mem::offset_of!(user_regs_struct, cs) - 136usize]; + ["Offset of field: user_regs_struct::eflags"] + [::std::mem::offset_of!(user_regs_struct, eflags) - 144usize]; + ["Offset of field: user_regs_struct::rsp"] + [::std::mem::offset_of!(user_regs_struct, rsp) - 152usize]; + ["Offset of field: user_regs_struct::ss"] + [::std::mem::offset_of!(user_regs_struct, ss) - 160usize]; + ["Offset of field: user_regs_struct::fs_base"] + [::std::mem::offset_of!(user_regs_struct, fs_base) - 168usize]; + ["Offset of field: user_regs_struct::gs_base"] + [::std::mem::offset_of!(user_regs_struct, gs_base) - 176usize]; + ["Offset of field: user_regs_struct::ds"] + [::std::mem::offset_of!(user_regs_struct, ds) - 184usize]; + ["Offset of field: user_regs_struct::es"] + [::std::mem::offset_of!(user_regs_struct, es) - 192usize]; + ["Offset of field: user_regs_struct::fs"] + [::std::mem::offset_of!(user_regs_struct, fs) - 200usize]; + ["Offset of field: user_regs_struct::gs"] + [::std::mem::offset_of!(user_regs_struct, gs) - 208usize]; +}; #[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct user { - pub regs: user_regs_struct, - pub u_fpvalid: ::std::os::raw::c_int, - pub pad0: ::std::os::raw::c_int, - pub i387: user_fpregs_struct, - pub u_tsize: ::std::os::raw::c_ulong, - pub u_dsize: ::std::os::raw::c_ulong, - pub u_ssize: ::std::os::raw::c_ulong, - pub start_code: ::std::os::raw::c_ulong, - pub start_stack: ::std::os::raw::c_ulong, - pub signal: ::std::os::raw::c_long, - pub reserved: ::std::os::raw::c_int, - pub pad1: ::std::os::raw::c_int, - pub u_ar0: *mut user_regs_struct, - pub u_fpstate: *mut user_fpregs_struct, - pub magic: ::std::os::raw::c_ulong, - pub u_comm: [::std::os::raw::c_char; 32usize], - pub u_debugreg: [::std::os::raw::c_ulong; 8usize], - pub error_code: ::std::os::raw::c_ulong, - pub fault_address: ::std::os::raw::c_ulong, -} -#[test] -fn bindgen_test_layout_user() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 928usize, - concat!("Size of: ", stringify!(user)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(user)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).regs) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(regs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).u_fpvalid) as usize - ptr as usize }, - 216usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(u_fpvalid) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pad0) as usize - ptr as usize }, - 220usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(pad0) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).i387) as usize - ptr as usize }, - 224usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(i387) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).u_tsize) as usize - ptr as usize }, - 736usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(u_tsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).u_dsize) as usize - ptr as usize }, - 744usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(u_dsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).u_ssize) as usize - ptr as usize }, - 752usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(u_ssize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).start_code) as usize - ptr as usize }, - 760usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(start_code) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).start_stack) as usize - ptr as usize }, - 768usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(start_stack) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).signal) as usize - ptr as usize }, - 776usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(signal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, - 784usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(reserved) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pad1) as usize - ptr as usize }, - 788usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(pad1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).u_ar0) as usize - ptr as usize }, - 792usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(u_ar0) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).u_fpstate) as usize - ptr as usize }, - 800usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(u_fpstate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).magic) as usize - ptr as usize }, - 808usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(magic) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).u_comm) as usize - ptr as usize }, - 816usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(u_comm) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).u_debugreg) as usize - ptr as usize }, - 848usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(u_debugreg) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).error_code) as usize - ptr as usize }, - 912usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(error_code) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fault_address) as usize - ptr as usize }, - 920usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(fault_address) - ) - ); +#[derive(Debug, Copy, Clone)] +pub struct user { + pub regs: user_regs_struct, + pub u_fpvalid: ::std::os::raw::c_int, + pub pad0: ::std::os::raw::c_int, + pub i387: user_fpregs_struct, + pub u_tsize: ::std::os::raw::c_ulong, + pub u_dsize: ::std::os::raw::c_ulong, + pub u_ssize: ::std::os::raw::c_ulong, + pub start_code: ::std::os::raw::c_ulong, + pub start_stack: ::std::os::raw::c_ulong, + pub signal: ::std::os::raw::c_long, + pub reserved: ::std::os::raw::c_int, + pub pad1: ::std::os::raw::c_int, + pub u_ar0: *mut user_regs_struct, + pub u_fpstate: *mut user_fpregs_struct, + pub magic: ::std::os::raw::c_ulong, + pub u_comm: [::std::os::raw::c_char; 32usize], + pub u_debugreg: [::std::os::raw::c_ulong; 8usize], + pub error_code: ::std::os::raw::c_ulong, + pub fault_address: ::std::os::raw::c_ulong, } +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of user"][::std::mem::size_of::() - 928usize]; + ["Alignment of user"][::std::mem::align_of::() - 8usize]; + ["Offset of field: user::regs"][::std::mem::offset_of!(user, regs) - 0usize]; + ["Offset of field: user::u_fpvalid"][::std::mem::offset_of!(user, u_fpvalid) - 216usize]; + ["Offset of field: user::pad0"][::std::mem::offset_of!(user, pad0) - 220usize]; + ["Offset of field: user::i387"][::std::mem::offset_of!(user, i387) - 224usize]; + ["Offset of field: user::u_tsize"][::std::mem::offset_of!(user, u_tsize) - 736usize]; + ["Offset of field: user::u_dsize"][::std::mem::offset_of!(user, u_dsize) - 744usize]; + ["Offset of field: user::u_ssize"][::std::mem::offset_of!(user, u_ssize) - 752usize]; + ["Offset of field: user::start_code"][::std::mem::offset_of!(user, start_code) - 760usize]; + ["Offset of field: user::start_stack"][::std::mem::offset_of!(user, start_stack) - 768usize]; + ["Offset of field: user::signal"][::std::mem::offset_of!(user, signal) - 776usize]; + ["Offset of field: user::reserved"][::std::mem::offset_of!(user, reserved) - 784usize]; + ["Offset of field: user::pad1"][::std::mem::offset_of!(user, pad1) - 788usize]; + ["Offset of field: user::u_ar0"][::std::mem::offset_of!(user, u_ar0) - 792usize]; + ["Offset of field: user::u_fpstate"][::std::mem::offset_of!(user, u_fpstate) - 800usize]; + ["Offset of field: user::magic"][::std::mem::offset_of!(user, magic) - 808usize]; + ["Offset of field: user::u_comm"][::std::mem::offset_of!(user, u_comm) - 816usize]; + ["Offset of field: user::u_debugreg"][::std::mem::offset_of!(user, u_debugreg) - 848usize]; + ["Offset of field: user::error_code"][::std::mem::offset_of!(user, error_code) - 912usize]; + ["Offset of field: user::fault_address"] + [::std::mem::offset_of!(user, fault_address) - 920usize]; +}; pub const REG_R8: _bindgen_ty_38 = 0; pub const REG_R9: _bindgen_ty_38 = 1; pub const REG_R10: _bindgen_ty_38 = 2; @@ -14000,81 +8895,29 @@ pub struct _libc_fpxreg { pub exponent: ::std::os::raw::c_ushort, pub padding: [::std::os::raw::c_ushort; 3usize], } -#[test] -fn bindgen_test_layout__libc_fpxreg() { - const UNINIT: ::std::mem::MaybeUninit<_libc_fpxreg> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_libc_fpxreg>(), - 16usize, - concat!("Size of: ", stringify!(_libc_fpxreg)) - ); - assert_eq!( - ::std::mem::align_of::<_libc_fpxreg>(), - 2usize, - concat!("Alignment of ", stringify!(_libc_fpxreg)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).significand) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_libc_fpxreg), - "::", - stringify!(significand) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).exponent) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_libc_fpxreg), - "::", - stringify!(exponent) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).padding) as usize - ptr as usize }, - 10usize, - concat!( - "Offset of field: ", - stringify!(_libc_fpxreg), - "::", - stringify!(padding) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of _libc_fpxreg"][::std::mem::size_of::<_libc_fpxreg>() - 16usize]; + ["Alignment of _libc_fpxreg"][::std::mem::align_of::<_libc_fpxreg>() - 2usize]; + ["Offset of field: _libc_fpxreg::significand"] + [::std::mem::offset_of!(_libc_fpxreg, significand) - 0usize]; + ["Offset of field: _libc_fpxreg::exponent"] + [::std::mem::offset_of!(_libc_fpxreg, exponent) - 8usize]; + ["Offset of field: _libc_fpxreg::padding"] + [::std::mem::offset_of!(_libc_fpxreg, padding) - 10usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _libc_xmmreg { pub element: [u32; 4usize], } -#[test] -fn bindgen_test_layout__libc_xmmreg() { - const UNINIT: ::std::mem::MaybeUninit<_libc_xmmreg> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_libc_xmmreg>(), - 16usize, - concat!("Size of: ", stringify!(_libc_xmmreg)) - ); - assert_eq!( - ::std::mem::align_of::<_libc_xmmreg>(), - 4usize, - concat!("Alignment of ", stringify!(_libc_xmmreg)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).element) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_libc_xmmreg), - "::", - stringify!(element) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of _libc_xmmreg"][::std::mem::size_of::<_libc_xmmreg>() - 16usize]; + ["Alignment of _libc_xmmreg"][::std::mem::align_of::<_libc_xmmreg>() - 4usize]; + ["Offset of field: _libc_xmmreg::element"] + [::std::mem::offset_of!(_libc_xmmreg, element) - 0usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _libc_fpstate { @@ -14090,131 +8933,26 @@ pub struct _libc_fpstate { pub _xmm: [_libc_xmmreg; 16usize], pub padding: [u32; 24usize], } -#[test] -fn bindgen_test_layout__libc_fpstate() { - const UNINIT: ::std::mem::MaybeUninit<_libc_fpstate> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_libc_fpstate>(), - 512usize, - concat!("Size of: ", stringify!(_libc_fpstate)) - ); - assert_eq!( - ::std::mem::align_of::<_libc_fpstate>(), - 8usize, - concat!("Alignment of ", stringify!(_libc_fpstate)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cwd) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_libc_fpstate), - "::", - stringify!(cwd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).swd) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_libc_fpstate), - "::", - stringify!(swd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ftw) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_libc_fpstate), - "::", - stringify!(ftw) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fop) as usize - ptr as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(_libc_fpstate), - "::", - stringify!(fop) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rip) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_libc_fpstate), - "::", - stringify!(rip) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rdp) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_libc_fpstate), - "::", - stringify!(rdp) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mxcsr) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_libc_fpstate), - "::", - stringify!(mxcsr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mxcr_mask) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_libc_fpstate), - "::", - stringify!(mxcr_mask) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._st) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_libc_fpstate), - "::", - stringify!(_st) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._xmm) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(_libc_fpstate), - "::", - stringify!(_xmm) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).padding) as usize - ptr as usize }, - 416usize, - concat!( - "Offset of field: ", - stringify!(_libc_fpstate), - "::", - stringify!(padding) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of _libc_fpstate"][::std::mem::size_of::<_libc_fpstate>() - 512usize]; + ["Alignment of _libc_fpstate"][::std::mem::align_of::<_libc_fpstate>() - 8usize]; + ["Offset of field: _libc_fpstate::cwd"][::std::mem::offset_of!(_libc_fpstate, cwd) - 0usize]; + ["Offset of field: _libc_fpstate::swd"][::std::mem::offset_of!(_libc_fpstate, swd) - 2usize]; + ["Offset of field: _libc_fpstate::ftw"][::std::mem::offset_of!(_libc_fpstate, ftw) - 4usize]; + ["Offset of field: _libc_fpstate::fop"][::std::mem::offset_of!(_libc_fpstate, fop) - 6usize]; + ["Offset of field: _libc_fpstate::rip"][::std::mem::offset_of!(_libc_fpstate, rip) - 8usize]; + ["Offset of field: _libc_fpstate::rdp"][::std::mem::offset_of!(_libc_fpstate, rdp) - 16usize]; + ["Offset of field: _libc_fpstate::mxcsr"] + [::std::mem::offset_of!(_libc_fpstate, mxcsr) - 24usize]; + ["Offset of field: _libc_fpstate::mxcr_mask"] + [::std::mem::offset_of!(_libc_fpstate, mxcr_mask) - 28usize]; + ["Offset of field: _libc_fpstate::_st"][::std::mem::offset_of!(_libc_fpstate, _st) - 32usize]; + ["Offset of field: _libc_fpstate::_xmm"] + [::std::mem::offset_of!(_libc_fpstate, _xmm) - 160usize]; + ["Offset of field: _libc_fpstate::padding"] + [::std::mem::offset_of!(_libc_fpstate, padding) - 416usize]; +}; pub type fpregset_t = *mut _libc_fpstate; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -14223,51 +8961,15 @@ pub struct mcontext_t { pub fpregs: fpregset_t, pub __reserved1: [::std::os::raw::c_ulong; 8usize], } -#[test] -fn bindgen_test_layout_mcontext_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 256usize, - concat!("Size of: ", stringify!(mcontext_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(mcontext_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gregs) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(mcontext_t), - "::", - stringify!(gregs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fpregs) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(mcontext_t), - "::", - stringify!(fpregs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__reserved1) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(mcontext_t), - "::", - stringify!(__reserved1) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of mcontext_t"][::std::mem::size_of::() - 256usize]; + ["Alignment of mcontext_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: mcontext_t::gregs"][::std::mem::offset_of!(mcontext_t, gregs) - 0usize]; + ["Offset of field: mcontext_t::fpregs"][::std::mem::offset_of!(mcontext_t, fpregs) - 184usize]; + ["Offset of field: mcontext_t::__reserved1"] + [::std::mem::offset_of!(mcontext_t, __reserved1) - 192usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub struct ucontext { @@ -14284,107 +8986,28 @@ pub union ucontext__bindgen_ty_1 { pub uc_sigmask: sigset_t, pub uc_sigmask64: sigset64_t, } -#[test] -fn bindgen_test_layout_ucontext__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(ucontext__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(ucontext__bindgen_ty_1)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uc_sigmask) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ucontext__bindgen_ty_1), - "::", - stringify!(uc_sigmask) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uc_sigmask64) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ucontext__bindgen_ty_1), - "::", - stringify!(uc_sigmask64) - ) - ); -} -#[test] -fn bindgen_test_layout_ucontext() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 816usize, - concat!("Size of: ", stringify!(ucontext)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(ucontext)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uc_flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ucontext), - "::", - stringify!(uc_flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uc_link) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ucontext), - "::", - stringify!(uc_link) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uc_stack) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(ucontext), - "::", - stringify!(uc_stack) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uc_mcontext) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(ucontext), - "::", - stringify!(uc_mcontext) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__fpregs_mem) as usize - ptr as usize }, - 304usize, - concat!( - "Offset of field: ", - stringify!(ucontext), - "::", - stringify!(__fpregs_mem) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ucontext__bindgen_ty_1"][::std::mem::size_of::() - 8usize]; + ["Alignment of ucontext__bindgen_ty_1"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: ucontext__bindgen_ty_1::uc_sigmask"] + [::std::mem::offset_of!(ucontext__bindgen_ty_1, uc_sigmask) - 0usize]; + ["Offset of field: ucontext__bindgen_ty_1::uc_sigmask64"] + [::std::mem::offset_of!(ucontext__bindgen_ty_1, uc_sigmask64) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ucontext"][::std::mem::size_of::() - 816usize]; + ["Alignment of ucontext"][::std::mem::align_of::() - 8usize]; + ["Offset of field: ucontext::uc_flags"][::std::mem::offset_of!(ucontext, uc_flags) - 0usize]; + ["Offset of field: ucontext::uc_link"][::std::mem::offset_of!(ucontext, uc_link) - 8usize]; + ["Offset of field: ucontext::uc_stack"][::std::mem::offset_of!(ucontext, uc_stack) - 16usize]; + ["Offset of field: ucontext::uc_mcontext"] + [::std::mem::offset_of!(ucontext, uc_mcontext) - 40usize]; + ["Offset of field: ucontext::__fpregs_mem"] + [::std::mem::offset_of!(ucontext, __fpregs_mem) - 304usize]; +}; pub type ucontext_t = ucontext; extern "C" { pub fn __libc_current_sigrtmin() -> ::std::os::raw::c_int; @@ -14607,31 +9230,12 @@ pub type fd_mask = ::std::os::raw::c_ulong; pub struct fd_set { pub fds_bits: [fd_mask; 16usize], } -#[test] -fn bindgen_test_layout_fd_set() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 128usize, - concat!("Size of: ", stringify!(fd_set)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(fd_set)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fds_bits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(fd_set), - "::", - stringify!(fds_bits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of fd_set"][::std::mem::size_of::() - 128usize]; + ["Alignment of fd_set"][::std::mem::align_of::() - 8usize]; + ["Offset of field: fd_set::fds_bits"][::std::mem::offset_of!(fd_set, fds_bits) - 0usize]; +}; extern "C" { pub fn __FD_CLR_chk(arg1: ::std::os::raw::c_int, arg2: *mut fd_set, arg3: usize); } @@ -15955,58 +10559,19 @@ pub struct ASensorVector__bindgen_ty_1__bindgen_ty_1 { pub y: f32, pub z: f32, } -#[test] -fn bindgen_test_layout_ASensorVector__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!( - "Size of: ", - stringify!(ASensorVector__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ASensorVector__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorVector__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(x) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ASensorVector__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(y) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).z) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ASensorVector__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(z) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASensorVector__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of ASensorVector__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ASensorVector__bindgen_ty_1__bindgen_ty_1::x"] + [::std::mem::offset_of!(ASensorVector__bindgen_ty_1__bindgen_ty_1, x) - 0usize]; + ["Offset of field: ASensorVector__bindgen_ty_1__bindgen_ty_1::y"] + [::std::mem::offset_of!(ASensorVector__bindgen_ty_1__bindgen_ty_1, y) - 4usize]; + ["Offset of field: ASensorVector__bindgen_ty_1__bindgen_ty_1::z"] + [::std::mem::offset_of!(ASensorVector__bindgen_ty_1__bindgen_ty_1, z) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ASensorVector__bindgen_ty_1__bindgen_ty_2 { @@ -16014,160 +10579,52 @@ pub struct ASensorVector__bindgen_ty_1__bindgen_ty_2 { pub pitch: f32, pub roll: f32, } -#[test] -fn bindgen_test_layout_ASensorVector__bindgen_ty_1__bindgen_ty_2() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!( - "Size of: ", - stringify!(ASensorVector__bindgen_ty_1__bindgen_ty_2) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ASensorVector__bindgen_ty_1__bindgen_ty_2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).azimuth) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorVector__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(azimuth) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pitch) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ASensorVector__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(pitch) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).roll) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ASensorVector__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(roll) - ) - ); -} -#[test] -fn bindgen_test_layout_ASensorVector__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(ASensorVector__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(ASensorVector__bindgen_ty_1)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).v) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorVector__bindgen_ty_1), - "::", - stringify!(v) - ) - ); -} -#[test] -fn bindgen_test_layout_ASensorVector() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(ASensorVector)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(ASensorVector)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).status) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(ASensorVector), - "::", - stringify!(status) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, - 13usize, - concat!( - "Offset of field: ", - stringify!(ASensorVector), - "::", - stringify!(reserved) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASensorVector__bindgen_ty_1__bindgen_ty_2"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of ASensorVector__bindgen_ty_1__bindgen_ty_2"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ASensorVector__bindgen_ty_1__bindgen_ty_2::azimuth"] + [::std::mem::offset_of!(ASensorVector__bindgen_ty_1__bindgen_ty_2, azimuth) - 0usize]; + ["Offset of field: ASensorVector__bindgen_ty_1__bindgen_ty_2::pitch"] + [::std::mem::offset_of!(ASensorVector__bindgen_ty_1__bindgen_ty_2, pitch) - 4usize]; + ["Offset of field: ASensorVector__bindgen_ty_1__bindgen_ty_2::roll"] + [::std::mem::offset_of!(ASensorVector__bindgen_ty_1__bindgen_ty_2, roll) - 8usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASensorVector__bindgen_ty_1"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of ASensorVector__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ASensorVector__bindgen_ty_1::v"] + [::std::mem::offset_of!(ASensorVector__bindgen_ty_1, v) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASensorVector"][::std::mem::size_of::() - 16usize]; + ["Alignment of ASensorVector"][::std::mem::align_of::() - 4usize]; + ["Offset of field: ASensorVector::status"] + [::std::mem::offset_of!(ASensorVector, status) - 12usize]; + ["Offset of field: ASensorVector::reserved"] + [::std::mem::offset_of!(ASensorVector, reserved) - 13usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct AMetaDataEvent { pub what: i32, pub sensor: i32, } -#[test] -fn bindgen_test_layout_AMetaDataEvent() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(AMetaDataEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AMetaDataEvent)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).what) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AMetaDataEvent), - "::", - stringify!(what) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sensor) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AMetaDataEvent), - "::", - stringify!(sensor) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AMetaDataEvent"][::std::mem::size_of::() - 8usize]; + ["Alignment of AMetaDataEvent"][::std::mem::align_of::() - 4usize]; + ["Offset of field: AMetaDataEvent::what"] + [::std::mem::offset_of!(AMetaDataEvent, what) - 0usize]; + ["Offset of field: AMetaDataEvent::sensor"] + [::std::mem::offset_of!(AMetaDataEvent, sensor) - 4usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub struct AUncalibratedEvent { @@ -16187,87 +10644,34 @@ pub struct AUncalibratedEvent__bindgen_ty_1__bindgen_ty_1 { pub y_uncalib: f32, pub z_uncalib: f32, } -#[test] -fn bindgen_test_layout_AUncalibratedEvent__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!( - "Size of: ", - stringify!(AUncalibratedEvent__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(AUncalibratedEvent__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).x_uncalib) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AUncalibratedEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(x_uncalib) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).y_uncalib) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AUncalibratedEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(y_uncalib) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).z_uncalib) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AUncalibratedEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(z_uncalib) - ) - ); -} -#[test] -fn bindgen_test_layout_AUncalibratedEvent__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(AUncalibratedEvent__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(AUncalibratedEvent__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uncalib) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AUncalibratedEvent__bindgen_ty_1), - "::", - stringify!(uncalib) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AUncalibratedEvent__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of AUncalibratedEvent__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: AUncalibratedEvent__bindgen_ty_1__bindgen_ty_1::x_uncalib"][::std::mem::offset_of!( + AUncalibratedEvent__bindgen_ty_1__bindgen_ty_1, + x_uncalib + ) - 0usize]; + ["Offset of field: AUncalibratedEvent__bindgen_ty_1__bindgen_ty_1::y_uncalib"][::std::mem::offset_of!( + AUncalibratedEvent__bindgen_ty_1__bindgen_ty_1, + y_uncalib + ) - 4usize]; + ["Offset of field: AUncalibratedEvent__bindgen_ty_1__bindgen_ty_1::z_uncalib"][::std::mem::offset_of!( + AUncalibratedEvent__bindgen_ty_1__bindgen_ty_1, + z_uncalib + ) - 8usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AUncalibratedEvent__bindgen_ty_1"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of AUncalibratedEvent__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: AUncalibratedEvent__bindgen_ty_1::uncalib"] + [::std::mem::offset_of!(AUncalibratedEvent__bindgen_ty_1, uncalib) - 0usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub union AUncalibratedEvent__bindgen_ty_2 { @@ -16281,182 +10685,63 @@ pub struct AUncalibratedEvent__bindgen_ty_2__bindgen_ty_1 { pub y_bias: f32, pub z_bias: f32, } -#[test] -fn bindgen_test_layout_AUncalibratedEvent__bindgen_ty_2__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!( - "Size of: ", - stringify!(AUncalibratedEvent__bindgen_ty_2__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(AUncalibratedEvent__bindgen_ty_2__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).x_bias) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AUncalibratedEvent__bindgen_ty_2__bindgen_ty_1), - "::", - stringify!(x_bias) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).y_bias) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AUncalibratedEvent__bindgen_ty_2__bindgen_ty_1), - "::", - stringify!(y_bias) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).z_bias) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AUncalibratedEvent__bindgen_ty_2__bindgen_ty_1), - "::", - stringify!(z_bias) - ) - ); -} -#[test] -fn bindgen_test_layout_AUncalibratedEvent__bindgen_ty_2() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(AUncalibratedEvent__bindgen_ty_2)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(AUncalibratedEvent__bindgen_ty_2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bias) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AUncalibratedEvent__bindgen_ty_2), - "::", - stringify!(bias) - ) - ); -} -#[test] -fn bindgen_test_layout_AUncalibratedEvent() { - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(AUncalibratedEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AUncalibratedEvent)) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AUncalibratedEvent__bindgen_ty_2__bindgen_ty_1"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of AUncalibratedEvent__bindgen_ty_2__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: AUncalibratedEvent__bindgen_ty_2__bindgen_ty_1::x_bias"] + [::std::mem::offset_of!(AUncalibratedEvent__bindgen_ty_2__bindgen_ty_1, x_bias) - 0usize]; + ["Offset of field: AUncalibratedEvent__bindgen_ty_2__bindgen_ty_1::y_bias"] + [::std::mem::offset_of!(AUncalibratedEvent__bindgen_ty_2__bindgen_ty_1, y_bias) - 4usize]; + ["Offset of field: AUncalibratedEvent__bindgen_ty_2__bindgen_ty_1::z_bias"] + [::std::mem::offset_of!(AUncalibratedEvent__bindgen_ty_2__bindgen_ty_1, z_bias) - 8usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AUncalibratedEvent__bindgen_ty_2"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of AUncalibratedEvent__bindgen_ty_2"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: AUncalibratedEvent__bindgen_ty_2::bias"] + [::std::mem::offset_of!(AUncalibratedEvent__bindgen_ty_2, bias) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AUncalibratedEvent"][::std::mem::size_of::() - 24usize]; + ["Alignment of AUncalibratedEvent"][::std::mem::align_of::() - 4usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct AHeartRateEvent { pub bpm: f32, pub status: i8, } -#[test] -fn bindgen_test_layout_AHeartRateEvent() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(AHeartRateEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AHeartRateEvent)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bpm) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AHeartRateEvent), - "::", - stringify!(bpm) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).status) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AHeartRateEvent), - "::", - stringify!(status) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AHeartRateEvent"][::std::mem::size_of::() - 8usize]; + ["Alignment of AHeartRateEvent"][::std::mem::align_of::() - 4usize]; + ["Offset of field: AHeartRateEvent::bpm"] + [::std::mem::offset_of!(AHeartRateEvent, bpm) - 0usize]; + ["Offset of field: AHeartRateEvent::status"] + [::std::mem::offset_of!(AHeartRateEvent, status) - 4usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ADynamicSensorEvent { pub connected: i32, pub handle: i32, } -#[test] -fn bindgen_test_layout_ADynamicSensorEvent() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(ADynamicSensorEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(ADynamicSensorEvent)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).connected) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ADynamicSensorEvent), - "::", - stringify!(connected) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).handle) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ADynamicSensorEvent), - "::", - stringify!(handle) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ADynamicSensorEvent"][::std::mem::size_of::() - 8usize]; + ["Alignment of ADynamicSensorEvent"][::std::mem::align_of::() - 4usize]; + ["Offset of field: ADynamicSensorEvent::connected"] + [::std::mem::offset_of!(ADynamicSensorEvent, connected) - 0usize]; + ["Offset of field: ADynamicSensorEvent::handle"] + [::std::mem::offset_of!(ADynamicSensorEvent, handle) - 4usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub struct AAdditionalInfoEvent { @@ -16470,80 +10755,26 @@ pub union AAdditionalInfoEvent__bindgen_ty_1 { pub data_int32: [i32; 14usize], pub data_float: [f32; 14usize], } -#[test] -fn bindgen_test_layout_AAdditionalInfoEvent__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(AAdditionalInfoEvent__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(AAdditionalInfoEvent__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data_int32) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AAdditionalInfoEvent__bindgen_ty_1), - "::", - stringify!(data_int32) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data_float) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AAdditionalInfoEvent__bindgen_ty_1), - "::", - stringify!(data_float) - ) - ); -} -#[test] -fn bindgen_test_layout_AAdditionalInfoEvent() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(AAdditionalInfoEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AAdditionalInfoEvent)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AAdditionalInfoEvent), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).serial) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AAdditionalInfoEvent), - "::", - stringify!(serial) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AAdditionalInfoEvent__bindgen_ty_1"] + [::std::mem::size_of::() - 56usize]; + ["Alignment of AAdditionalInfoEvent__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: AAdditionalInfoEvent__bindgen_ty_1::data_int32"] + [::std::mem::offset_of!(AAdditionalInfoEvent__bindgen_ty_1, data_int32) - 0usize]; + ["Offset of field: AAdditionalInfoEvent__bindgen_ty_1::data_float"] + [::std::mem::offset_of!(AAdditionalInfoEvent__bindgen_ty_1, data_float) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AAdditionalInfoEvent"][::std::mem::size_of::() - 64usize]; + ["Alignment of AAdditionalInfoEvent"][::std::mem::align_of::() - 4usize]; + ["Offset of field: AAdditionalInfoEvent::type_"] + [::std::mem::offset_of!(AAdditionalInfoEvent, type_) - 0usize]; + ["Offset of field: AAdditionalInfoEvent::serial"] + [::std::mem::offset_of!(AAdditionalInfoEvent, serial) - 4usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct AHeadTrackerEvent { @@ -16555,91 +10786,25 @@ pub struct AHeadTrackerEvent { pub vz: f32, pub discontinuity_count: i32, } -#[test] -fn bindgen_test_layout_AHeadTrackerEvent() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 28usize, - concat!("Size of: ", stringify!(AHeadTrackerEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AHeadTrackerEvent)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rx) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AHeadTrackerEvent), - "::", - stringify!(rx) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ry) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AHeadTrackerEvent), - "::", - stringify!(ry) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rz) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AHeadTrackerEvent), - "::", - stringify!(rz) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).vx) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(AHeadTrackerEvent), - "::", - stringify!(vx) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).vy) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AHeadTrackerEvent), - "::", - stringify!(vy) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).vz) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(AHeadTrackerEvent), - "::", - stringify!(vz) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).discontinuity_count) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(AHeadTrackerEvent), - "::", - stringify!(discontinuity_count) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AHeadTrackerEvent"][::std::mem::size_of::() - 28usize]; + ["Alignment of AHeadTrackerEvent"][::std::mem::align_of::() - 4usize]; + ["Offset of field: AHeadTrackerEvent::rx"] + [::std::mem::offset_of!(AHeadTrackerEvent, rx) - 0usize]; + ["Offset of field: AHeadTrackerEvent::ry"] + [::std::mem::offset_of!(AHeadTrackerEvent, ry) - 4usize]; + ["Offset of field: AHeadTrackerEvent::rz"] + [::std::mem::offset_of!(AHeadTrackerEvent, rz) - 8usize]; + ["Offset of field: AHeadTrackerEvent::vx"] + [::std::mem::offset_of!(AHeadTrackerEvent, vx) - 12usize]; + ["Offset of field: AHeadTrackerEvent::vy"] + [::std::mem::offset_of!(AHeadTrackerEvent, vy) - 16usize]; + ["Offset of field: AHeadTrackerEvent::vz"] + [::std::mem::offset_of!(AHeadTrackerEvent, vz) - 20usize]; + ["Offset of field: AHeadTrackerEvent::discontinuity_count"] + [::std::mem::offset_of!(AHeadTrackerEvent, discontinuity_count) - 24usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub struct ALimitedAxesImuEvent { @@ -16659,87 +10824,28 @@ pub struct ALimitedAxesImuEvent__bindgen_ty_1__bindgen_ty_1 { pub y: f32, pub z: f32, } -#[test] -fn bindgen_test_layout_ALimitedAxesImuEvent__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!( - "Size of: ", - stringify!(ALimitedAxesImuEvent__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ALimitedAxesImuEvent__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(x) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(y) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).z) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(z) - ) - ); -} -#[test] -fn bindgen_test_layout_ALimitedAxesImuEvent__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(ALimitedAxesImuEvent__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ALimitedAxesImuEvent__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).calib) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuEvent__bindgen_ty_1), - "::", - stringify!(calib) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ALimitedAxesImuEvent__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of ALimitedAxesImuEvent__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ALimitedAxesImuEvent__bindgen_ty_1__bindgen_ty_1::x"] + [::std::mem::offset_of!(ALimitedAxesImuEvent__bindgen_ty_1__bindgen_ty_1, x) - 0usize]; + ["Offset of field: ALimitedAxesImuEvent__bindgen_ty_1__bindgen_ty_1::y"] + [::std::mem::offset_of!(ALimitedAxesImuEvent__bindgen_ty_1__bindgen_ty_1, y) - 4usize]; + ["Offset of field: ALimitedAxesImuEvent__bindgen_ty_1__bindgen_ty_1::z"] + [::std::mem::offset_of!(ALimitedAxesImuEvent__bindgen_ty_1__bindgen_ty_1, z) - 8usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ALimitedAxesImuEvent__bindgen_ty_1"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of ALimitedAxesImuEvent__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ALimitedAxesImuEvent__bindgen_ty_1::calib"] + [::std::mem::offset_of!(ALimitedAxesImuEvent__bindgen_ty_1, calib) - 0usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub union ALimitedAxesImuEvent__bindgen_ty_2 { @@ -16753,100 +10859,39 @@ pub struct ALimitedAxesImuEvent__bindgen_ty_2__bindgen_ty_1 { pub y_supported: f32, pub z_supported: f32, } -#[test] -fn bindgen_test_layout_ALimitedAxesImuEvent__bindgen_ty_2__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!( - "Size of: ", - stringify!(ALimitedAxesImuEvent__bindgen_ty_2__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ALimitedAxesImuEvent__bindgen_ty_2__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).x_supported) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuEvent__bindgen_ty_2__bindgen_ty_1), - "::", - stringify!(x_supported) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).y_supported) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuEvent__bindgen_ty_2__bindgen_ty_1), - "::", - stringify!(y_supported) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).z_supported) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuEvent__bindgen_ty_2__bindgen_ty_1), - "::", - stringify!(z_supported) - ) - ); -} -#[test] -fn bindgen_test_layout_ALimitedAxesImuEvent__bindgen_ty_2() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(ALimitedAxesImuEvent__bindgen_ty_2)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ALimitedAxesImuEvent__bindgen_ty_2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).supported) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuEvent__bindgen_ty_2), - "::", - stringify!(supported) - ) - ); -} -#[test] -fn bindgen_test_layout_ALimitedAxesImuEvent() { - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(ALimitedAxesImuEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(ALimitedAxesImuEvent)) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ALimitedAxesImuEvent__bindgen_ty_2__bindgen_ty_1"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of ALimitedAxesImuEvent__bindgen_ty_2__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ALimitedAxesImuEvent__bindgen_ty_2__bindgen_ty_1::x_supported"][::std::mem::offset_of!( + ALimitedAxesImuEvent__bindgen_ty_2__bindgen_ty_1, + x_supported + ) - 0usize]; + ["Offset of field: ALimitedAxesImuEvent__bindgen_ty_2__bindgen_ty_1::y_supported"][::std::mem::offset_of!( + ALimitedAxesImuEvent__bindgen_ty_2__bindgen_ty_1, + y_supported + ) - 4usize]; + ["Offset of field: ALimitedAxesImuEvent__bindgen_ty_2__bindgen_ty_1::z_supported"][::std::mem::offset_of!( + ALimitedAxesImuEvent__bindgen_ty_2__bindgen_ty_1, + z_supported + ) - 8usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ALimitedAxesImuEvent__bindgen_ty_2"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of ALimitedAxesImuEvent__bindgen_ty_2"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ALimitedAxesImuEvent__bindgen_ty_2::supported"] + [::std::mem::offset_of!(ALimitedAxesImuEvent__bindgen_ty_2, supported) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ALimitedAxesImuEvent"][::std::mem::size_of::() - 24usize]; + ["Alignment of ALimitedAxesImuEvent"][::std::mem::align_of::() - 4usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub struct ALimitedAxesImuUncalibratedEvent { @@ -16867,91 +10912,39 @@ pub struct ALimitedAxesImuUncalibratedEvent__bindgen_ty_1__bindgen_ty_1 { pub y_uncalib: f32, pub z_uncalib: f32, } -#[test] -fn bindgen_test_layout_ALimitedAxesImuUncalibratedEvent__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit< +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ALimitedAxesImuUncalibratedEvent__bindgen_ty_1__bindgen_ty_1"][::std::mem::size_of::< ALimitedAxesImuUncalibratedEvent__bindgen_ty_1__bindgen_ty_1, - > = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!( - "Size of: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).x_uncalib) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(x_uncalib) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).y_uncalib) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(y_uncalib) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).z_uncalib) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(z_uncalib) - ) - ); -} -#[test] -fn bindgen_test_layout_ALimitedAxesImuUncalibratedEvent__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!( - "Size of: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uncalib) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_1), - "::", - stringify!(uncalib) - ) - ); -} + >() - 12usize]; + ["Alignment of ALimitedAxesImuUncalibratedEvent__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::align_of::() + - 4usize]; + ["Offset of field: ALimitedAxesImuUncalibratedEvent__bindgen_ty_1__bindgen_ty_1::x_uncalib"][::std::mem::offset_of!( + ALimitedAxesImuUncalibratedEvent__bindgen_ty_1__bindgen_ty_1, + x_uncalib + ) + - 0usize]; + ["Offset of field: ALimitedAxesImuUncalibratedEvent__bindgen_ty_1__bindgen_ty_1::y_uncalib"][::std::mem::offset_of!( + ALimitedAxesImuUncalibratedEvent__bindgen_ty_1__bindgen_ty_1, + y_uncalib + ) + - 4usize]; + ["Offset of field: ALimitedAxesImuUncalibratedEvent__bindgen_ty_1__bindgen_ty_1::z_uncalib"][::std::mem::offset_of!( + ALimitedAxesImuUncalibratedEvent__bindgen_ty_1__bindgen_ty_1, + z_uncalib + ) + - 8usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ALimitedAxesImuUncalibratedEvent__bindgen_ty_1"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of ALimitedAxesImuUncalibratedEvent__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ALimitedAxesImuUncalibratedEvent__bindgen_ty_1::uncalib"] + [::std::mem::offset_of!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_1, uncalib) - 0usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub union ALimitedAxesImuUncalibratedEvent__bindgen_ty_2 { @@ -16965,91 +10958,39 @@ pub struct ALimitedAxesImuUncalibratedEvent__bindgen_ty_2__bindgen_ty_1 { pub y_bias: f32, pub z_bias: f32, } -#[test] -fn bindgen_test_layout_ALimitedAxesImuUncalibratedEvent__bindgen_ty_2__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit< +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ALimitedAxesImuUncalibratedEvent__bindgen_ty_2__bindgen_ty_1"][::std::mem::size_of::< ALimitedAxesImuUncalibratedEvent__bindgen_ty_2__bindgen_ty_1, - > = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!( - "Size of: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_2__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_2__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).x_bias) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_2__bindgen_ty_1), - "::", - stringify!(x_bias) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).y_bias) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_2__bindgen_ty_1), - "::", - stringify!(y_bias) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).z_bias) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_2__bindgen_ty_1), - "::", - stringify!(z_bias) - ) - ); -} -#[test] -fn bindgen_test_layout_ALimitedAxesImuUncalibratedEvent__bindgen_ty_2() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!( - "Size of: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_2) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bias) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_2), - "::", - stringify!(bias) - ) - ); -} + >() - 12usize]; + ["Alignment of ALimitedAxesImuUncalibratedEvent__bindgen_ty_2__bindgen_ty_1"] + [::std::mem::align_of::() + - 4usize]; + ["Offset of field: ALimitedAxesImuUncalibratedEvent__bindgen_ty_2__bindgen_ty_1::x_bias"][::std::mem::offset_of!( + ALimitedAxesImuUncalibratedEvent__bindgen_ty_2__bindgen_ty_1, + x_bias + ) + - 0usize]; + ["Offset of field: ALimitedAxesImuUncalibratedEvent__bindgen_ty_2__bindgen_ty_1::y_bias"][::std::mem::offset_of!( + ALimitedAxesImuUncalibratedEvent__bindgen_ty_2__bindgen_ty_1, + y_bias + ) + - 4usize]; + ["Offset of field: ALimitedAxesImuUncalibratedEvent__bindgen_ty_2__bindgen_ty_1::z_bias"][::std::mem::offset_of!( + ALimitedAxesImuUncalibratedEvent__bindgen_ty_2__bindgen_ty_1, + z_bias + ) + - 8usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ALimitedAxesImuUncalibratedEvent__bindgen_ty_2"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of ALimitedAxesImuUncalibratedEvent__bindgen_ty_2"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ALimitedAxesImuUncalibratedEvent__bindgen_ty_2::bias"] + [::std::mem::offset_of!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_2, bias) - 0usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub union ALimitedAxesImuUncalibratedEvent__bindgen_ty_3 { @@ -17063,148 +11004,51 @@ pub struct ALimitedAxesImuUncalibratedEvent__bindgen_ty_3__bindgen_ty_1 { pub y_supported: f32, pub z_supported: f32, } -#[test] -fn bindgen_test_layout_ALimitedAxesImuUncalibratedEvent__bindgen_ty_3__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit< +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ALimitedAxesImuUncalibratedEvent__bindgen_ty_3__bindgen_ty_1"][::std::mem::size_of::< ALimitedAxesImuUncalibratedEvent__bindgen_ty_3__bindgen_ty_1, - > = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!( - "Size of: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_3__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_3__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).x_supported) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_3__bindgen_ty_1), - "::", - stringify!(x_supported) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).y_supported) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_3__bindgen_ty_1), - "::", - stringify!(y_supported) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).z_supported) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_3__bindgen_ty_1), - "::", - stringify!(z_supported) - ) - ); -} -#[test] -fn bindgen_test_layout_ALimitedAxesImuUncalibratedEvent__bindgen_ty_3() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!( - "Size of: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_3) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_3) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).supported) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ALimitedAxesImuUncalibratedEvent__bindgen_ty_3), - "::", - stringify!(supported) - ) - ); -} -#[test] -fn bindgen_test_layout_ALimitedAxesImuUncalibratedEvent() { - assert_eq!( - ::std::mem::size_of::(), - 36usize, - concat!("Size of: ", stringify!(ALimitedAxesImuUncalibratedEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ALimitedAxesImuUncalibratedEvent) - ) - ); -} + >() - 12usize]; + ["Alignment of ALimitedAxesImuUncalibratedEvent__bindgen_ty_3__bindgen_ty_1"] + [::std::mem::align_of::() + - 4usize]; + ["Offset of field: ALimitedAxesImuUncalibratedEvent__bindgen_ty_3__bindgen_ty_1::x_supported"] [:: std :: mem :: offset_of ! (ALimitedAxesImuUncalibratedEvent__bindgen_ty_3__bindgen_ty_1 , x_supported) - 0usize] ; + ["Offset of field: ALimitedAxesImuUncalibratedEvent__bindgen_ty_3__bindgen_ty_1::y_supported"] [:: std :: mem :: offset_of ! (ALimitedAxesImuUncalibratedEvent__bindgen_ty_3__bindgen_ty_1 , y_supported) - 4usize] ; + ["Offset of field: ALimitedAxesImuUncalibratedEvent__bindgen_ty_3__bindgen_ty_1::z_supported"] [:: std :: mem :: offset_of ! (ALimitedAxesImuUncalibratedEvent__bindgen_ty_3__bindgen_ty_1 , z_supported) - 8usize] ; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ALimitedAxesImuUncalibratedEvent__bindgen_ty_3"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of ALimitedAxesImuUncalibratedEvent__bindgen_ty_3"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ALimitedAxesImuUncalibratedEvent__bindgen_ty_3::supported"][::std::mem::offset_of!( + ALimitedAxesImuUncalibratedEvent__bindgen_ty_3, + supported + ) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ALimitedAxesImuUncalibratedEvent"] + [::std::mem::size_of::() - 36usize]; + ["Alignment of ALimitedAxesImuUncalibratedEvent"] + [::std::mem::align_of::() - 4usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct AHeadingEvent { pub heading: f32, pub accuracy: f32, } -#[test] -fn bindgen_test_layout_AHeadingEvent() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(AHeadingEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AHeadingEvent)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).heading) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AHeadingEvent), - "::", - stringify!(heading) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).accuracy) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AHeadingEvent), - "::", - stringify!(accuracy) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AHeadingEvent"][::std::mem::size_of::() - 8usize]; + ["Alignment of AHeadingEvent"][::std::mem::align_of::() - 4usize]; + ["Offset of field: AHeadingEvent::heading"] + [::std::mem::offset_of!(AHeadingEvent, heading) - 0usize]; + ["Offset of field: AHeadingEvent::accuracy"] + [::std::mem::offset_of!(AHeadingEvent, accuracy) - 4usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub struct ASensorEvent { @@ -17244,403 +11088,121 @@ pub union ASensorEvent__bindgen_ty_1__bindgen_ty_1 { pub dynamic_sensor_meta: ADynamicSensorEvent, pub additional_info: AAdditionalInfoEvent, pub head_tracker: AHeadTrackerEvent, - pub limited_axes_imu: ALimitedAxesImuEvent, - pub limited_axes_imu_uncalibrated: ALimitedAxesImuUncalibratedEvent, - pub heading: AHeadingEvent, -} -#[test] -fn bindgen_test_layout_ASensorEvent__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!( - "Size of: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).vector) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(vector) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).acceleration) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(acceleration) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gyro) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(gyro) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).magnetic) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(magnetic) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).temperature) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(temperature) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).distance) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(distance) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).light) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(light) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pressure) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(pressure) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).relative_humidity) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(relative_humidity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uncalibrated_acceleration) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(uncalibrated_acceleration) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uncalibrated_gyro) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(uncalibrated_gyro) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uncalibrated_magnetic) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(uncalibrated_magnetic) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).meta_data) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(meta_data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).heart_rate) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(heart_rate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dynamic_sensor_meta) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(dynamic_sensor_meta) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).additional_info) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(additional_info) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).head_tracker) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(head_tracker) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).limited_axes_imu) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(limited_axes_imu) - ) - ); - assert_eq!( - unsafe { - ::std::ptr::addr_of!((*ptr).limited_axes_imu_uncalibrated) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(limited_axes_imu_uncalibrated) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).heading) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(heading) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union ASensorEvent__bindgen_ty_1__bindgen_ty_2 { - pub data: [u64; 8usize], - pub step_counter: u64, -} -#[test] -fn bindgen_test_layout_ASensorEvent__bindgen_ty_1__bindgen_ty_2() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!( - "Size of: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_2) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).step_counter) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(step_counter) - ) - ); -} -#[test] -fn bindgen_test_layout_ASensorEvent__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(ASensorEvent__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(ASensorEvent__bindgen_ty_1)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).u64_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent__bindgen_ty_1), - "::", - stringify!(u64_) - ) - ); + pub limited_axes_imu: ALimitedAxesImuEvent, + pub limited_axes_imu_uncalibrated: ALimitedAxesImuUncalibratedEvent, + pub heading: AHeadingEvent, } -#[test] -fn bindgen_test_layout_ASensorEvent() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 104usize, - concat!("Size of: ", stringify!(ASensorEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(ASensorEvent)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent), - "::", - stringify!(version) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sensor) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent), - "::", - stringify!(sensor) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved0) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent), - "::", - stringify!(reserved0) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).timestamp) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent), - "::", - stringify!(timestamp) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved1) as usize - ptr as usize }, - 92usize, - concat!( - "Offset of field: ", - stringify!(ASensorEvent), - "::", - stringify!(reserved1) - ) - ); +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASensorEvent__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::size_of::() - 64usize]; + ["Alignment of ASensorEvent__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::data"] + [::std::mem::offset_of!(ASensorEvent__bindgen_ty_1__bindgen_ty_1, data) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::vector"] + [::std::mem::offset_of!(ASensorEvent__bindgen_ty_1__bindgen_ty_1, vector) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::acceleration"] + [::std::mem::offset_of!(ASensorEvent__bindgen_ty_1__bindgen_ty_1, acceleration) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::gyro"] + [::std::mem::offset_of!(ASensorEvent__bindgen_ty_1__bindgen_ty_1, gyro) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::magnetic"] + [::std::mem::offset_of!(ASensorEvent__bindgen_ty_1__bindgen_ty_1, magnetic) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::temperature"] + [::std::mem::offset_of!(ASensorEvent__bindgen_ty_1__bindgen_ty_1, temperature) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::distance"] + [::std::mem::offset_of!(ASensorEvent__bindgen_ty_1__bindgen_ty_1, distance) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::light"] + [::std::mem::offset_of!(ASensorEvent__bindgen_ty_1__bindgen_ty_1, light) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::pressure"] + [::std::mem::offset_of!(ASensorEvent__bindgen_ty_1__bindgen_ty_1, pressure) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::relative_humidity"][::std::mem::offset_of!( + ASensorEvent__bindgen_ty_1__bindgen_ty_1, + relative_humidity + ) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::uncalibrated_acceleration"][::std::mem::offset_of!( + ASensorEvent__bindgen_ty_1__bindgen_ty_1, + uncalibrated_acceleration + ) + - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::uncalibrated_gyro"][::std::mem::offset_of!( + ASensorEvent__bindgen_ty_1__bindgen_ty_1, + uncalibrated_gyro + ) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::uncalibrated_magnetic"][::std::mem::offset_of!( + ASensorEvent__bindgen_ty_1__bindgen_ty_1, + uncalibrated_magnetic + ) + - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::meta_data"] + [::std::mem::offset_of!(ASensorEvent__bindgen_ty_1__bindgen_ty_1, meta_data) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::heart_rate"] + [::std::mem::offset_of!(ASensorEvent__bindgen_ty_1__bindgen_ty_1, heart_rate) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::dynamic_sensor_meta"][::std::mem::offset_of!( + ASensorEvent__bindgen_ty_1__bindgen_ty_1, + dynamic_sensor_meta + ) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::additional_info"][::std::mem::offset_of!( + ASensorEvent__bindgen_ty_1__bindgen_ty_1, + additional_info + ) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::head_tracker"] + [::std::mem::offset_of!(ASensorEvent__bindgen_ty_1__bindgen_ty_1, head_tracker) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::limited_axes_imu"][::std::mem::offset_of!( + ASensorEvent__bindgen_ty_1__bindgen_ty_1, + limited_axes_imu + ) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::limited_axes_imu_uncalibrated"][::std::mem::offset_of!( + ASensorEvent__bindgen_ty_1__bindgen_ty_1, + limited_axes_imu_uncalibrated + ) + - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_1::heading"] + [::std::mem::offset_of!(ASensorEvent__bindgen_ty_1__bindgen_ty_1, heading) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub union ASensorEvent__bindgen_ty_1__bindgen_ty_2 { + pub data: [u64; 8usize], + pub step_counter: u64, } +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASensorEvent__bindgen_ty_1__bindgen_ty_2"] + [::std::mem::size_of::() - 64usize]; + ["Alignment of ASensorEvent__bindgen_ty_1__bindgen_ty_2"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_2::data"] + [::std::mem::offset_of!(ASensorEvent__bindgen_ty_1__bindgen_ty_2, data) - 0usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1__bindgen_ty_2::step_counter"] + [::std::mem::offset_of!(ASensorEvent__bindgen_ty_1__bindgen_ty_2, step_counter) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASensorEvent__bindgen_ty_1"] + [::std::mem::size_of::() - 64usize]; + ["Alignment of ASensorEvent__bindgen_ty_1"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: ASensorEvent__bindgen_ty_1::u64_"] + [::std::mem::offset_of!(ASensorEvent__bindgen_ty_1, u64_) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASensorEvent"][::std::mem::size_of::() - 104usize]; + ["Alignment of ASensorEvent"][::std::mem::align_of::() - 8usize]; + ["Offset of field: ASensorEvent::version"] + [::std::mem::offset_of!(ASensorEvent, version) - 0usize]; + ["Offset of field: ASensorEvent::sensor"] + [::std::mem::offset_of!(ASensorEvent, sensor) - 4usize]; + ["Offset of field: ASensorEvent::type_"][::std::mem::offset_of!(ASensorEvent, type_) - 8usize]; + ["Offset of field: ASensorEvent::reserved0"] + [::std::mem::offset_of!(ASensorEvent, reserved0) - 12usize]; + ["Offset of field: ASensorEvent::timestamp"] + [::std::mem::offset_of!(ASensorEvent, timestamp) - 16usize]; + ["Offset of field: ASensorEvent::flags"][::std::mem::offset_of!(ASensorEvent, flags) - 88usize]; + ["Offset of field: ASensorEvent::reserved1"] + [::std::mem::offset_of!(ASensorEvent, reserved1) - 92usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ASensorManager { @@ -18249,71 +11811,21 @@ pub struct sync_merge_data { pub flags: __u32, pub pad: __u32, } -#[test] -fn bindgen_test_layout_sync_merge_data() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(sync_merge_data)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(sync_merge_data)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sync_merge_data), - "::", - stringify!(name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fd2) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(sync_merge_data), - "::", - stringify!(fd2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fence) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(sync_merge_data), - "::", - stringify!(fence) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(sync_merge_data), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(sync_merge_data), - "::", - stringify!(pad) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sync_merge_data"][::std::mem::size_of::() - 48usize]; + ["Alignment of sync_merge_data"][::std::mem::align_of::() - 4usize]; + ["Offset of field: sync_merge_data::name"] + [::std::mem::offset_of!(sync_merge_data, name) - 0usize]; + ["Offset of field: sync_merge_data::fd2"] + [::std::mem::offset_of!(sync_merge_data, fd2) - 32usize]; + ["Offset of field: sync_merge_data::fence"] + [::std::mem::offset_of!(sync_merge_data, fence) - 36usize]; + ["Offset of field: sync_merge_data::flags"] + [::std::mem::offset_of!(sync_merge_data, flags) - 40usize]; + ["Offset of field: sync_merge_data::pad"] + [::std::mem::offset_of!(sync_merge_data, pad) - 44usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct sync_fence_info { @@ -18323,71 +11835,21 @@ pub struct sync_fence_info { pub flags: __u32, pub timestamp_ns: __u64, } -#[test] -fn bindgen_test_layout_sync_fence_info() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 80usize, - concat!("Size of: ", stringify!(sync_fence_info)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(sync_fence_info)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).obj_name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sync_fence_info), - "::", - stringify!(obj_name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).driver_name) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(sync_fence_info), - "::", - stringify!(driver_name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).status) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(sync_fence_info), - "::", - stringify!(status) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 68usize, - concat!( - "Offset of field: ", - stringify!(sync_fence_info), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).timestamp_ns) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(sync_fence_info), - "::", - stringify!(timestamp_ns) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sync_fence_info"][::std::mem::size_of::() - 80usize]; + ["Alignment of sync_fence_info"][::std::mem::align_of::() - 8usize]; + ["Offset of field: sync_fence_info::obj_name"] + [::std::mem::offset_of!(sync_fence_info, obj_name) - 0usize]; + ["Offset of field: sync_fence_info::driver_name"] + [::std::mem::offset_of!(sync_fence_info, driver_name) - 32usize]; + ["Offset of field: sync_fence_info::status"] + [::std::mem::offset_of!(sync_fence_info, status) - 64usize]; + ["Offset of field: sync_fence_info::flags"] + [::std::mem::offset_of!(sync_fence_info, flags) - 68usize]; + ["Offset of field: sync_fence_info::timestamp_ns"] + [::std::mem::offset_of!(sync_fence_info, timestamp_ns) - 72usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct sync_file_info { @@ -18398,122 +11860,37 @@ pub struct sync_file_info { pub pad: __u32, pub sync_fence_info: __u64, } -#[test] -fn bindgen_test_layout_sync_file_info() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(sync_file_info)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(sync_file_info)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sync_file_info), - "::", - stringify!(name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).status) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(sync_file_info), - "::", - stringify!(status) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(sync_file_info), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).num_fences) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(sync_file_info), - "::", - stringify!(num_fences) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(sync_file_info), - "::", - stringify!(pad) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sync_fence_info) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(sync_file_info), - "::", - stringify!(sync_fence_info) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sync_file_info"][::std::mem::size_of::() - 56usize]; + ["Alignment of sync_file_info"][::std::mem::align_of::() - 8usize]; + ["Offset of field: sync_file_info::name"] + [::std::mem::offset_of!(sync_file_info, name) - 0usize]; + ["Offset of field: sync_file_info::status"] + [::std::mem::offset_of!(sync_file_info, status) - 32usize]; + ["Offset of field: sync_file_info::flags"] + [::std::mem::offset_of!(sync_file_info, flags) - 36usize]; + ["Offset of field: sync_file_info::num_fences"] + [::std::mem::offset_of!(sync_file_info, num_fences) - 40usize]; + ["Offset of field: sync_file_info::pad"][::std::mem::offset_of!(sync_file_info, pad) - 44usize]; + ["Offset of field: sync_file_info::sync_fence_info"] + [::std::mem::offset_of!(sync_file_info, sync_fence_info) - 48usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct sync_set_deadline { pub deadline_ns: __u64, pub pad: __u64, } -#[test] -fn bindgen_test_layout_sync_set_deadline() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(sync_set_deadline)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(sync_set_deadline)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).deadline_ns) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sync_set_deadline), - "::", - stringify!(deadline_ns) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(sync_set_deadline), - "::", - stringify!(pad) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sync_set_deadline"][::std::mem::size_of::() - 16usize]; + ["Alignment of sync_set_deadline"][::std::mem::align_of::() - 8usize]; + ["Offset of field: sync_set_deadline::deadline_ns"] + [::std::mem::offset_of!(sync_set_deadline, deadline_ns) - 0usize]; + ["Offset of field: sync_set_deadline::pad"] + [::std::mem::offset_of!(sync_set_deadline, pad) - 8usize]; +}; extern "C" { pub fn sync_merge(name: *const ::std::os::raw::c_char, fd1: i32, fd2: i32) -> i32; } @@ -18634,131 +12011,22 @@ pub struct tm { pub tm_gmtoff: ::std::os::raw::c_long, pub tm_zone: *const ::std::os::raw::c_char, } -#[test] -fn bindgen_test_layout_tm() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(tm)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(tm)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tm_sec) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_sec) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tm_min) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_min) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tm_hour) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_hour) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tm_mday) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_mday) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tm_mon) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_mon) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tm_year) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_year) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tm_wday) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_wday) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tm_yday) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_yday) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tm_isdst) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_isdst) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tm_gmtoff) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_gmtoff) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tm_zone) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_zone) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of tm"][::std::mem::size_of::() - 56usize]; + ["Alignment of tm"][::std::mem::align_of::() - 8usize]; + ["Offset of field: tm::tm_sec"][::std::mem::offset_of!(tm, tm_sec) - 0usize]; + ["Offset of field: tm::tm_min"][::std::mem::offset_of!(tm, tm_min) - 4usize]; + ["Offset of field: tm::tm_hour"][::std::mem::offset_of!(tm, tm_hour) - 8usize]; + ["Offset of field: tm::tm_mday"][::std::mem::offset_of!(tm, tm_mday) - 12usize]; + ["Offset of field: tm::tm_mon"][::std::mem::offset_of!(tm, tm_mon) - 16usize]; + ["Offset of field: tm::tm_year"][::std::mem::offset_of!(tm, tm_year) - 20usize]; + ["Offset of field: tm::tm_wday"][::std::mem::offset_of!(tm, tm_wday) - 24usize]; + ["Offset of field: tm::tm_yday"][::std::mem::offset_of!(tm, tm_yday) - 28usize]; + ["Offset of field: tm::tm_isdst"][::std::mem::offset_of!(tm, tm_isdst) - 32usize]; + ["Offset of field: tm::tm_gmtoff"][::std::mem::offset_of!(tm, tm_gmtoff) - 40usize]; + ["Offset of field: tm::tm_zone"][::std::mem::offset_of!(tm, tm_zone) - 48usize]; +}; extern "C" { pub fn time(__t: *mut time_t) -> time_t; } @@ -22949,42 +16217,17 @@ pub struct ACameraMetadata_rational { pub numerator: i32, pub denominator: i32, } -#[test] -fn bindgen_test_layout_ACameraMetadata_rational() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(ACameraMetadata_rational)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(ACameraMetadata_rational)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).numerator) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_rational), - "::", - stringify!(numerator) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).denominator) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_rational), - "::", - stringify!(denominator) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACameraMetadata_rational"] + [::std::mem::size_of::() - 8usize]; + ["Alignment of ACameraMetadata_rational"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ACameraMetadata_rational::numerator"] + [::std::mem::offset_of!(ACameraMetadata_rational, numerator) - 0usize]; + ["Offset of field: ACameraMetadata_rational::denominator"] + [::std::mem::offset_of!(ACameraMetadata_rational, denominator) - 4usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub struct ACameraMetadata_entry { @@ -23003,141 +16246,39 @@ pub union ACameraMetadata_entry__bindgen_ty_1 { pub d: *mut f64, pub r: *mut ACameraMetadata_rational, } -#[test] -fn bindgen_test_layout_ACameraMetadata_entry__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(ACameraMetadata_entry__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(ACameraMetadata_entry__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).u8_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_entry__bindgen_ty_1), - "::", - stringify!(u8_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).i32_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_entry__bindgen_ty_1), - "::", - stringify!(i32_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).f) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_entry__bindgen_ty_1), - "::", - stringify!(f) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).i64_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_entry__bindgen_ty_1), - "::", - stringify!(i64_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).d) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_entry__bindgen_ty_1), - "::", - stringify!(d) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).r) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_entry__bindgen_ty_1), - "::", - stringify!(r) - ) - ); -} -#[test] -fn bindgen_test_layout_ACameraMetadata_entry() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(ACameraMetadata_entry)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(ACameraMetadata_entry)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tag) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_entry), - "::", - stringify!(tag) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_entry), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_entry), - "::", - stringify!(count) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_entry), - "::", - stringify!(data) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACameraMetadata_entry__bindgen_ty_1"] + [::std::mem::size_of::() - 8usize]; + ["Alignment of ACameraMetadata_entry__bindgen_ty_1"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: ACameraMetadata_entry__bindgen_ty_1::u8_"] + [::std::mem::offset_of!(ACameraMetadata_entry__bindgen_ty_1, u8_) - 0usize]; + ["Offset of field: ACameraMetadata_entry__bindgen_ty_1::i32_"] + [::std::mem::offset_of!(ACameraMetadata_entry__bindgen_ty_1, i32_) - 0usize]; + ["Offset of field: ACameraMetadata_entry__bindgen_ty_1::f"] + [::std::mem::offset_of!(ACameraMetadata_entry__bindgen_ty_1, f) - 0usize]; + ["Offset of field: ACameraMetadata_entry__bindgen_ty_1::i64_"] + [::std::mem::offset_of!(ACameraMetadata_entry__bindgen_ty_1, i64_) - 0usize]; + ["Offset of field: ACameraMetadata_entry__bindgen_ty_1::d"] + [::std::mem::offset_of!(ACameraMetadata_entry__bindgen_ty_1, d) - 0usize]; + ["Offset of field: ACameraMetadata_entry__bindgen_ty_1::r"] + [::std::mem::offset_of!(ACameraMetadata_entry__bindgen_ty_1, r) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACameraMetadata_entry"][::std::mem::size_of::() - 24usize]; + ["Alignment of ACameraMetadata_entry"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: ACameraMetadata_entry::tag"] + [::std::mem::offset_of!(ACameraMetadata_entry, tag) - 0usize]; + ["Offset of field: ACameraMetadata_entry::type_"] + [::std::mem::offset_of!(ACameraMetadata_entry, type_) - 4usize]; + ["Offset of field: ACameraMetadata_entry::count"] + [::std::mem::offset_of!(ACameraMetadata_entry, count) - 8usize]; + ["Offset of field: ACameraMetadata_entry::data"] + [::std::mem::offset_of!(ACameraMetadata_entry, data) - 16usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub struct ACameraMetadata_const_entry { @@ -23156,144 +16297,40 @@ pub union ACameraMetadata_const_entry__bindgen_ty_1 { pub d: *const f64, pub r: *const ACameraMetadata_rational, } -#[test] -fn bindgen_test_layout_ACameraMetadata_const_entry__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!( - "Size of: ", - stringify!(ACameraMetadata_const_entry__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(ACameraMetadata_const_entry__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).u8_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_const_entry__bindgen_ty_1), - "::", - stringify!(u8_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).i32_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_const_entry__bindgen_ty_1), - "::", - stringify!(i32_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).f) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_const_entry__bindgen_ty_1), - "::", - stringify!(f) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).i64_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_const_entry__bindgen_ty_1), - "::", - stringify!(i64_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).d) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_const_entry__bindgen_ty_1), - "::", - stringify!(d) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).r) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_const_entry__bindgen_ty_1), - "::", - stringify!(r) - ) - ); -} -#[test] -fn bindgen_test_layout_ACameraMetadata_const_entry() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(ACameraMetadata_const_entry)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(ACameraMetadata_const_entry)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tag) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_const_entry), - "::", - stringify!(tag) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_const_entry), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_const_entry), - "::", - stringify!(count) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(ACameraMetadata_const_entry), - "::", - stringify!(data) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACameraMetadata_const_entry__bindgen_ty_1"] + [::std::mem::size_of::() - 8usize]; + ["Alignment of ACameraMetadata_const_entry__bindgen_ty_1"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: ACameraMetadata_const_entry__bindgen_ty_1::u8_"] + [::std::mem::offset_of!(ACameraMetadata_const_entry__bindgen_ty_1, u8_) - 0usize]; + ["Offset of field: ACameraMetadata_const_entry__bindgen_ty_1::i32_"] + [::std::mem::offset_of!(ACameraMetadata_const_entry__bindgen_ty_1, i32_) - 0usize]; + ["Offset of field: ACameraMetadata_const_entry__bindgen_ty_1::f"] + [::std::mem::offset_of!(ACameraMetadata_const_entry__bindgen_ty_1, f) - 0usize]; + ["Offset of field: ACameraMetadata_const_entry__bindgen_ty_1::i64_"] + [::std::mem::offset_of!(ACameraMetadata_const_entry__bindgen_ty_1, i64_) - 0usize]; + ["Offset of field: ACameraMetadata_const_entry__bindgen_ty_1::d"] + [::std::mem::offset_of!(ACameraMetadata_const_entry__bindgen_ty_1, d) - 0usize]; + ["Offset of field: ACameraMetadata_const_entry__bindgen_ty_1::r"] + [::std::mem::offset_of!(ACameraMetadata_const_entry__bindgen_ty_1, r) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACameraMetadata_const_entry"] + [::std::mem::size_of::() - 24usize]; + ["Alignment of ACameraMetadata_const_entry"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: ACameraMetadata_const_entry::tag"] + [::std::mem::offset_of!(ACameraMetadata_const_entry, tag) - 0usize]; + ["Offset of field: ACameraMetadata_const_entry::type_"] + [::std::mem::offset_of!(ACameraMetadata_const_entry, type_) - 4usize]; + ["Offset of field: ACameraMetadata_const_entry::count"] + [::std::mem::offset_of!(ACameraMetadata_const_entry, count) - 8usize]; + ["Offset of field: ACameraMetadata_const_entry::data"] + [::std::mem::offset_of!(ACameraMetadata_const_entry, data) - 16usize]; +}; extern "C" { pub fn ACameraMetadata_getConstEntry( metadata: *const ACameraMetadata, @@ -23522,68 +16559,21 @@ pub struct ACameraCaptureSession_stateCallbacks { pub onReady: ACameraCaptureSession_stateCallback, pub onActive: ACameraCaptureSession_stateCallback, } -#[test] -fn bindgen_test_layout_ACameraCaptureSession_stateCallbacks() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!( - "Size of: ", - stringify!(ACameraCaptureSession_stateCallbacks) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(ACameraCaptureSession_stateCallbacks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).context) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_stateCallbacks), - "::", - stringify!(context) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onClosed) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_stateCallbacks), - "::", - stringify!(onClosed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onReady) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_stateCallbacks), - "::", - stringify!(onReady) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onActive) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_stateCallbacks), - "::", - stringify!(onActive) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACameraCaptureSession_stateCallbacks"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of ACameraCaptureSession_stateCallbacks"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: ACameraCaptureSession_stateCallbacks::context"] + [::std::mem::offset_of!(ACameraCaptureSession_stateCallbacks, context) - 0usize]; + ["Offset of field: ACameraCaptureSession_stateCallbacks::onClosed"] + [::std::mem::offset_of!(ACameraCaptureSession_stateCallbacks, onClosed) - 8usize]; + ["Offset of field: ACameraCaptureSession_stateCallbacks::onReady"] + [::std::mem::offset_of!(ACameraCaptureSession_stateCallbacks, onReady) - 16usize]; + ["Offset of field: ACameraCaptureSession_stateCallbacks::onActive"] + [::std::mem::offset_of!(ACameraCaptureSession_stateCallbacks, onActive) - 24usize]; +}; pub type ACameraCaptureSession_prepareCallback = ::std::option::Option< unsafe extern "C" fn( context: *mut ::std::os::raw::c_void, @@ -23602,62 +16592,20 @@ pub struct ACameraCaptureFailure { pub sequenceId: ::std::os::raw::c_int, pub wasImageCaptured: bool, } -#[test] -fn bindgen_test_layout_ACameraCaptureFailure() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(ACameraCaptureFailure)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(ACameraCaptureFailure)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).frameNumber) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureFailure), - "::", - stringify!(frameNumber) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reason) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureFailure), - "::", - stringify!(reason) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sequenceId) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureFailure), - "::", - stringify!(sequenceId) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).wasImageCaptured) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureFailure), - "::", - stringify!(wasImageCaptured) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACameraCaptureFailure"][::std::mem::size_of::() - 24usize]; + ["Alignment of ACameraCaptureFailure"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: ACameraCaptureFailure::frameNumber"] + [::std::mem::offset_of!(ACameraCaptureFailure, frameNumber) - 0usize]; + ["Offset of field: ACameraCaptureFailure::reason"] + [::std::mem::offset_of!(ACameraCaptureFailure, reason) - 8usize]; + ["Offset of field: ACameraCaptureFailure::sequenceId"] + [::std::mem::offset_of!(ACameraCaptureFailure, sequenceId) - 12usize]; + ["Offset of field: ACameraCaptureFailure::wasImageCaptured"] + [::std::mem::offset_of!(ACameraCaptureFailure, wasImageCaptured) - 16usize]; +}; pub type ACameraCaptureSession_captureCallback_start = ::std::option::Option< unsafe extern "C" fn( context: *mut ::std::os::raw::c_void, @@ -23718,108 +16666,41 @@ pub struct ACameraCaptureSession_captureCallbacks { pub onCaptureSequenceAborted: ACameraCaptureSession_captureCallback_sequenceAbort, pub onCaptureBufferLost: ACameraCaptureSession_captureCallback_bufferLost, } -#[test] -fn bindgen_test_layout_ACameraCaptureSession_captureCallbacks() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!( - "Size of: ", - stringify!(ACameraCaptureSession_captureCallbacks) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(ACameraCaptureSession_captureCallbacks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).context) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_captureCallbacks), - "::", - stringify!(context) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureStarted) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_captureCallbacks), - "::", - stringify!(onCaptureStarted) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureProgressed) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_captureCallbacks), - "::", - stringify!(onCaptureProgressed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureCompleted) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_captureCallbacks), - "::", - stringify!(onCaptureCompleted) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureFailed) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_captureCallbacks), - "::", - stringify!(onCaptureFailed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureSequenceCompleted) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_captureCallbacks), - "::", - stringify!(onCaptureSequenceCompleted) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureSequenceAborted) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_captureCallbacks), - "::", - stringify!(onCaptureSequenceAborted) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureBufferLost) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_captureCallbacks), - "::", - stringify!(onCaptureBufferLost) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACameraCaptureSession_captureCallbacks"] + [::std::mem::size_of::() - 64usize]; + ["Alignment of ACameraCaptureSession_captureCallbacks"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: ACameraCaptureSession_captureCallbacks::context"] + [::std::mem::offset_of!(ACameraCaptureSession_captureCallbacks, context) - 0usize]; + ["Offset of field: ACameraCaptureSession_captureCallbacks::onCaptureStarted"] + [::std::mem::offset_of!(ACameraCaptureSession_captureCallbacks, onCaptureStarted) - 8usize]; + ["Offset of field: ACameraCaptureSession_captureCallbacks::onCaptureProgressed"][::std::mem::offset_of!( + ACameraCaptureSession_captureCallbacks, + onCaptureProgressed + ) - 16usize]; + ["Offset of field: ACameraCaptureSession_captureCallbacks::onCaptureCompleted"][::std::mem::offset_of!( + ACameraCaptureSession_captureCallbacks, + onCaptureCompleted + ) - 24usize]; + ["Offset of field: ACameraCaptureSession_captureCallbacks::onCaptureFailed"] + [::std::mem::offset_of!(ACameraCaptureSession_captureCallbacks, onCaptureFailed) - 32usize]; + ["Offset of field: ACameraCaptureSession_captureCallbacks::onCaptureSequenceCompleted"][::std::mem::offset_of!( + ACameraCaptureSession_captureCallbacks, + onCaptureSequenceCompleted + ) + - 40usize]; + ["Offset of field: ACameraCaptureSession_captureCallbacks::onCaptureSequenceAborted"][::std::mem::offset_of!( + ACameraCaptureSession_captureCallbacks, + onCaptureSequenceAborted + ) + - 48usize]; + ["Offset of field: ACameraCaptureSession_captureCallbacks::onCaptureBufferLost"][::std::mem::offset_of!( + ACameraCaptureSession_captureCallbacks, + onCaptureBufferLost + ) - 56usize]; +}; pub const CAPTURE_SEQUENCE_ID_NONE: _bindgen_ty_67 = -1; pub type _bindgen_ty_67 = ::std::os::raw::c_int; extern "C" { @@ -23892,42 +16773,17 @@ pub struct ALogicalCameraCaptureFailure { pub captureFailure: ACameraCaptureFailure, pub physicalCameraId: *const ::std::os::raw::c_char, } -#[test] -fn bindgen_test_layout_ALogicalCameraCaptureFailure() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(ALogicalCameraCaptureFailure)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(ALogicalCameraCaptureFailure)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).captureFailure) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ALogicalCameraCaptureFailure), - "::", - stringify!(captureFailure) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).physicalCameraId) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(ALogicalCameraCaptureFailure), - "::", - stringify!(physicalCameraId) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ALogicalCameraCaptureFailure"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of ALogicalCameraCaptureFailure"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: ALogicalCameraCaptureFailure::captureFailure"] + [::std::mem::offset_of!(ALogicalCameraCaptureFailure, captureFailure) - 0usize]; + ["Offset of field: ALogicalCameraCaptureFailure::physicalCameraId"] + [::std::mem::offset_of!(ALogicalCameraCaptureFailure, physicalCameraId) - 24usize]; +}; pub type ACameraCaptureSession_logicalCamera_captureCallback_failed = ::std::option::Option< unsafe extern "C" fn( context: *mut ::std::os::raw::c_void, @@ -23948,112 +16804,28 @@ pub struct ACameraCaptureSession_logicalCamera_captureCallbacks { pub onCaptureSequenceAborted: ACameraCaptureSession_captureCallback_sequenceAbort, pub onCaptureBufferLost: ACameraCaptureSession_captureCallback_bufferLost, } -#[test] -fn bindgen_test_layout_ACameraCaptureSession_logicalCamera_captureCallbacks() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!( - "Size of: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacks) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).context) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacks), - "::", - stringify!(context) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureStarted) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacks), - "::", - stringify!(onCaptureStarted) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureProgressed) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacks), - "::", - stringify!(onCaptureProgressed) - ) - ); - assert_eq!( - unsafe { - ::std::ptr::addr_of!((*ptr).onLogicalCameraCaptureCompleted) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacks), - "::", - stringify!(onLogicalCameraCaptureCompleted) - ) - ); - assert_eq!( - unsafe { - ::std::ptr::addr_of!((*ptr).onLogicalCameraCaptureFailed) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacks), - "::", - stringify!(onLogicalCameraCaptureFailed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureSequenceCompleted) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacks), - "::", - stringify!(onCaptureSequenceCompleted) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureSequenceAborted) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacks), - "::", - stringify!(onCaptureSequenceAborted) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureBufferLost) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacks), - "::", - stringify!(onCaptureBufferLost) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACameraCaptureSession_logicalCamera_captureCallbacks"] + [::std::mem::size_of::() - 64usize]; + ["Alignment of ACameraCaptureSession_logicalCamera_captureCallbacks"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: ACameraCaptureSession_logicalCamera_captureCallbacks::context"][::std::mem::offset_of!( + ACameraCaptureSession_logicalCamera_captureCallbacks, + context + ) - 0usize]; + ["Offset of field: ACameraCaptureSession_logicalCamera_captureCallbacks::onCaptureStarted"][::std::mem::offset_of!( + ACameraCaptureSession_logicalCamera_captureCallbacks, + onCaptureStarted + ) + - 8usize]; + ["Offset of field: ACameraCaptureSession_logicalCamera_captureCallbacks::onCaptureProgressed"] [:: std :: mem :: offset_of ! (ACameraCaptureSession_logicalCamera_captureCallbacks , onCaptureProgressed) - 16usize] ; + ["Offset of field: ACameraCaptureSession_logicalCamera_captureCallbacks::onLogicalCameraCaptureCompleted"] [:: std :: mem :: offset_of ! (ACameraCaptureSession_logicalCamera_captureCallbacks , onLogicalCameraCaptureCompleted) - 24usize] ; + ["Offset of field: ACameraCaptureSession_logicalCamera_captureCallbacks::onLogicalCameraCaptureFailed"] [:: std :: mem :: offset_of ! (ACameraCaptureSession_logicalCamera_captureCallbacks , onLogicalCameraCaptureFailed) - 32usize] ; + ["Offset of field: ACameraCaptureSession_logicalCamera_captureCallbacks::onCaptureSequenceCompleted"] [:: std :: mem :: offset_of ! (ACameraCaptureSession_logicalCamera_captureCallbacks , onCaptureSequenceCompleted) - 40usize] ; + ["Offset of field: ACameraCaptureSession_logicalCamera_captureCallbacks::onCaptureSequenceAborted"] [:: std :: mem :: offset_of ! (ACameraCaptureSession_logicalCamera_captureCallbacks , onCaptureSequenceAborted) - 48usize] ; + ["Offset of field: ACameraCaptureSession_logicalCamera_captureCallbacks::onCaptureBufferLost"] [:: std :: mem :: offset_of ! (ACameraCaptureSession_logicalCamera_captureCallbacks , onCaptureBufferLost) - 56usize] ; +}; extern "C" { pub fn ACameraCaptureSession_logicalCamera_capture( session: *mut ACameraCaptureSession, @@ -24093,108 +16865,45 @@ pub struct ACameraCaptureSession_captureCallbacksV2 { pub onCaptureSequenceAborted: ACameraCaptureSession_captureCallback_sequenceAbort, pub onCaptureBufferLost: ACameraCaptureSession_captureCallback_bufferLost, } -#[test] -fn bindgen_test_layout_ACameraCaptureSession_captureCallbacksV2() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!( - "Size of: ", - stringify!(ACameraCaptureSession_captureCallbacksV2) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(ACameraCaptureSession_captureCallbacksV2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).context) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_captureCallbacksV2), - "::", - stringify!(context) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureStarted) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_captureCallbacksV2), - "::", - stringify!(onCaptureStarted) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureProgressed) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_captureCallbacksV2), - "::", - stringify!(onCaptureProgressed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureCompleted) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_captureCallbacksV2), - "::", - stringify!(onCaptureCompleted) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureFailed) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_captureCallbacksV2), - "::", - stringify!(onCaptureFailed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureSequenceCompleted) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_captureCallbacksV2), - "::", - stringify!(onCaptureSequenceCompleted) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureSequenceAborted) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_captureCallbacksV2), - "::", - stringify!(onCaptureSequenceAborted) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureBufferLost) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_captureCallbacksV2), - "::", - stringify!(onCaptureBufferLost) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACameraCaptureSession_captureCallbacksV2"] + [::std::mem::size_of::() - 64usize]; + ["Alignment of ACameraCaptureSession_captureCallbacksV2"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: ACameraCaptureSession_captureCallbacksV2::context"] + [::std::mem::offset_of!(ACameraCaptureSession_captureCallbacksV2, context) - 0usize]; + ["Offset of field: ACameraCaptureSession_captureCallbacksV2::onCaptureStarted"][::std::mem::offset_of!( + ACameraCaptureSession_captureCallbacksV2, + onCaptureStarted + ) - 8usize]; + ["Offset of field: ACameraCaptureSession_captureCallbacksV2::onCaptureProgressed"][::std::mem::offset_of!( + ACameraCaptureSession_captureCallbacksV2, + onCaptureProgressed + ) - 16usize]; + ["Offset of field: ACameraCaptureSession_captureCallbacksV2::onCaptureCompleted"][::std::mem::offset_of!( + ACameraCaptureSession_captureCallbacksV2, + onCaptureCompleted + ) - 24usize]; + ["Offset of field: ACameraCaptureSession_captureCallbacksV2::onCaptureFailed"][::std::mem::offset_of!( + ACameraCaptureSession_captureCallbacksV2, + onCaptureFailed + ) - 32usize]; + ["Offset of field: ACameraCaptureSession_captureCallbacksV2::onCaptureSequenceCompleted"][::std::mem::offset_of!( + ACameraCaptureSession_captureCallbacksV2, + onCaptureSequenceCompleted + ) + - 40usize]; + ["Offset of field: ACameraCaptureSession_captureCallbacksV2::onCaptureSequenceAborted"][::std::mem::offset_of!( + ACameraCaptureSession_captureCallbacksV2, + onCaptureSequenceAborted + ) + - 48usize]; + ["Offset of field: ACameraCaptureSession_captureCallbacksV2::onCaptureBufferLost"][::std::mem::offset_of!( + ACameraCaptureSession_captureCallbacksV2, + onCaptureBufferLost + ) - 56usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ACameraCaptureSession_logicalCamera_captureCallbacksV2 { @@ -24207,112 +16916,29 @@ pub struct ACameraCaptureSession_logicalCamera_captureCallbacksV2 { pub onCaptureSequenceAborted: ACameraCaptureSession_captureCallback_sequenceAbort, pub onCaptureBufferLost: ACameraCaptureSession_captureCallback_bufferLost, } -#[test] -fn bindgen_test_layout_ACameraCaptureSession_logicalCamera_captureCallbacksV2() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!( - "Size of: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacksV2) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacksV2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).context) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacksV2), - "::", - stringify!(context) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureStarted) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacksV2), - "::", - stringify!(onCaptureStarted) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureProgressed) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacksV2), - "::", - stringify!(onCaptureProgressed) - ) - ); - assert_eq!( - unsafe { - ::std::ptr::addr_of!((*ptr).onLogicalCameraCaptureCompleted) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacksV2), - "::", - stringify!(onLogicalCameraCaptureCompleted) - ) - ); - assert_eq!( - unsafe { - ::std::ptr::addr_of!((*ptr).onLogicalCameraCaptureFailed) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacksV2), - "::", - stringify!(onLogicalCameraCaptureFailed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureSequenceCompleted) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacksV2), - "::", - stringify!(onCaptureSequenceCompleted) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureSequenceAborted) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacksV2), - "::", - stringify!(onCaptureSequenceAborted) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCaptureBufferLost) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(ACameraCaptureSession_logicalCamera_captureCallbacksV2), - "::", - stringify!(onCaptureBufferLost) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACameraCaptureSession_logicalCamera_captureCallbacksV2"] + [::std::mem::size_of::() - 64usize]; + ["Alignment of ACameraCaptureSession_logicalCamera_captureCallbacksV2"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: ACameraCaptureSession_logicalCamera_captureCallbacksV2::context"][::std::mem::offset_of!( + ACameraCaptureSession_logicalCamera_captureCallbacksV2, + context + ) + - 0usize]; + ["Offset of field: ACameraCaptureSession_logicalCamera_captureCallbacksV2::onCaptureStarted"][::std::mem::offset_of!( + ACameraCaptureSession_logicalCamera_captureCallbacksV2, + onCaptureStarted + ) + - 8usize]; + ["Offset of field: ACameraCaptureSession_logicalCamera_captureCallbacksV2::onCaptureProgressed"] [:: std :: mem :: offset_of ! (ACameraCaptureSession_logicalCamera_captureCallbacksV2 , onCaptureProgressed) - 16usize] ; + ["Offset of field: ACameraCaptureSession_logicalCamera_captureCallbacksV2::onLogicalCameraCaptureCompleted"] [:: std :: mem :: offset_of ! (ACameraCaptureSession_logicalCamera_captureCallbacksV2 , onLogicalCameraCaptureCompleted) - 24usize] ; + ["Offset of field: ACameraCaptureSession_logicalCamera_captureCallbacksV2::onLogicalCameraCaptureFailed"] [:: std :: mem :: offset_of ! (ACameraCaptureSession_logicalCamera_captureCallbacksV2 , onLogicalCameraCaptureFailed) - 32usize] ; + ["Offset of field: ACameraCaptureSession_logicalCamera_captureCallbacksV2::onCaptureSequenceCompleted"] [:: std :: mem :: offset_of ! (ACameraCaptureSession_logicalCamera_captureCallbacksV2 , onCaptureSequenceCompleted) - 40usize] ; + ["Offset of field: ACameraCaptureSession_logicalCamera_captureCallbacksV2::onCaptureSequenceAborted"] [:: std :: mem :: offset_of ! (ACameraCaptureSession_logicalCamera_captureCallbacksV2 , onCaptureSequenceAborted) - 48usize] ; + ["Offset of field: ACameraCaptureSession_logicalCamera_captureCallbacksV2::onCaptureBufferLost"] [:: std :: mem :: offset_of ! (ACameraCaptureSession_logicalCamera_captureCallbacksV2 , onCaptureBufferLost) - 56usize] ; +}; extern "C" { pub fn ACameraCaptureSession_captureV2( session: *mut ACameraCaptureSession, @@ -24368,41 +16994,15 @@ pub struct ACameraIdList { pub numCameras: ::std::os::raw::c_int, pub cameraIds: *mut *const ::std::os::raw::c_char, } -#[test] -fn bindgen_test_layout_ACameraIdList() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(ACameraIdList)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(ACameraIdList)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).numCameras) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraIdList), - "::", - stringify!(numCameras) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cameraIds) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ACameraIdList), - "::", - stringify!(cameraIds) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACameraIdList"][::std::mem::size_of::() - 16usize]; + ["Alignment of ACameraIdList"][::std::mem::align_of::() - 8usize]; + ["Offset of field: ACameraIdList::numCameras"] + [::std::mem::offset_of!(ACameraIdList, numCameras) - 0usize]; + ["Offset of field: ACameraIdList::cameraIds"] + [::std::mem::offset_of!(ACameraIdList, cameraIds) - 8usize]; +}; pub const ERROR_CAMERA_IN_USE: _bindgen_ty_68 = 1; pub const ERROR_MAX_CAMERAS_IN_USE: _bindgen_ty_68 = 2; pub const ERROR_CAMERA_DISABLED: _bindgen_ty_68 = 3; @@ -24426,52 +17026,19 @@ pub struct ACameraDevice_StateCallbacks { pub onDisconnected: ACameraDevice_StateCallback, pub onError: ACameraDevice_ErrorStateCallback, } -#[test] -fn bindgen_test_layout_ACameraDevice_StateCallbacks() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(ACameraDevice_StateCallbacks)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(ACameraDevice_StateCallbacks)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).context) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraDevice_StateCallbacks), - "::", - stringify!(context) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onDisconnected) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ACameraDevice_StateCallbacks), - "::", - stringify!(onDisconnected) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onError) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(ACameraDevice_StateCallbacks), - "::", - stringify!(onError) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACameraDevice_StateCallbacks"] + [::std::mem::size_of::() - 24usize]; + ["Alignment of ACameraDevice_StateCallbacks"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: ACameraDevice_StateCallbacks::context"] + [::std::mem::offset_of!(ACameraDevice_StateCallbacks, context) - 0usize]; + ["Offset of field: ACameraDevice_StateCallbacks::onDisconnected"] + [::std::mem::offset_of!(ACameraDevice_StateCallbacks, onDisconnected) - 8usize]; + ["Offset of field: ACameraDevice_StateCallbacks::onError"] + [::std::mem::offset_of!(ACameraDevice_StateCallbacks, onError) - 16usize]; +}; pub type ACameraDevice_stateCallbacks = ACameraDevice_StateCallbacks; extern "C" { pub fn ACameraDevice_close(device: *mut ACameraDevice) -> camera_status_t; @@ -24640,55 +17207,21 @@ pub struct ACameraManager_AvailabilityListener { pub onCameraAvailable: ACameraManager_AvailabilityCallback, pub onCameraUnavailable: ACameraManager_AvailabilityCallback, } -#[test] -fn bindgen_test_layout_ACameraManager_AvailabilityListener() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(ACameraManager_AvailabilityListener)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(ACameraManager_AvailabilityListener) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).context) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraManager_AvailabilityListener), - "::", - stringify!(context) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCameraAvailable) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ACameraManager_AvailabilityListener), - "::", - stringify!(onCameraAvailable) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onCameraUnavailable) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(ACameraManager_AvailabilityListener), - "::", - stringify!(onCameraUnavailable) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACameraManager_AvailabilityListener"] + [::std::mem::size_of::() - 24usize]; + ["Alignment of ACameraManager_AvailabilityListener"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: ACameraManager_AvailabilityListener::context"] + [::std::mem::offset_of!(ACameraManager_AvailabilityListener, context) - 0usize]; + ["Offset of field: ACameraManager_AvailabilityListener::onCameraAvailable"] + [::std::mem::offset_of!(ACameraManager_AvailabilityListener, onCameraAvailable) - 8usize]; + ["Offset of field: ACameraManager_AvailabilityListener::onCameraUnavailable"][::std::mem::offset_of!( + ACameraManager_AvailabilityListener, + onCameraUnavailable + ) - 16usize]; +}; pub type ACameraManager_AvailabilityCallbacks = ACameraManager_AvailabilityListener; extern "C" { pub fn ACameraManager_registerAvailabilityCallback( @@ -24728,80 +17261,31 @@ pub struct ACameraManager_ExtendedAvailabilityListener { pub onPhysicalCameraUnavailable: ACameraManager_PhysicalCameraAvailabilityCallback, pub reserved: [*mut ::std::os::raw::c_void; 4usize], } -#[test] -fn bindgen_test_layout_ACameraManager_ExtendedAvailabilityListener() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 80usize, - concat!( - "Size of: ", - stringify!(ACameraManager_ExtendedAvailabilityListener) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(ACameraManager_ExtendedAvailabilityListener) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).availabilityCallbacks) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACameraManager_ExtendedAvailabilityListener), - "::", - stringify!(availabilityCallbacks) - ) - ); - assert_eq!( - unsafe { - ::std::ptr::addr_of!((*ptr).onCameraAccessPrioritiesChanged) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(ACameraManager_ExtendedAvailabilityListener), - "::", - stringify!(onCameraAccessPrioritiesChanged) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onPhysicalCameraAvailable) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(ACameraManager_ExtendedAvailabilityListener), - "::", - stringify!(onPhysicalCameraAvailable) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onPhysicalCameraUnavailable) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(ACameraManager_ExtendedAvailabilityListener), - "::", - stringify!(onPhysicalCameraUnavailable) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(ACameraManager_ExtendedAvailabilityListener), - "::", - stringify!(reserved) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACameraManager_ExtendedAvailabilityListener"] + [::std::mem::size_of::() - 80usize]; + ["Alignment of ACameraManager_ExtendedAvailabilityListener"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: ACameraManager_ExtendedAvailabilityListener::availabilityCallbacks"][::std::mem::offset_of!( + ACameraManager_ExtendedAvailabilityListener, + availabilityCallbacks + ) + - 0usize]; + ["Offset of field: ACameraManager_ExtendedAvailabilityListener::onCameraAccessPrioritiesChanged"] [:: std :: mem :: offset_of ! (ACameraManager_ExtendedAvailabilityListener , onCameraAccessPrioritiesChanged) - 24usize] ; + ["Offset of field: ACameraManager_ExtendedAvailabilityListener::onPhysicalCameraAvailable"][::std::mem::offset_of!( + ACameraManager_ExtendedAvailabilityListener, + onPhysicalCameraAvailable + ) + - 32usize]; + ["Offset of field: ACameraManager_ExtendedAvailabilityListener::onPhysicalCameraUnavailable"][::std::mem::offset_of!( + ACameraManager_ExtendedAvailabilityListener, + onPhysicalCameraUnavailable + ) + - 40usize]; + ["Offset of field: ACameraManager_ExtendedAvailabilityListener::reserved"] + [::std::mem::offset_of!(ACameraManager_ExtendedAvailabilityListener, reserved) - 48usize]; +}; pub type ACameraManager_ExtendedAvailabilityCallbacks = ACameraManager_ExtendedAvailabilityListener; extern "C" { pub fn ACameraManager_registerExtendedAvailabilityCallback( @@ -24882,61 +17366,18 @@ pub struct AImageCropRect { pub right: i32, pub bottom: i32, } -#[test] -fn bindgen_test_layout_AImageCropRect() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(AImageCropRect)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AImageCropRect)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).left) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AImageCropRect), - "::", - stringify!(left) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).top) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AImageCropRect), - "::", - stringify!(top) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).right) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AImageCropRect), - "::", - stringify!(right) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bottom) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(AImageCropRect), - "::", - stringify!(bottom) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AImageCropRect"][::std::mem::size_of::() - 16usize]; + ["Alignment of AImageCropRect"][::std::mem::align_of::() - 4usize]; + ["Offset of field: AImageCropRect::left"] + [::std::mem::offset_of!(AImageCropRect, left) - 0usize]; + ["Offset of field: AImageCropRect::top"][::std::mem::offset_of!(AImageCropRect, top) - 4usize]; + ["Offset of field: AImageCropRect::right"] + [::std::mem::offset_of!(AImageCropRect, right) - 8usize]; + ["Offset of field: AImageCropRect::bottom"] + [::std::mem::offset_of!(AImageCropRect, bottom) - 12usize]; +}; extern "C" { pub fn AImage_delete(image: *mut AImage); } @@ -25051,42 +17492,17 @@ pub struct AImageReader_ImageListener { pub context: *mut ::std::os::raw::c_void, pub onImageAvailable: AImageReader_ImageCallback, } -#[test] -fn bindgen_test_layout_AImageReader_ImageListener() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(AImageReader_ImageListener)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AImageReader_ImageListener)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).context) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AImageReader_ImageListener), - "::", - stringify!(context) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onImageAvailable) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AImageReader_ImageListener), - "::", - stringify!(onImageAvailable) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AImageReader_ImageListener"] + [::std::mem::size_of::() - 16usize]; + ["Alignment of AImageReader_ImageListener"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: AImageReader_ImageListener::context"] + [::std::mem::offset_of!(AImageReader_ImageListener, context) - 0usize]; + ["Offset of field: AImageReader_ImageListener::onImageAvailable"] + [::std::mem::offset_of!(AImageReader_ImageListener, onImageAvailable) - 8usize]; +}; extern "C" { pub fn AImageReader_setImageListener( reader: *mut AImageReader, @@ -25141,45 +17557,17 @@ pub struct AImageReader_BufferRemovedListener { pub context: *mut ::std::os::raw::c_void, pub onBufferRemoved: AImageReader_BufferRemovedCallback, } -#[test] -fn bindgen_test_layout_AImageReader_BufferRemovedListener() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(AImageReader_BufferRemovedListener)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(AImageReader_BufferRemovedListener) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).context) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AImageReader_BufferRemovedListener), - "::", - stringify!(context) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onBufferRemoved) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AImageReader_BufferRemovedListener), - "::", - stringify!(onBufferRemoved) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AImageReader_BufferRemovedListener"] + [::std::mem::size_of::() - 16usize]; + ["Alignment of AImageReader_BufferRemovedListener"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: AImageReader_BufferRemovedListener::context"] + [::std::mem::offset_of!(AImageReader_BufferRemovedListener, context) - 0usize]; + ["Offset of field: AImageReader_BufferRemovedListener::onBufferRemoved"] + [::std::mem::offset_of!(AImageReader_BufferRemovedListener, onBufferRemoved) - 8usize]; +}; extern "C" { pub fn AImageReader_setBufferRemovedListener( reader: *mut AImageReader, @@ -25193,7 +17581,7 @@ pub struct AMediaCrypto { } pub type AMediaUUID = [u8; 16usize]; extern "C" { - pub fn AMediaCrypto_isCryptoSchemeSupported(uuid: *mut u8) -> bool; + pub fn AMediaCrypto_isCryptoSchemeSupported(uuid: *const u8) -> bool; } extern "C" { pub fn AMediaCrypto_requiresSecureDecoderComponent(mime: *const ::std::os::raw::c_char) @@ -25201,7 +17589,7 @@ extern "C" { } extern "C" { pub fn AMediaCrypto_new( - uuid: *mut u8, + uuid: *const u8, initData: *const ::std::os::raw::c_void, initDataSize: usize, ) -> *mut AMediaCrypto; @@ -25820,62 +18208,20 @@ pub struct AMediaCodecBufferInfo { pub presentationTimeUs: i64, pub flags: u32, } -#[test] -fn bindgen_test_layout_AMediaCodecBufferInfo() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(AMediaCodecBufferInfo)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AMediaCodecBufferInfo)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).offset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AMediaCodecBufferInfo), - "::", - stringify!(offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AMediaCodecBufferInfo), - "::", - stringify!(size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).presentationTimeUs) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AMediaCodecBufferInfo), - "::", - stringify!(presentationTimeUs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AMediaCodecBufferInfo), - "::", - stringify!(flags) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AMediaCodecBufferInfo"][::std::mem::size_of::() - 24usize]; + ["Alignment of AMediaCodecBufferInfo"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: AMediaCodecBufferInfo::offset"] + [::std::mem::offset_of!(AMediaCodecBufferInfo, offset) - 0usize]; + ["Offset of field: AMediaCodecBufferInfo::size"] + [::std::mem::offset_of!(AMediaCodecBufferInfo, size) - 4usize]; + ["Offset of field: AMediaCodecBufferInfo::presentationTimeUs"] + [::std::mem::offset_of!(AMediaCodecBufferInfo, presentationTimeUs) - 8usize]; + ["Offset of field: AMediaCodecBufferInfo::flags"] + [::std::mem::offset_of!(AMediaCodecBufferInfo, flags) - 16usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct AMediaCodecCryptoInfo { @@ -25932,65 +18278,21 @@ pub struct AMediaCodecOnAsyncNotifyCallback { pub onAsyncFormatChanged: AMediaCodecOnAsyncFormatChanged, pub onAsyncError: AMediaCodecOnAsyncError, } -#[test] -fn bindgen_test_layout_AMediaCodecOnAsyncNotifyCallback() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(AMediaCodecOnAsyncNotifyCallback)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(AMediaCodecOnAsyncNotifyCallback) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onAsyncInputAvailable) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AMediaCodecOnAsyncNotifyCallback), - "::", - stringify!(onAsyncInputAvailable) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onAsyncOutputAvailable) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AMediaCodecOnAsyncNotifyCallback), - "::", - stringify!(onAsyncOutputAvailable) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onAsyncFormatChanged) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AMediaCodecOnAsyncNotifyCallback), - "::", - stringify!(onAsyncFormatChanged) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onAsyncError) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(AMediaCodecOnAsyncNotifyCallback), - "::", - stringify!(onAsyncError) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AMediaCodecOnAsyncNotifyCallback"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of AMediaCodecOnAsyncNotifyCallback"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: AMediaCodecOnAsyncNotifyCallback::onAsyncInputAvailable"] + [::std::mem::offset_of!(AMediaCodecOnAsyncNotifyCallback, onAsyncInputAvailable) - 0usize]; + ["Offset of field: AMediaCodecOnAsyncNotifyCallback::onAsyncOutputAvailable"] + [::std::mem::offset_of!(AMediaCodecOnAsyncNotifyCallback, onAsyncOutputAvailable) - 8usize]; + ["Offset of field: AMediaCodecOnAsyncNotifyCallback::onAsyncFormatChanged"] + [::std::mem::offset_of!(AMediaCodecOnAsyncNotifyCallback, onAsyncFormatChanged) - 16usize]; + ["Offset of field: AMediaCodecOnAsyncNotifyCallback::onAsyncError"] + [::std::mem::offset_of!(AMediaCodecOnAsyncNotifyCallback, onAsyncError) - 24usize]; +}; pub type AMediaCodecOnFrameRendered = ::std::option::Option< unsafe extern "C" fn( codec: *mut AMediaCodec, @@ -26200,41 +18502,15 @@ pub struct cryptoinfo_pattern_t { pub encryptBlocks: i32, pub skipBlocks: i32, } -#[test] -fn bindgen_test_layout_cryptoinfo_pattern_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(cryptoinfo_pattern_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(cryptoinfo_pattern_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).encryptBlocks) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cryptoinfo_pattern_t), - "::", - stringify!(encryptBlocks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).skipBlocks) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(cryptoinfo_pattern_t), - "::", - stringify!(skipBlocks) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cryptoinfo_pattern_t"][::std::mem::size_of::() - 8usize]; + ["Alignment of cryptoinfo_pattern_t"][::std::mem::align_of::() - 4usize]; + ["Offset of field: cryptoinfo_pattern_t::encryptBlocks"] + [::std::mem::offset_of!(cryptoinfo_pattern_t, encryptBlocks) - 0usize]; + ["Offset of field: cryptoinfo_pattern_t::skipBlocks"] + [::std::mem::offset_of!(cryptoinfo_pattern_t, skipBlocks) - 4usize]; +}; extern "C" { pub fn AMediaCodecCryptoInfo_new( numsubsamples: ::std::os::raw::c_int, @@ -26373,41 +18649,15 @@ pub struct AMediaDrmByteArray { pub ptr: *const u8, pub length: usize, } -#[test] -fn bindgen_test_layout_AMediaDrmByteArray() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(AMediaDrmByteArray)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AMediaDrmByteArray)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ptr) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AMediaDrmByteArray), - "::", - stringify!(ptr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AMediaDrmByteArray), - "::", - stringify!(length) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AMediaDrmByteArray"][::std::mem::size_of::() - 16usize]; + ["Alignment of AMediaDrmByteArray"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AMediaDrmByteArray::ptr"] + [::std::mem::offset_of!(AMediaDrmByteArray, ptr) - 0usize]; + ["Offset of field: AMediaDrmByteArray::length"] + [::std::mem::offset_of!(AMediaDrmByteArray, length) - 8usize]; +}; pub type AMediaDrmSessionId = AMediaDrmByteArray; pub type AMediaDrmScope = AMediaDrmByteArray; pub type AMediaDrmKeySetId = AMediaDrmByteArray; @@ -26467,42 +18717,16 @@ pub struct AMediaDrmKeyValuePair { pub mKey: *const ::std::os::raw::c_char, pub mValue: *const ::std::os::raw::c_char, } -#[test] -fn bindgen_test_layout_AMediaDrmKeyValuePair() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(AMediaDrmKeyValuePair)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AMediaDrmKeyValuePair)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mKey) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AMediaDrmKeyValuePair), - "::", - stringify!(mKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mValue) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AMediaDrmKeyValuePair), - "::", - stringify!(mValue) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AMediaDrmKeyValuePair"][::std::mem::size_of::() - 16usize]; + ["Alignment of AMediaDrmKeyValuePair"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: AMediaDrmKeyValuePair::mKey"] + [::std::mem::offset_of!(AMediaDrmKeyValuePair, mKey) - 0usize]; + ["Offset of field: AMediaDrmKeyValuePair::mValue"] + [::std::mem::offset_of!(AMediaDrmKeyValuePair, mValue) - 8usize]; +}; pub type AMediaDrmKeyValue = AMediaDrmKeyValuePair; impl AMediaKeyStatusType { pub const KEY_STATUS_TYPE_USABLE: AMediaKeyStatusType = AMediaKeyStatusType(0); @@ -26529,41 +18753,15 @@ pub struct AMediaDrmKeyStatus { pub keyId: AMediaDrmKeyId, pub keyType: AMediaDrmKeyStatusType, } -#[test] -fn bindgen_test_layout_AMediaDrmKeyStatus() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(AMediaDrmKeyStatus)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AMediaDrmKeyStatus)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).keyId) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AMediaDrmKeyStatus), - "::", - stringify!(keyId) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).keyType) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AMediaDrmKeyStatus), - "::", - stringify!(keyType) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AMediaDrmKeyStatus"][::std::mem::size_of::() - 24usize]; + ["Alignment of AMediaDrmKeyStatus"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AMediaDrmKeyStatus::keyId"] + [::std::mem::offset_of!(AMediaDrmKeyStatus, keyId) - 0usize]; + ["Offset of field: AMediaDrmKeyStatus::keyType"] + [::std::mem::offset_of!(AMediaDrmKeyStatus, keyType) - 16usize]; +}; pub type AMediaDrmEventListener = ::std::option::Option< unsafe extern "C" fn( arg1: *mut AMediaDrm, @@ -26889,92 +19087,28 @@ pub struct PsshEntry { pub datalen: usize, pub data: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout_PsshEntry() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(PsshEntry)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(PsshEntry)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uuid) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(PsshEntry), - "::", - stringify!(uuid) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).datalen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(PsshEntry), - "::", - stringify!(datalen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(PsshEntry), - "::", - stringify!(data) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of PsshEntry"][::std::mem::size_of::() - 32usize]; + ["Alignment of PsshEntry"][::std::mem::align_of::() - 8usize]; + ["Offset of field: PsshEntry::uuid"][::std::mem::offset_of!(PsshEntry, uuid) - 0usize]; + ["Offset of field: PsshEntry::datalen"][::std::mem::offset_of!(PsshEntry, datalen) - 16usize]; + ["Offset of field: PsshEntry::data"][::std::mem::offset_of!(PsshEntry, data) - 24usize]; +}; #[repr(C)] #[derive(Debug)] pub struct PsshInfo { pub numentries: usize, pub entries: __IncompleteArrayField, } -#[test] -fn bindgen_test_layout_PsshInfo() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(PsshInfo)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(PsshInfo)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).numentries) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(PsshInfo), - "::", - stringify!(numentries) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).entries) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(PsshInfo), - "::", - stringify!(entries) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of PsshInfo"][::std::mem::size_of::() - 8usize]; + ["Alignment of PsshInfo"][::std::mem::align_of::() - 8usize]; + ["Offset of field: PsshInfo::numentries"] + [::std::mem::offset_of!(PsshInfo, numentries) - 0usize]; + ["Offset of field: PsshInfo::entries"][::std::mem::offset_of!(PsshInfo, entries) - 8usize]; +}; extern "C" { pub fn AMediaExtractor_getPsshInfo(arg1: *mut AMediaExtractor) -> *mut PsshInfo; } @@ -27087,58 +19221,16 @@ pub struct __va_list_tag { pub overflow_arg_area: *mut ::std::os::raw::c_void, pub reg_save_area: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout___va_list_tag() { - const UNINIT: ::std::mem::MaybeUninit<__va_list_tag> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__va_list_tag>(), - 24usize, - concat!("Size of: ", stringify!(__va_list_tag)) - ); - assert_eq!( - ::std::mem::align_of::<__va_list_tag>(), - 8usize, - concat!("Alignment of ", stringify!(__va_list_tag)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gp_offset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(gp_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fp_offset) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(fp_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).overflow_arg_area) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(overflow_arg_area) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reg_save_area) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(reg_save_area) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __va_list_tag"][::std::mem::size_of::<__va_list_tag>() - 24usize]; + ["Alignment of __va_list_tag"][::std::mem::align_of::<__va_list_tag>() - 8usize]; + ["Offset of field: __va_list_tag::gp_offset"] + [::std::mem::offset_of!(__va_list_tag, gp_offset) - 0usize]; + ["Offset of field: __va_list_tag::fp_offset"] + [::std::mem::offset_of!(__va_list_tag, fp_offset) - 4usize]; + ["Offset of field: __va_list_tag::overflow_arg_area"] + [::std::mem::offset_of!(__va_list_tag, overflow_arg_area) - 8usize]; + ["Offset of field: __va_list_tag::reg_save_area"] + [::std::mem::offset_of!(__va_list_tag, reg_save_area) - 16usize]; +};