summaryrefslogtreecommitdiff
path: root/tests/expectations/tests/struct_with_large_array.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/expectations/tests/struct_with_large_array.rs')
-rw-r--r--tests/expectations/tests/struct_with_large_array.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/expectations/tests/struct_with_large_array.rs b/tests/expectations/tests/struct_with_large_array.rs
index 56179c20..e323247f 100644
--- a/tests/expectations/tests/struct_with_large_array.rs
+++ b/tests/expectations/tests/struct_with_large_array.rs
@@ -24,7 +24,9 @@ fn bindgen_test_layout_S() {
);
assert_eq!(
unsafe {
- &(*(::std::ptr::null::<S>())).large_array as *const _ as usize
+ let uninit = ::std::mem::MaybeUninit::<S>::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).large_array) as usize - ptr as usize
},
0usize,
concat!(