summaryrefslogtreecommitdiff
path: root/tests/expectations/tests/replace_use.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/expectations/tests/replace_use.rs')
-rw-r--r--tests/expectations/tests/replace_use.rs21
1 files changed, 12 insertions, 9 deletions
diff --git a/tests/expectations/tests/replace_use.rs b/tests/expectations/tests/replace_use.rs
index ea1da987..9478801f 100644
--- a/tests/expectations/tests/replace_use.rs
+++ b/tests/expectations/tests/replace_use.rs
@@ -28,15 +28,18 @@ fn bindgen_test_layout_Test() {
4usize,
concat!("Alignment of ", stringify!(Test))
);
- assert_eq!(
- unsafe {
- let uninit = ::std::mem::MaybeUninit::<Test>::uninit();
- let ptr = uninit.as_ptr();
- ::std::ptr::addr_of!((*ptr).a) as usize - ptr as usize
- },
- 0usize,
- concat!("Offset of field: ", stringify!(Test), "::", stringify!(a))
- );
+ fn test_field_a() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::<Test>::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).a) as usize - ptr as usize
+ },
+ 0usize,
+ concat!("Offset of field: ", stringify!(Test), "::", stringify!(a))
+ );
+ }
+ test_field_a();
}
#[test]
fn __bindgen_test_layout_nsTArray_open0_long_close0_instantiation() {