diff --git a/tss-esapi-sys/src/bindings/x86_64-unknown-darwin.rs b/tss-esapi-sys/src/bindings/x86_64-unknown-darwin.rs index d8edfa90..16019d9a 100644 --- a/tss-esapi-sys/src/bindings/x86_64-unknown-darwin.rs +++ b/tss-esapi-sys/src/bindings/x86_64-unknown-darwin.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.59.1 */ +/* automatically generated by rust-bindgen 0.63.0 */ #[repr(C)] #[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] @@ -88,9 +88,9 @@ pub const __DARWIN_UNIX03: u32 = 1; pub const __DARWIN_64_BIT_INO_T: u32 = 1; pub const __DARWIN_VERS_1050: u32 = 1; pub const __DARWIN_NON_CANCELABLE: u32 = 0; -pub const __DARWIN_SUF_64_BIT_INO_T: &'static [u8; 9usize] = b"$INODE64\0"; -pub const __DARWIN_SUF_1050: &'static [u8; 6usize] = b"$1050\0"; -pub const __DARWIN_SUF_EXTSN: &'static [u8; 14usize] = b"$DARWIN_EXTSN\0"; +pub const __DARWIN_SUF_64_BIT_INO_T: &[u8; 9usize] = b"$INODE64\0"; +pub const __DARWIN_SUF_1050: &[u8; 6usize] = b"$1050\0"; +pub const __DARWIN_SUF_EXTSN: &[u8; 14usize] = b"$DARWIN_EXTSN\0"; pub const __DARWIN_C_ANSI: u32 = 4096; pub const __DARWIN_C_FULL: u32 = 900000; pub const __DARWIN_C_LEVEL: u32 = 900000; @@ -99,6 +99,7 @@ pub const __DARWIN_NO_LONG_LONG: u32 = 0; pub const _DARWIN_FEATURE_64_BIT_INODE: u32 = 1; pub const _DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE: u32 = 1; pub const _DARWIN_FEATURE_UNIX_CONFORMANCE: u32 = 3; +pub const __has_ptrcheck: u32 = 0; pub const __PTHREAD_SIZE__: u32 = 8176; pub const __PTHREAD_ATTR_SIZE__: u32 = 56; pub const __PTHREAD_MUTEXATTR_SIZE__: u32 = 8; @@ -233,7 +234,7 @@ pub const POLLNVAL: u32 = 32; pub const POLLSTANDARD: u32 = 511; pub const TSS2_TCTI_TIMEOUT_BLOCK: i32 = -1; pub const TSS2_TCTI_TIMEOUT_NONE: u32 = 0; -pub const TSS2_TCTI_INFO_SYMBOL: &'static [u8; 15usize] = b"Tss2_Tcti_Info\0"; +pub const TSS2_TCTI_INFO_SYMBOL: &[u8; 15usize] = b"Tss2_Tcti_Info\0"; pub const TSS2_SYS_MAX_SESSIONS: u32 = 3; pub const ESYS_TR_NONE: u32 = 4095; pub const ESYS_TR_PASSWORD: u32 = 255; @@ -277,166 +278,172 @@ pub const ESYS_TR_RH_PLATFORM: u32 = 268; pub const ESYS_TR_RH_PLATFORM_NV: u32 = 269; pub const ESYS_TR_RH_AUTH_FIRST: u32 = 272; pub const ESYS_TR_MIN_OBJECT: u32 = 4096; -pub const __PRI_8_LENGTH_MODIFIER__: &'static [u8; 3usize] = b"hh\0"; -pub const __PRI_64_LENGTH_MODIFIER__: &'static [u8; 3usize] = b"ll\0"; -pub const __SCN_64_LENGTH_MODIFIER__: &'static [u8; 3usize] = b"ll\0"; -pub const __PRI_MAX_LENGTH_MODIFIER__: &'static [u8; 2usize] = b"j\0"; -pub const __SCN_MAX_LENGTH_MODIFIER__: &'static [u8; 2usize] = b"j\0"; -pub const PRId8: &'static [u8; 4usize] = b"hhd\0"; -pub const PRIi8: &'static [u8; 4usize] = b"hhi\0"; -pub const PRIo8: &'static [u8; 4usize] = b"hho\0"; -pub const PRIu8: &'static [u8; 4usize] = b"hhu\0"; -pub const PRIx8: &'static [u8; 4usize] = b"hhx\0"; -pub const PRIX8: &'static [u8; 4usize] = b"hhX\0"; -pub const PRId16: &'static [u8; 3usize] = b"hd\0"; -pub const PRIi16: &'static [u8; 3usize] = b"hi\0"; -pub const PRIo16: &'static [u8; 3usize] = b"ho\0"; -pub const PRIu16: &'static [u8; 3usize] = b"hu\0"; -pub const PRIx16: &'static [u8; 3usize] = b"hx\0"; -pub const PRIX16: &'static [u8; 3usize] = b"hX\0"; -pub const PRId32: &'static [u8; 2usize] = b"d\0"; -pub const PRIi32: &'static [u8; 2usize] = b"i\0"; -pub const PRIo32: &'static [u8; 2usize] = b"o\0"; -pub const PRIu32: &'static [u8; 2usize] = b"u\0"; -pub const PRIx32: &'static [u8; 2usize] = b"x\0"; -pub const PRIX32: &'static [u8; 2usize] = b"X\0"; -pub const PRId64: &'static [u8; 4usize] = b"lld\0"; -pub const PRIi64: &'static [u8; 4usize] = b"lli\0"; -pub const PRIo64: &'static [u8; 4usize] = b"llo\0"; -pub const PRIu64: &'static [u8; 4usize] = b"llu\0"; -pub const PRIx64: &'static [u8; 4usize] = b"llx\0"; -pub const PRIX64: &'static [u8; 4usize] = b"llX\0"; -pub const PRIdLEAST8: &'static [u8; 4usize] = b"hhd\0"; -pub const PRIiLEAST8: &'static [u8; 4usize] = b"hhi\0"; -pub const PRIoLEAST8: &'static [u8; 4usize] = b"hho\0"; -pub const PRIuLEAST8: &'static [u8; 4usize] = b"hhu\0"; -pub const PRIxLEAST8: &'static [u8; 4usize] = b"hhx\0"; -pub const PRIXLEAST8: &'static [u8; 4usize] = b"hhX\0"; -pub const PRIdLEAST16: &'static [u8; 3usize] = b"hd\0"; -pub const PRIiLEAST16: &'static [u8; 3usize] = b"hi\0"; -pub const PRIoLEAST16: &'static [u8; 3usize] = b"ho\0"; -pub const PRIuLEAST16: &'static [u8; 3usize] = b"hu\0"; -pub const PRIxLEAST16: &'static [u8; 3usize] = b"hx\0"; -pub const PRIXLEAST16: &'static [u8; 3usize] = b"hX\0"; -pub const PRIdLEAST32: &'static [u8; 2usize] = b"d\0"; -pub const PRIiLEAST32: &'static [u8; 2usize] = b"i\0"; -pub const PRIoLEAST32: &'static [u8; 2usize] = b"o\0"; -pub const PRIuLEAST32: &'static [u8; 2usize] = b"u\0"; -pub const PRIxLEAST32: &'static [u8; 2usize] = b"x\0"; -pub const PRIXLEAST32: &'static [u8; 2usize] = b"X\0"; -pub const PRIdLEAST64: &'static [u8; 4usize] = b"lld\0"; -pub const PRIiLEAST64: &'static [u8; 4usize] = b"lli\0"; -pub const PRIoLEAST64: &'static [u8; 4usize] = b"llo\0"; -pub const PRIuLEAST64: &'static [u8; 4usize] = b"llu\0"; -pub const PRIxLEAST64: &'static [u8; 4usize] = b"llx\0"; -pub const PRIXLEAST64: &'static [u8; 4usize] = b"llX\0"; -pub const PRIdFAST8: &'static [u8; 4usize] = b"hhd\0"; -pub const PRIiFAST8: &'static [u8; 4usize] = b"hhi\0"; -pub const PRIoFAST8: &'static [u8; 4usize] = b"hho\0"; -pub const PRIuFAST8: &'static [u8; 4usize] = b"hhu\0"; -pub const PRIxFAST8: &'static [u8; 4usize] = b"hhx\0"; -pub const PRIXFAST8: &'static [u8; 4usize] = b"hhX\0"; -pub const PRIdFAST16: &'static [u8; 3usize] = b"hd\0"; -pub const PRIiFAST16: &'static [u8; 3usize] = b"hi\0"; -pub const PRIoFAST16: &'static [u8; 3usize] = b"ho\0"; -pub const PRIuFAST16: &'static [u8; 3usize] = b"hu\0"; -pub const PRIxFAST16: &'static [u8; 3usize] = b"hx\0"; -pub const PRIXFAST16: &'static [u8; 3usize] = b"hX\0"; -pub const PRIdFAST32: &'static [u8; 2usize] = b"d\0"; -pub const PRIiFAST32: &'static [u8; 2usize] = b"i\0"; -pub const PRIoFAST32: &'static [u8; 2usize] = b"o\0"; -pub const PRIuFAST32: &'static [u8; 2usize] = b"u\0"; -pub const PRIxFAST32: &'static [u8; 2usize] = b"x\0"; -pub const PRIXFAST32: &'static [u8; 2usize] = b"X\0"; -pub const PRIdFAST64: &'static [u8; 4usize] = b"lld\0"; -pub const PRIiFAST64: &'static [u8; 4usize] = b"lli\0"; -pub const PRIoFAST64: &'static [u8; 4usize] = b"llo\0"; -pub const PRIuFAST64: &'static [u8; 4usize] = b"llu\0"; -pub const PRIxFAST64: &'static [u8; 4usize] = b"llx\0"; -pub const PRIXFAST64: &'static [u8; 4usize] = b"llX\0"; -pub const PRIdPTR: &'static [u8; 3usize] = b"ld\0"; -pub const PRIiPTR: &'static [u8; 3usize] = b"li\0"; -pub const PRIoPTR: &'static [u8; 3usize] = b"lo\0"; -pub const PRIuPTR: &'static [u8; 3usize] = b"lu\0"; -pub const PRIxPTR: &'static [u8; 3usize] = b"lx\0"; -pub const PRIXPTR: &'static [u8; 3usize] = b"lX\0"; -pub const PRIdMAX: &'static [u8; 3usize] = b"jd\0"; -pub const PRIiMAX: &'static [u8; 3usize] = b"ji\0"; -pub const PRIoMAX: &'static [u8; 3usize] = b"jo\0"; -pub const PRIuMAX: &'static [u8; 3usize] = b"ju\0"; -pub const PRIxMAX: &'static [u8; 3usize] = b"jx\0"; -pub const PRIXMAX: &'static [u8; 3usize] = b"jX\0"; -pub const SCNd8: &'static [u8; 4usize] = b"hhd\0"; -pub const SCNi8: &'static [u8; 4usize] = b"hhi\0"; -pub const SCNo8: &'static [u8; 4usize] = b"hho\0"; -pub const SCNu8: &'static [u8; 4usize] = b"hhu\0"; -pub const SCNx8: &'static [u8; 4usize] = b"hhx\0"; -pub const SCNd16: &'static [u8; 3usize] = b"hd\0"; -pub const SCNi16: &'static [u8; 3usize] = b"hi\0"; -pub const SCNo16: &'static [u8; 3usize] = b"ho\0"; -pub const SCNu16: &'static [u8; 3usize] = b"hu\0"; -pub const SCNx16: &'static [u8; 3usize] = b"hx\0"; -pub const SCNd32: &'static [u8; 2usize] = b"d\0"; -pub const SCNi32: &'static [u8; 2usize] = b"i\0"; -pub const SCNo32: &'static [u8; 2usize] = b"o\0"; -pub const SCNu32: &'static [u8; 2usize] = b"u\0"; -pub const SCNx32: &'static [u8; 2usize] = b"x\0"; -pub const SCNd64: &'static [u8; 4usize] = b"lld\0"; -pub const SCNi64: &'static [u8; 4usize] = b"lli\0"; -pub const SCNo64: &'static [u8; 4usize] = b"llo\0"; -pub const SCNu64: &'static [u8; 4usize] = b"llu\0"; -pub const SCNx64: &'static [u8; 4usize] = b"llx\0"; -pub const SCNdLEAST8: &'static [u8; 4usize] = b"hhd\0"; -pub const SCNiLEAST8: &'static [u8; 4usize] = b"hhi\0"; -pub const SCNoLEAST8: &'static [u8; 4usize] = b"hho\0"; -pub const SCNuLEAST8: &'static [u8; 4usize] = b"hhu\0"; -pub const SCNxLEAST8: &'static [u8; 4usize] = b"hhx\0"; -pub const SCNdLEAST16: &'static [u8; 3usize] = b"hd\0"; -pub const SCNiLEAST16: &'static [u8; 3usize] = b"hi\0"; -pub const SCNoLEAST16: &'static [u8; 3usize] = b"ho\0"; -pub const SCNuLEAST16: &'static [u8; 3usize] = b"hu\0"; -pub const SCNxLEAST16: &'static [u8; 3usize] = b"hx\0"; -pub const SCNdLEAST32: &'static [u8; 2usize] = b"d\0"; -pub const SCNiLEAST32: &'static [u8; 2usize] = b"i\0"; -pub const SCNoLEAST32: &'static [u8; 2usize] = b"o\0"; -pub const SCNuLEAST32: &'static [u8; 2usize] = b"u\0"; -pub const SCNxLEAST32: &'static [u8; 2usize] = b"x\0"; -pub const SCNdLEAST64: &'static [u8; 4usize] = b"lld\0"; -pub const SCNiLEAST64: &'static [u8; 4usize] = b"lli\0"; -pub const SCNoLEAST64: &'static [u8; 4usize] = b"llo\0"; -pub const SCNuLEAST64: &'static [u8; 4usize] = b"llu\0"; -pub const SCNxLEAST64: &'static [u8; 4usize] = b"llx\0"; -pub const SCNdFAST8: &'static [u8; 4usize] = b"hhd\0"; -pub const SCNiFAST8: &'static [u8; 4usize] = b"hhi\0"; -pub const SCNoFAST8: &'static [u8; 4usize] = b"hho\0"; -pub const SCNuFAST8: &'static [u8; 4usize] = b"hhu\0"; -pub const SCNxFAST8: &'static [u8; 4usize] = b"hhx\0"; -pub const SCNdFAST16: &'static [u8; 3usize] = b"hd\0"; -pub const SCNiFAST16: &'static [u8; 3usize] = b"hi\0"; -pub const SCNoFAST16: &'static [u8; 3usize] = b"ho\0"; -pub const SCNuFAST16: &'static [u8; 3usize] = b"hu\0"; -pub const SCNxFAST16: &'static [u8; 3usize] = b"hx\0"; -pub const SCNdFAST32: &'static [u8; 2usize] = b"d\0"; -pub const SCNiFAST32: &'static [u8; 2usize] = b"i\0"; -pub const SCNoFAST32: &'static [u8; 2usize] = b"o\0"; -pub const SCNuFAST32: &'static [u8; 2usize] = b"u\0"; -pub const SCNxFAST32: &'static [u8; 2usize] = b"x\0"; -pub const SCNdFAST64: &'static [u8; 4usize] = b"lld\0"; -pub const SCNiFAST64: &'static [u8; 4usize] = b"lli\0"; -pub const SCNoFAST64: &'static [u8; 4usize] = b"llo\0"; -pub const SCNuFAST64: &'static [u8; 4usize] = b"llu\0"; -pub const SCNxFAST64: &'static [u8; 4usize] = b"llx\0"; -pub const SCNdPTR: &'static [u8; 3usize] = b"ld\0"; -pub const SCNiPTR: &'static [u8; 3usize] = b"li\0"; -pub const SCNoPTR: &'static [u8; 3usize] = b"lo\0"; -pub const SCNuPTR: &'static [u8; 3usize] = b"lu\0"; -pub const SCNxPTR: &'static [u8; 3usize] = b"lx\0"; -pub const SCNdMAX: &'static [u8; 3usize] = b"jd\0"; -pub const SCNiMAX: &'static [u8; 3usize] = b"ji\0"; -pub const SCNoMAX: &'static [u8; 3usize] = b"jo\0"; -pub const SCNuMAX: &'static [u8; 3usize] = b"ju\0"; -pub const SCNxMAX: &'static [u8; 3usize] = b"jx\0"; +pub const __PRI_8_LENGTH_MODIFIER__: &[u8; 3usize] = b"hh\0"; +pub const __PRI_64_LENGTH_MODIFIER__: &[u8; 3usize] = b"ll\0"; +pub const __SCN_64_LENGTH_MODIFIER__: &[u8; 3usize] = b"ll\0"; +pub const __PRI_MAX_LENGTH_MODIFIER__: &[u8; 2usize] = b"j\0"; +pub const __SCN_MAX_LENGTH_MODIFIER__: &[u8; 2usize] = b"j\0"; +pub const PRId8: &[u8; 4usize] = b"hhd\0"; +pub const PRIi8: &[u8; 4usize] = b"hhi\0"; +pub const PRIo8: &[u8; 4usize] = b"hho\0"; +pub const PRIu8: &[u8; 4usize] = b"hhu\0"; +pub const PRIx8: &[u8; 4usize] = b"hhx\0"; +pub const PRIX8: &[u8; 4usize] = b"hhX\0"; +pub const PRId16: &[u8; 3usize] = b"hd\0"; +pub const PRIi16: &[u8; 3usize] = b"hi\0"; +pub const PRIo16: &[u8; 3usize] = b"ho\0"; +pub const PRIu16: &[u8; 3usize] = b"hu\0"; +pub const PRIx16: &[u8; 3usize] = b"hx\0"; +pub const PRIX16: &[u8; 3usize] = b"hX\0"; +pub const PRId32: &[u8; 2usize] = b"d\0"; +pub const PRIi32: &[u8; 2usize] = b"i\0"; +pub const PRIo32: &[u8; 2usize] = b"o\0"; +pub const PRIu32: &[u8; 2usize] = b"u\0"; +pub const PRIx32: &[u8; 2usize] = b"x\0"; +pub const PRIX32: &[u8; 2usize] = b"X\0"; +pub const PRId64: &[u8; 4usize] = b"lld\0"; +pub const PRIi64: &[u8; 4usize] = b"lli\0"; +pub const PRIo64: &[u8; 4usize] = b"llo\0"; +pub const PRIu64: &[u8; 4usize] = b"llu\0"; +pub const PRIx64: &[u8; 4usize] = b"llx\0"; +pub const PRIX64: &[u8; 4usize] = b"llX\0"; +pub const PRIdLEAST8: &[u8; 4usize] = b"hhd\0"; +pub const PRIiLEAST8: &[u8; 4usize] = b"hhi\0"; +pub const PRIoLEAST8: &[u8; 4usize] = b"hho\0"; +pub const PRIuLEAST8: &[u8; 4usize] = b"hhu\0"; +pub const PRIxLEAST8: &[u8; 4usize] = b"hhx\0"; +pub const PRIXLEAST8: &[u8; 4usize] = b"hhX\0"; +pub const PRIdLEAST16: &[u8; 3usize] = b"hd\0"; +pub const PRIiLEAST16: &[u8; 3usize] = b"hi\0"; +pub const PRIoLEAST16: &[u8; 3usize] = b"ho\0"; +pub const PRIuLEAST16: &[u8; 3usize] = b"hu\0"; +pub const PRIxLEAST16: &[u8; 3usize] = b"hx\0"; +pub const PRIXLEAST16: &[u8; 3usize] = b"hX\0"; +pub const PRIdLEAST32: &[u8; 2usize] = b"d\0"; +pub const PRIiLEAST32: &[u8; 2usize] = b"i\0"; +pub const PRIoLEAST32: &[u8; 2usize] = b"o\0"; +pub const PRIuLEAST32: &[u8; 2usize] = b"u\0"; +pub const PRIxLEAST32: &[u8; 2usize] = b"x\0"; +pub const PRIXLEAST32: &[u8; 2usize] = b"X\0"; +pub const PRIdLEAST64: &[u8; 4usize] = b"lld\0"; +pub const PRIiLEAST64: &[u8; 4usize] = b"lli\0"; +pub const PRIoLEAST64: &[u8; 4usize] = b"llo\0"; +pub const PRIuLEAST64: &[u8; 4usize] = b"llu\0"; +pub const PRIxLEAST64: &[u8; 4usize] = b"llx\0"; +pub const PRIXLEAST64: &[u8; 4usize] = b"llX\0"; +pub const PRIdFAST8: &[u8; 4usize] = b"hhd\0"; +pub const PRIiFAST8: &[u8; 4usize] = b"hhi\0"; +pub const PRIoFAST8: &[u8; 4usize] = b"hho\0"; +pub const PRIuFAST8: &[u8; 4usize] = b"hhu\0"; +pub const PRIxFAST8: &[u8; 4usize] = b"hhx\0"; +pub const PRIXFAST8: &[u8; 4usize] = b"hhX\0"; +pub const PRIdFAST16: &[u8; 3usize] = b"hd\0"; +pub const PRIiFAST16: &[u8; 3usize] = b"hi\0"; +pub const PRIoFAST16: &[u8; 3usize] = b"ho\0"; +pub const PRIuFAST16: &[u8; 3usize] = b"hu\0"; +pub const PRIxFAST16: &[u8; 3usize] = b"hx\0"; +pub const PRIXFAST16: &[u8; 3usize] = b"hX\0"; +pub const PRIdFAST32: &[u8; 2usize] = b"d\0"; +pub const PRIiFAST32: &[u8; 2usize] = b"i\0"; +pub const PRIoFAST32: &[u8; 2usize] = b"o\0"; +pub const PRIuFAST32: &[u8; 2usize] = b"u\0"; +pub const PRIxFAST32: &[u8; 2usize] = b"x\0"; +pub const PRIXFAST32: &[u8; 2usize] = b"X\0"; +pub const PRIdFAST64: &[u8; 4usize] = b"lld\0"; +pub const PRIiFAST64: &[u8; 4usize] = b"lli\0"; +pub const PRIoFAST64: &[u8; 4usize] = b"llo\0"; +pub const PRIuFAST64: &[u8; 4usize] = b"llu\0"; +pub const PRIxFAST64: &[u8; 4usize] = b"llx\0"; +pub const PRIXFAST64: &[u8; 4usize] = b"llX\0"; +pub const PRIdPTR: &[u8; 3usize] = b"ld\0"; +pub const PRIiPTR: &[u8; 3usize] = b"li\0"; +pub const PRIoPTR: &[u8; 3usize] = b"lo\0"; +pub const PRIuPTR: &[u8; 3usize] = b"lu\0"; +pub const PRIxPTR: &[u8; 3usize] = b"lx\0"; +pub const PRIXPTR: &[u8; 3usize] = b"lX\0"; +pub const PRIdMAX: &[u8; 3usize] = b"jd\0"; +pub const PRIiMAX: &[u8; 3usize] = b"ji\0"; +pub const PRIoMAX: &[u8; 3usize] = b"jo\0"; +pub const PRIuMAX: &[u8; 3usize] = b"ju\0"; +pub const PRIxMAX: &[u8; 3usize] = b"jx\0"; +pub const PRIXMAX: &[u8; 3usize] = b"jX\0"; +pub const SCNd8: &[u8; 4usize] = b"hhd\0"; +pub const SCNi8: &[u8; 4usize] = b"hhi\0"; +pub const SCNo8: &[u8; 4usize] = b"hho\0"; +pub const SCNu8: &[u8; 4usize] = b"hhu\0"; +pub const SCNx8: &[u8; 4usize] = b"hhx\0"; +pub const SCNd16: &[u8; 3usize] = b"hd\0"; +pub const SCNi16: &[u8; 3usize] = b"hi\0"; +pub const SCNo16: &[u8; 3usize] = b"ho\0"; +pub const SCNu16: &[u8; 3usize] = b"hu\0"; +pub const SCNx16: &[u8; 3usize] = b"hx\0"; +pub const SCNd32: &[u8; 2usize] = b"d\0"; +pub const SCNi32: &[u8; 2usize] = b"i\0"; +pub const SCNo32: &[u8; 2usize] = b"o\0"; +pub const SCNu32: &[u8; 2usize] = b"u\0"; +pub const SCNx32: &[u8; 2usize] = b"x\0"; +pub const SCNd64: &[u8; 4usize] = b"lld\0"; +pub const SCNi64: &[u8; 4usize] = b"lli\0"; +pub const SCNo64: &[u8; 4usize] = b"llo\0"; +pub const SCNu64: &[u8; 4usize] = b"llu\0"; +pub const SCNx64: &[u8; 4usize] = b"llx\0"; +pub const SCNdLEAST8: &[u8; 4usize] = b"hhd\0"; +pub const SCNiLEAST8: &[u8; 4usize] = b"hhi\0"; +pub const SCNoLEAST8: &[u8; 4usize] = b"hho\0"; +pub const SCNuLEAST8: &[u8; 4usize] = b"hhu\0"; +pub const SCNxLEAST8: &[u8; 4usize] = b"hhx\0"; +pub const SCNdLEAST16: &[u8; 3usize] = b"hd\0"; +pub const SCNiLEAST16: &[u8; 3usize] = b"hi\0"; +pub const SCNoLEAST16: &[u8; 3usize] = b"ho\0"; +pub const SCNuLEAST16: &[u8; 3usize] = b"hu\0"; +pub const SCNxLEAST16: &[u8; 3usize] = b"hx\0"; +pub const SCNdLEAST32: &[u8; 2usize] = b"d\0"; +pub const SCNiLEAST32: &[u8; 2usize] = b"i\0"; +pub const SCNoLEAST32: &[u8; 2usize] = b"o\0"; +pub const SCNuLEAST32: &[u8; 2usize] = b"u\0"; +pub const SCNxLEAST32: &[u8; 2usize] = b"x\0"; +pub const SCNdLEAST64: &[u8; 4usize] = b"lld\0"; +pub const SCNiLEAST64: &[u8; 4usize] = b"lli\0"; +pub const SCNoLEAST64: &[u8; 4usize] = b"llo\0"; +pub const SCNuLEAST64: &[u8; 4usize] = b"llu\0"; +pub const SCNxLEAST64: &[u8; 4usize] = b"llx\0"; +pub const SCNdFAST8: &[u8; 4usize] = b"hhd\0"; +pub const SCNiFAST8: &[u8; 4usize] = b"hhi\0"; +pub const SCNoFAST8: &[u8; 4usize] = b"hho\0"; +pub const SCNuFAST8: &[u8; 4usize] = b"hhu\0"; +pub const SCNxFAST8: &[u8; 4usize] = b"hhx\0"; +pub const SCNdFAST16: &[u8; 3usize] = b"hd\0"; +pub const SCNiFAST16: &[u8; 3usize] = b"hi\0"; +pub const SCNoFAST16: &[u8; 3usize] = b"ho\0"; +pub const SCNuFAST16: &[u8; 3usize] = b"hu\0"; +pub const SCNxFAST16: &[u8; 3usize] = b"hx\0"; +pub const SCNdFAST32: &[u8; 2usize] = b"d\0"; +pub const SCNiFAST32: &[u8; 2usize] = b"i\0"; +pub const SCNoFAST32: &[u8; 2usize] = b"o\0"; +pub const SCNuFAST32: &[u8; 2usize] = b"u\0"; +pub const SCNxFAST32: &[u8; 2usize] = b"x\0"; +pub const SCNdFAST64: &[u8; 4usize] = b"lld\0"; +pub const SCNiFAST64: &[u8; 4usize] = b"lli\0"; +pub const SCNoFAST64: &[u8; 4usize] = b"llo\0"; +pub const SCNuFAST64: &[u8; 4usize] = b"llu\0"; +pub const SCNxFAST64: &[u8; 4usize] = b"llx\0"; +pub const SCNdPTR: &[u8; 3usize] = b"ld\0"; +pub const SCNiPTR: &[u8; 3usize] = b"li\0"; +pub const SCNoPTR: &[u8; 3usize] = b"lo\0"; +pub const SCNuPTR: &[u8; 3usize] = b"lu\0"; +pub const SCNxPTR: &[u8; 3usize] = b"lx\0"; +pub const SCNdMAX: &[u8; 3usize] = b"jd\0"; +pub const SCNiMAX: &[u8; 3usize] = b"ji\0"; +pub const SCNoMAX: &[u8; 3usize] = b"jo\0"; +pub const SCNuMAX: &[u8; 3usize] = b"ju\0"; +pub const SCNxMAX: &[u8; 3usize] = b"jx\0"; pub const __API_TO_BE_DEPRECATED: u32 = 100000; +pub const __API_TO_BE_DEPRECATED_MACOS: u32 = 100000; +pub const __API_TO_BE_DEPRECATED_IOS: u32 = 100000; +pub const __API_TO_BE_DEPRECATED_TVOS: u32 = 100000; +pub const __API_TO_BE_DEPRECATED_WATCHOS: u32 = 100000; +pub const __API_TO_BE_DEPRECATED_MACCATALYST: u32 = 100000; +pub const __API_TO_BE_DEPRECATED_DRIVERKIT: u32 = 100000; pub const __MAC_10_0: u32 = 1000; pub const __MAC_10_1: u32 = 1010; pub const __MAC_10_2: u32 = 1020; @@ -473,6 +480,15 @@ pub const __MAC_10_16: u32 = 101600; pub const __MAC_11_0: u32 = 110000; pub const __MAC_11_1: u32 = 110100; pub const __MAC_11_3: u32 = 110300; +pub const __MAC_11_4: u32 = 110400; +pub const __MAC_11_5: u32 = 110500; +pub const __MAC_11_6: u32 = 110600; +pub const __MAC_12_0: u32 = 120000; +pub const __MAC_12_1: u32 = 120100; +pub const __MAC_12_2: u32 = 120200; +pub const __MAC_12_3: u32 = 120300; +pub const __MAC_13_0: u32 = 130000; +pub const __MAC_13_1: u32 = 130100; pub const __IPHONE_2_0: u32 = 20000; pub const __IPHONE_2_1: u32 = 20100; pub const __IPHONE_2_2: u32 = 20200; @@ -525,6 +541,17 @@ pub const __IPHONE_14_1: u32 = 140100; pub const __IPHONE_14_2: u32 = 140200; pub const __IPHONE_14_3: u32 = 140300; pub const __IPHONE_14_5: u32 = 140500; +pub const __IPHONE_14_6: u32 = 140600; +pub const __IPHONE_14_7: u32 = 140700; +pub const __IPHONE_14_8: u32 = 140800; +pub const __IPHONE_15_0: u32 = 150000; +pub const __IPHONE_15_1: u32 = 150100; +pub const __IPHONE_15_2: u32 = 150200; +pub const __IPHONE_15_3: u32 = 150300; +pub const __IPHONE_15_4: u32 = 150400; +pub const __IPHONE_16_0: u32 = 160000; +pub const __IPHONE_16_1: u32 = 160100; +pub const __IPHONE_16_2: u32 = 160200; pub const __TVOS_9_0: u32 = 90000; pub const __TVOS_9_1: u32 = 90100; pub const __TVOS_9_2: u32 = 90200; @@ -551,6 +578,16 @@ pub const __TVOS_14_1: u32 = 140100; pub const __TVOS_14_2: u32 = 140200; pub const __TVOS_14_3: u32 = 140300; pub const __TVOS_14_5: u32 = 140500; +pub const __TVOS_14_6: u32 = 140600; +pub const __TVOS_14_7: u32 = 140700; +pub const __TVOS_15_0: u32 = 150000; +pub const __TVOS_15_1: u32 = 150100; +pub const __TVOS_15_2: u32 = 150200; +pub const __TVOS_15_3: u32 = 150300; +pub const __TVOS_15_4: u32 = 150400; +pub const __TVOS_16_0: u32 = 160000; +pub const __TVOS_16_1: u32 = 160100; +pub const __TVOS_16_2: u32 = 160200; pub const __WATCHOS_1_0: u32 = 10000; pub const __WATCHOS_2_0: u32 = 20000; pub const __WATCHOS_2_1: u32 = 20100; @@ -575,6 +612,16 @@ pub const __WATCHOS_7_1: u32 = 70100; pub const __WATCHOS_7_2: u32 = 70200; pub const __WATCHOS_7_3: u32 = 70300; pub const __WATCHOS_7_4: u32 = 70400; +pub const __WATCHOS_7_5: u32 = 70500; +pub const __WATCHOS_7_6: u32 = 70600; +pub const __WATCHOS_8_0: u32 = 80000; +pub const __WATCHOS_8_1: u32 = 80100; +pub const __WATCHOS_8_3: u32 = 80300; +pub const __WATCHOS_8_4: u32 = 80400; +pub const __WATCHOS_8_5: u32 = 80500; +pub const __WATCHOS_9_0: u32 = 90000; +pub const __WATCHOS_9_1: u32 = 90100; +pub const __WATCHOS_9_2: u32 = 90200; pub const MAC_OS_X_VERSION_10_0: u32 = 1000; pub const MAC_OS_X_VERSION_10_1: u32 = 1010; pub const MAC_OS_X_VERSION_10_2: u32 = 1020; @@ -608,9 +655,12 @@ pub const MAC_OS_X_VERSION_10_15: u32 = 101500; pub const MAC_OS_X_VERSION_10_15_1: u32 = 101501; pub const MAC_OS_X_VERSION_10_16: u32 = 101600; pub const MAC_OS_VERSION_11_0: u32 = 110000; +pub const MAC_OS_VERSION_12_0: u32 = 120000; +pub const MAC_OS_VERSION_13_0: u32 = 130000; pub const __DRIVERKIT_19_0: u32 = 190000; pub const __DRIVERKIT_20_0: u32 = 200000; -pub const __MAC_OS_X_VERSION_MAX_ALLOWED: u32 = 110300; +pub const __DRIVERKIT_21_0: u32 = 210000; +pub const __MAC_OS_X_VERSION_MAX_ALLOWED: u32 = 130100; pub const __ENABLE_LEGACY_MAC_AVAILABILITY: u32 = 1; pub const __DARWIN_WCHAR_MIN: i32 = -2147483648; pub const _FORTIFY_SOURCE: u32 = 2; @@ -748,7 +798,8 @@ pub const RUSAGE_INFO_V2: u32 = 2; pub const RUSAGE_INFO_V3: u32 = 3; pub const RUSAGE_INFO_V4: u32 = 4; pub const RUSAGE_INFO_V5: u32 = 5; -pub const RUSAGE_INFO_CURRENT: u32 = 5; +pub const RUSAGE_INFO_V6: u32 = 6; +pub const RUSAGE_INFO_CURRENT: u32 = 6; pub const RU_PROC_RUNS_RESLIDE: u32 = 1; pub const RLIMIT_CPU: u32 = 0; pub const RLIMIT_FSIZE: u32 = 1; @@ -781,6 +832,8 @@ pub const IOPOL_TYPE_VFS_TRIGGER_RESOLVE: u32 = 5; pub const IOPOL_TYPE_VFS_IGNORE_CONTENT_PROTECTION: u32 = 6; pub const IOPOL_TYPE_VFS_IGNORE_PERMISSIONS: u32 = 7; pub const IOPOL_TYPE_VFS_SKIP_MTIME_UPDATE: u32 = 8; +pub const IOPOL_TYPE_VFS_ALLOW_LOW_SPACE_WRITES: u32 = 9; +pub const IOPOL_TYPE_VFS_DISALLOW_RW_FOR_O_EVTONLY: u32 = 10; pub const IOPOL_SCOPE_PROCESS: u32 = 0; pub const IOPOL_SCOPE_THREAD: u32 = 1; pub const IOPOL_SCOPE_DARWIN_BG: u32 = 2; @@ -807,6 +860,10 @@ pub const IOPOL_VFS_IGNORE_PERMISSIONS_OFF: u32 = 0; pub const IOPOL_VFS_IGNORE_PERMISSIONS_ON: u32 = 1; pub const IOPOL_VFS_SKIP_MTIME_UPDATE_OFF: u32 = 0; pub const IOPOL_VFS_SKIP_MTIME_UPDATE_ON: u32 = 1; +pub const IOPOL_VFS_ALLOW_LOW_SPACE_WRITES_OFF: u32 = 0; +pub const IOPOL_VFS_ALLOW_LOW_SPACE_WRITES_ON: u32 = 1; +pub const IOPOL_VFS_DISALLOW_RW_FOR_O_EVTONLY_DEFAULT: u32 = 0; +pub const IOPOL_VFS_DISALLOW_RW_FOR_O_EVTONLY_ON: u32 = 1; pub const WNOHANG: u32 = 1; pub const WUNTRACED: u32 = 2; pub const WCOREFLAG: u32 = 128; @@ -865,6 +922,8 @@ pub union __mbstate_t { } #[test] fn bindgen_test_layout___mbstate_t() { + const UNINIT: ::std::mem::MaybeUninit<__mbstate_t> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<__mbstate_t>(), 128usize, @@ -876,7 +935,7 @@ fn bindgen_test_layout___mbstate_t() { concat!("Alignment of ", stringify!(__mbstate_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__mbstate_t>())).__mbstate8 as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).__mbstate8) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -886,7 +945,7 @@ fn bindgen_test_layout___mbstate_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__mbstate_t>()))._mbstateL as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr)._mbstateL) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -945,6 +1004,9 @@ pub struct __darwin_pthread_handler_rec { } #[test] fn bindgen_test_layout___darwin_pthread_handler_rec() { + const UNINIT: ::std::mem::MaybeUninit<__darwin_pthread_handler_rec> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<__darwin_pthread_handler_rec>(), 24usize, @@ -956,9 +1018,7 @@ fn bindgen_test_layout___darwin_pthread_handler_rec() { concat!("Alignment of ", stringify!(__darwin_pthread_handler_rec)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_pthread_handler_rec>())).__routine as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__routine) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -968,9 +1028,7 @@ fn bindgen_test_layout___darwin_pthread_handler_rec() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_pthread_handler_rec>())).__arg as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__arg) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -980,9 +1038,7 @@ fn bindgen_test_layout___darwin_pthread_handler_rec() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_pthread_handler_rec>())).__next as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__next) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -1009,6 +1065,9 @@ pub struct _opaque_pthread_attr_t { } #[test] fn bindgen_test_layout__opaque_pthread_attr_t() { + const UNINIT: ::std::mem::MaybeUninit<_opaque_pthread_attr_t> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_opaque_pthread_attr_t>(), 64usize, @@ -1020,7 +1079,7 @@ fn bindgen_test_layout__opaque_pthread_attr_t() { concat!("Alignment of ", stringify!(_opaque_pthread_attr_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_opaque_pthread_attr_t>())).__sig as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).__sig) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1030,7 +1089,7 @@ fn bindgen_test_layout__opaque_pthread_attr_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_opaque_pthread_attr_t>())).__opaque as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).__opaque) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -1057,6 +1116,9 @@ pub struct _opaque_pthread_cond_t { } #[test] fn bindgen_test_layout__opaque_pthread_cond_t() { + const UNINIT: ::std::mem::MaybeUninit<_opaque_pthread_cond_t> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_opaque_pthread_cond_t>(), 48usize, @@ -1068,7 +1130,7 @@ fn bindgen_test_layout__opaque_pthread_cond_t() { concat!("Alignment of ", stringify!(_opaque_pthread_cond_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_opaque_pthread_cond_t>())).__sig as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).__sig) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1078,7 +1140,7 @@ fn bindgen_test_layout__opaque_pthread_cond_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_opaque_pthread_cond_t>())).__opaque as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).__opaque) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -1105,6 +1167,9 @@ pub struct _opaque_pthread_condattr_t { } #[test] fn bindgen_test_layout__opaque_pthread_condattr_t() { + const UNINIT: ::std::mem::MaybeUninit<_opaque_pthread_condattr_t> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_opaque_pthread_condattr_t>(), 16usize, @@ -1116,9 +1181,7 @@ fn bindgen_test_layout__opaque_pthread_condattr_t() { concat!("Alignment of ", stringify!(_opaque_pthread_condattr_t)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_opaque_pthread_condattr_t>())).__sig as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__sig) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1128,9 +1191,7 @@ fn bindgen_test_layout__opaque_pthread_condattr_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_opaque_pthread_condattr_t>())).__opaque as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__opaque) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -1148,6 +1209,9 @@ pub struct _opaque_pthread_mutex_t { } #[test] fn bindgen_test_layout__opaque_pthread_mutex_t() { + const UNINIT: ::std::mem::MaybeUninit<_opaque_pthread_mutex_t> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_opaque_pthread_mutex_t>(), 64usize, @@ -1159,7 +1223,7 @@ fn bindgen_test_layout__opaque_pthread_mutex_t() { concat!("Alignment of ", stringify!(_opaque_pthread_mutex_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_opaque_pthread_mutex_t>())).__sig as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).__sig) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1169,9 +1233,7 @@ fn bindgen_test_layout__opaque_pthread_mutex_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_opaque_pthread_mutex_t>())).__opaque as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__opaque) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -1198,6 +1260,9 @@ pub struct _opaque_pthread_mutexattr_t { } #[test] fn bindgen_test_layout__opaque_pthread_mutexattr_t() { + const UNINIT: ::std::mem::MaybeUninit<_opaque_pthread_mutexattr_t> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_opaque_pthread_mutexattr_t>(), 16usize, @@ -1209,9 +1274,7 @@ fn bindgen_test_layout__opaque_pthread_mutexattr_t() { concat!("Alignment of ", stringify!(_opaque_pthread_mutexattr_t)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_opaque_pthread_mutexattr_t>())).__sig as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__sig) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1221,9 +1284,7 @@ fn bindgen_test_layout__opaque_pthread_mutexattr_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_opaque_pthread_mutexattr_t>())).__opaque as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__opaque) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -1241,6 +1302,9 @@ pub struct _opaque_pthread_once_t { } #[test] fn bindgen_test_layout__opaque_pthread_once_t() { + const UNINIT: ::std::mem::MaybeUninit<_opaque_pthread_once_t> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_opaque_pthread_once_t>(), 16usize, @@ -1252,7 +1316,7 @@ fn bindgen_test_layout__opaque_pthread_once_t() { concat!("Alignment of ", stringify!(_opaque_pthread_once_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_opaque_pthread_once_t>())).__sig as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).__sig) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1262,7 +1326,7 @@ fn bindgen_test_layout__opaque_pthread_once_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_opaque_pthread_once_t>())).__opaque as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).__opaque) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -1280,6 +1344,9 @@ pub struct _opaque_pthread_rwlock_t { } #[test] fn bindgen_test_layout__opaque_pthread_rwlock_t() { + const UNINIT: ::std::mem::MaybeUninit<_opaque_pthread_rwlock_t> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_opaque_pthread_rwlock_t>(), 200usize, @@ -1291,7 +1358,7 @@ fn bindgen_test_layout__opaque_pthread_rwlock_t() { concat!("Alignment of ", stringify!(_opaque_pthread_rwlock_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_opaque_pthread_rwlock_t>())).__sig as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).__sig) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1301,9 +1368,7 @@ fn bindgen_test_layout__opaque_pthread_rwlock_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_opaque_pthread_rwlock_t>())).__opaque as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__opaque) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -1330,6 +1395,9 @@ pub struct _opaque_pthread_rwlockattr_t { } #[test] fn bindgen_test_layout__opaque_pthread_rwlockattr_t() { + const UNINIT: ::std::mem::MaybeUninit<_opaque_pthread_rwlockattr_t> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_opaque_pthread_rwlockattr_t>(), 24usize, @@ -1341,9 +1409,7 @@ fn bindgen_test_layout__opaque_pthread_rwlockattr_t() { concat!("Alignment of ", stringify!(_opaque_pthread_rwlockattr_t)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_opaque_pthread_rwlockattr_t>())).__sig as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__sig) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1353,9 +1419,7 @@ fn bindgen_test_layout__opaque_pthread_rwlockattr_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_opaque_pthread_rwlockattr_t>())).__opaque as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__opaque) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -1374,6 +1438,8 @@ pub struct _opaque_pthread_t { } #[test] fn bindgen_test_layout__opaque_pthread_t() { + const UNINIT: ::std::mem::MaybeUninit<_opaque_pthread_t> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_opaque_pthread_t>(), 8192usize, @@ -1385,7 +1451,7 @@ fn bindgen_test_layout__opaque_pthread_t() { concat!("Alignment of ", stringify!(_opaque_pthread_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_opaque_pthread_t>())).__sig as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).__sig) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1395,9 +1461,7 @@ fn bindgen_test_layout__opaque_pthread_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_opaque_pthread_t>())).__cleanup_stack as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__cleanup_stack) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -1407,7 +1471,7 @@ fn bindgen_test_layout__opaque_pthread_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_opaque_pthread_t>())).__opaque as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).__opaque) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -1474,6 +1538,8 @@ pub struct TSS2_ABI_VERSION { } #[test] fn bindgen_test_layout_TSS2_ABI_VERSION() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 16usize, @@ -1485,7 +1551,7 @@ fn bindgen_test_layout_TSS2_ABI_VERSION() { concat!("Alignment of ", stringify!(TSS2_ABI_VERSION)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).tssCreator as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).tssCreator) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1495,7 +1561,7 @@ fn bindgen_test_layout_TSS2_ABI_VERSION() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).tssFamily as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).tssFamily) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -1505,7 +1571,7 @@ fn bindgen_test_layout_TSS2_ABI_VERSION() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).tssLevel as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).tssLevel) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -1515,7 +1581,7 @@ fn bindgen_test_layout_TSS2_ABI_VERSION() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).tssVersion as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).tssVersion) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -1596,6 +1662,8 @@ pub struct TPMS_EMPTY { } #[test] fn bindgen_test_layout_TPMS_EMPTY() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 1usize, @@ -1607,7 +1675,7 @@ fn bindgen_test_layout_TPMS_EMPTY() { concat!("Alignment of ", stringify!(TPMS_EMPTY)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).empty as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).empty) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1625,6 +1693,9 @@ pub struct TPMS_ALGORITHM_DESCRIPTION { } #[test] fn bindgen_test_layout_TPMS_ALGORITHM_DESCRIPTION() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, @@ -1636,7 +1707,7 @@ fn bindgen_test_layout_TPMS_ALGORITHM_DESCRIPTION() { concat!("Alignment of ", stringify!(TPMS_ALGORITHM_DESCRIPTION)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).alg as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).alg) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1646,9 +1717,7 @@ fn bindgen_test_layout_TPMS_ALGORITHM_DESCRIPTION() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).attributes as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).attributes) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -1669,6 +1738,8 @@ pub union TPMU_HA { } #[test] fn bindgen_test_layout_TPMU_HA() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 64usize, @@ -1680,7 +1751,7 @@ fn bindgen_test_layout_TPMU_HA() { concat!("Alignment of ", stringify!(TPMU_HA)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).sha1 as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).sha1) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1690,7 +1761,7 @@ fn bindgen_test_layout_TPMU_HA() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).sha256 as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).sha256) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1700,7 +1771,7 @@ fn bindgen_test_layout_TPMU_HA() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).sha384 as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).sha384) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1710,7 +1781,7 @@ fn bindgen_test_layout_TPMU_HA() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).sha512 as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).sha512) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1720,7 +1791,7 @@ fn bindgen_test_layout_TPMU_HA() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).sm3_256 as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).sm3_256) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1747,6 +1818,8 @@ pub struct TPMT_HA { } #[test] fn bindgen_test_layout_TPMT_HA() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 66usize, @@ -1758,7 +1831,7 @@ fn bindgen_test_layout_TPMT_HA() { concat!("Alignment of ", stringify!(TPMT_HA)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).hashAlg as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).hashAlg) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1768,7 +1841,7 @@ fn bindgen_test_layout_TPMT_HA() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).digest as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).digest) as usize - ptr as usize }, 2usize, concat!( "Offset of field: ", @@ -1795,6 +1868,8 @@ pub struct TPM2B_DIGEST { } #[test] fn bindgen_test_layout_TPM2B_DIGEST() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 66usize, @@ -1806,7 +1881,7 @@ fn bindgen_test_layout_TPM2B_DIGEST() { concat!("Alignment of ", stringify!(TPM2B_DIGEST)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).size as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1816,7 +1891,7 @@ fn bindgen_test_layout_TPM2B_DIGEST() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).buffer as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 2usize, concat!( "Offset of field: ", @@ -1843,6 +1918,8 @@ pub struct TPM2B_DATA { } #[test] fn bindgen_test_layout_TPM2B_DATA() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 66usize, @@ -1854,7 +1931,7 @@ fn bindgen_test_layout_TPM2B_DATA() { concat!("Alignment of ", stringify!(TPM2B_DATA)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).size as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1864,7 +1941,7 @@ fn bindgen_test_layout_TPM2B_DATA() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).buffer as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 2usize, concat!( "Offset of field: ", @@ -1894,6 +1971,8 @@ pub struct TPM2B_EVENT { } #[test] fn bindgen_test_layout_TPM2B_EVENT() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 1026usize, @@ -1905,7 +1984,7 @@ fn bindgen_test_layout_TPM2B_EVENT() { concat!("Alignment of ", stringify!(TPM2B_EVENT)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).size as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1915,7 +1994,7 @@ fn bindgen_test_layout_TPM2B_EVENT() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).buffer as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 2usize, concat!( "Offset of field: ", @@ -1942,6 +2021,8 @@ pub struct TPM2B_MAX_BUFFER { } #[test] fn bindgen_test_layout_TPM2B_MAX_BUFFER() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 1026usize, @@ -1953,7 +2034,7 @@ fn bindgen_test_layout_TPM2B_MAX_BUFFER() { concat!("Alignment of ", stringify!(TPM2B_MAX_BUFFER)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).size as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1963,7 +2044,7 @@ fn bindgen_test_layout_TPM2B_MAX_BUFFER() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).buffer as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 2usize, concat!( "Offset of field: ", @@ -1990,6 +2071,8 @@ pub struct TPM2B_MAX_NV_BUFFER { } #[test] fn bindgen_test_layout_TPM2B_MAX_NV_BUFFER() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 2050usize, @@ -2001,7 +2084,7 @@ fn bindgen_test_layout_TPM2B_MAX_NV_BUFFER() { concat!("Alignment of ", stringify!(TPM2B_MAX_NV_BUFFER)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).size as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2011,7 +2094,7 @@ fn bindgen_test_layout_TPM2B_MAX_NV_BUFFER() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).buffer as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 2usize, concat!( "Offset of field: ", @@ -2039,6 +2122,8 @@ pub struct TPM2B_IV { } #[test] fn bindgen_test_layout_TPM2B_IV() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 18usize, @@ -2050,7 +2135,7 @@ fn bindgen_test_layout_TPM2B_IV() { concat!("Alignment of ", stringify!(TPM2B_IV)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).size as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2060,7 +2145,7 @@ fn bindgen_test_layout_TPM2B_IV() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).buffer as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 2usize, concat!( "Offset of field: ", @@ -2078,6 +2163,8 @@ pub union TPMU_NAME { } #[test] fn bindgen_test_layout_TPMU_NAME() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 68usize, @@ -2089,7 +2176,7 @@ fn bindgen_test_layout_TPMU_NAME() { concat!("Alignment of ", stringify!(TPMU_NAME)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).digest as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).digest) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2099,7 +2186,7 @@ fn bindgen_test_layout_TPMU_NAME() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).handle as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).handle) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2126,6 +2213,8 @@ pub struct TPM2B_NAME { } #[test] fn bindgen_test_layout_TPM2B_NAME() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 70usize, @@ -2137,7 +2226,7 @@ fn bindgen_test_layout_TPM2B_NAME() { concat!("Alignment of ", stringify!(TPM2B_NAME)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).size as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2147,7 +2236,7 @@ fn bindgen_test_layout_TPM2B_NAME() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).name as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 2usize, concat!( "Offset of field: ", @@ -2174,6 +2263,8 @@ pub struct TPMS_PCR_SELECT { } #[test] fn bindgen_test_layout_TPMS_PCR_SELECT() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 5usize, @@ -2185,7 +2276,7 @@ fn bindgen_test_layout_TPMS_PCR_SELECT() { concat!("Alignment of ", stringify!(TPMS_PCR_SELECT)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).sizeofSelect as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).sizeofSelect) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2195,7 +2286,7 @@ fn bindgen_test_layout_TPMS_PCR_SELECT() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).pcrSelect as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).pcrSelect) as usize - ptr as usize }, 1usize, concat!( "Offset of field: ", @@ -2214,6 +2305,8 @@ pub struct TPMS_PCR_SELECTION { } #[test] fn bindgen_test_layout_TPMS_PCR_SELECTION() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, @@ -2225,7 +2318,7 @@ fn bindgen_test_layout_TPMS_PCR_SELECTION() { concat!("Alignment of ", stringify!(TPMS_PCR_SELECTION)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).hash as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).hash) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2235,7 +2328,7 @@ fn bindgen_test_layout_TPMS_PCR_SELECTION() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).sizeofSelect as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).sizeofSelect) as usize - ptr as usize }, 2usize, concat!( "Offset of field: ", @@ -2245,7 +2338,7 @@ fn bindgen_test_layout_TPMS_PCR_SELECTION() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).pcrSelect as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).pcrSelect) as usize - ptr as usize }, 3usize, concat!( "Offset of field: ", @@ -2264,6 +2357,8 @@ pub struct TPMT_TK_CREATION { } #[test] fn bindgen_test_layout_TPMT_TK_CREATION() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 76usize, @@ -2275,7 +2370,7 @@ fn bindgen_test_layout_TPMT_TK_CREATION() { concat!("Alignment of ", stringify!(TPMT_TK_CREATION)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).tag as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).tag) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2285,7 +2380,7 @@ fn bindgen_test_layout_TPMT_TK_CREATION() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).hierarchy as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).hierarchy) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -2295,7 +2390,7 @@ fn bindgen_test_layout_TPMT_TK_CREATION() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).digest as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).digest) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -2323,6 +2418,8 @@ pub struct TPMT_TK_VERIFIED { } #[test] fn bindgen_test_layout_TPMT_TK_VERIFIED() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 76usize, @@ -2334,7 +2431,7 @@ fn bindgen_test_layout_TPMT_TK_VERIFIED() { concat!("Alignment of ", stringify!(TPMT_TK_VERIFIED)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).tag as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).tag) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2344,7 +2441,7 @@ fn bindgen_test_layout_TPMT_TK_VERIFIED() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).hierarchy as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).hierarchy) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -2354,7 +2451,7 @@ fn bindgen_test_layout_TPMT_TK_VERIFIED() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).digest as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).digest) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -2382,6 +2479,8 @@ pub struct TPMT_TK_AUTH { } #[test] fn bindgen_test_layout_TPMT_TK_AUTH() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 76usize, @@ -2393,7 +2492,7 @@ fn bindgen_test_layout_TPMT_TK_AUTH() { concat!("Alignment of ", stringify!(TPMT_TK_AUTH)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).tag as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).tag) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2403,7 +2502,7 @@ fn bindgen_test_layout_TPMT_TK_AUTH() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).hierarchy as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).hierarchy) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -2413,7 +2512,7 @@ fn bindgen_test_layout_TPMT_TK_AUTH() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).digest as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).digest) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -2441,6 +2540,8 @@ pub struct TPMT_TK_HASHCHECK { } #[test] fn bindgen_test_layout_TPMT_TK_HASHCHECK() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 76usize, @@ -2452,7 +2553,7 @@ fn bindgen_test_layout_TPMT_TK_HASHCHECK() { concat!("Alignment of ", stringify!(TPMT_TK_HASHCHECK)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).tag as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).tag) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2462,7 +2563,7 @@ fn bindgen_test_layout_TPMT_TK_HASHCHECK() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).hierarchy as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).hierarchy) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -2472,7 +2573,7 @@ fn bindgen_test_layout_TPMT_TK_HASHCHECK() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).digest as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).digest) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -2499,6 +2600,8 @@ pub struct TPMS_ALG_PROPERTY { } #[test] fn bindgen_test_layout_TPMS_ALG_PROPERTY() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, @@ -2510,7 +2613,7 @@ fn bindgen_test_layout_TPMS_ALG_PROPERTY() { concat!("Alignment of ", stringify!(TPMS_ALG_PROPERTY)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).alg as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).alg) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2520,7 +2623,7 @@ fn bindgen_test_layout_TPMS_ALG_PROPERTY() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).algProperties as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).algProperties) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -2538,6 +2641,8 @@ pub struct TPMS_TAGGED_PROPERTY { } #[test] fn bindgen_test_layout_TPMS_TAGGED_PROPERTY() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, @@ -2549,7 +2654,7 @@ fn bindgen_test_layout_TPMS_TAGGED_PROPERTY() { concat!("Alignment of ", stringify!(TPMS_TAGGED_PROPERTY)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).property as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).property) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2559,7 +2664,7 @@ fn bindgen_test_layout_TPMS_TAGGED_PROPERTY() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).value as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -2578,6 +2683,9 @@ pub struct TPMS_TAGGED_PCR_SELECT { } #[test] fn bindgen_test_layout_TPMS_TAGGED_PCR_SELECT() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 12usize, @@ -2589,7 +2697,7 @@ fn bindgen_test_layout_TPMS_TAGGED_PCR_SELECT() { concat!("Alignment of ", stringify!(TPMS_TAGGED_PCR_SELECT)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).tag as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).tag) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2599,9 +2707,7 @@ fn bindgen_test_layout_TPMS_TAGGED_PCR_SELECT() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).sizeofSelect as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).sizeofSelect) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -2611,9 +2717,7 @@ fn bindgen_test_layout_TPMS_TAGGED_PCR_SELECT() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pcrSelect as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).pcrSelect) as usize - ptr as usize }, 5usize, concat!( "Offset of field: ", @@ -2631,6 +2735,8 @@ pub struct TPMS_TAGGED_POLICY { } #[test] fn bindgen_test_layout_TPMS_TAGGED_POLICY() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 72usize, @@ -2642,7 +2748,7 @@ fn bindgen_test_layout_TPMS_TAGGED_POLICY() { concat!("Alignment of ", stringify!(TPMS_TAGGED_POLICY)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).handle as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).handle) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2652,7 +2758,7 @@ fn bindgen_test_layout_TPMS_TAGGED_POLICY() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).policyHash as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).policyHash) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -2679,6 +2785,8 @@ pub struct TPML_CC { } #[test] fn bindgen_test_layout_TPML_CC() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 1028usize, @@ -2690,7 +2798,7 @@ fn bindgen_test_layout_TPML_CC() { concat!("Alignment of ", stringify!(TPML_CC)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).count as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2700,7 +2808,7 @@ fn bindgen_test_layout_TPML_CC() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).commandCodes as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).commandCodes) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -2727,6 +2835,8 @@ pub struct TPML_CCA { } #[test] fn bindgen_test_layout_TPML_CCA() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 1028usize, @@ -2738,7 +2848,7 @@ fn bindgen_test_layout_TPML_CCA() { concat!("Alignment of ", stringify!(TPML_CCA)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).count as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2748,7 +2858,7 @@ fn bindgen_test_layout_TPML_CCA() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).commandAttributes as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).commandAttributes) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -2775,6 +2885,8 @@ pub struct TPML_ALG { } #[test] fn bindgen_test_layout_TPML_ALG() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 260usize, @@ -2786,7 +2898,7 @@ fn bindgen_test_layout_TPML_ALG() { concat!("Alignment of ", stringify!(TPML_ALG)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).count as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2796,7 +2908,7 @@ fn bindgen_test_layout_TPML_ALG() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).algorithms as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).algorithms) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -2823,6 +2935,8 @@ pub struct TPML_HANDLE { } #[test] fn bindgen_test_layout_TPML_HANDLE() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 1020usize, @@ -2834,7 +2948,7 @@ fn bindgen_test_layout_TPML_HANDLE() { concat!("Alignment of ", stringify!(TPML_HANDLE)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).count as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2844,7 +2958,7 @@ fn bindgen_test_layout_TPML_HANDLE() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).handle as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).handle) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -2871,6 +2985,8 @@ pub struct TPML_DIGEST { } #[test] fn bindgen_test_layout_TPML_DIGEST() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 532usize, @@ -2882,7 +2998,7 @@ fn bindgen_test_layout_TPML_DIGEST() { concat!("Alignment of ", stringify!(TPML_DIGEST)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).count as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2892,7 +3008,7 @@ fn bindgen_test_layout_TPML_DIGEST() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).digests as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).digests) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -2919,6 +3035,8 @@ pub struct TPML_DIGEST_VALUES { } #[test] fn bindgen_test_layout_TPML_DIGEST_VALUES() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 1060usize, @@ -2930,7 +3048,7 @@ fn bindgen_test_layout_TPML_DIGEST_VALUES() { concat!("Alignment of ", stringify!(TPML_DIGEST_VALUES)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).count as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2940,7 +3058,7 @@ fn bindgen_test_layout_TPML_DIGEST_VALUES() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).digests as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).digests) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -2967,6 +3085,8 @@ pub struct TPML_PCR_SELECTION { } #[test] fn bindgen_test_layout_TPML_PCR_SELECTION() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 132usize, @@ -2978,7 +3098,7 @@ fn bindgen_test_layout_TPML_PCR_SELECTION() { concat!("Alignment of ", stringify!(TPML_PCR_SELECTION)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).count as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2988,9 +3108,7 @@ fn bindgen_test_layout_TPML_PCR_SELECTION() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pcrSelections as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).pcrSelections) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -3008,6 +3126,8 @@ pub struct TPML_ALG_PROPERTY { } #[test] fn bindgen_test_layout_TPML_ALG_PROPERTY() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 1020usize, @@ -3019,7 +3139,7 @@ fn bindgen_test_layout_TPML_ALG_PROPERTY() { concat!("Alignment of ", stringify!(TPML_ALG_PROPERTY)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).count as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3029,7 +3149,7 @@ fn bindgen_test_layout_TPML_ALG_PROPERTY() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).algProperties as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).algProperties) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -3056,6 +3176,9 @@ pub struct TPML_TAGGED_TPM_PROPERTY { } #[test] fn bindgen_test_layout_TPML_TAGGED_TPM_PROPERTY() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 1020usize, @@ -3067,7 +3190,7 @@ fn bindgen_test_layout_TPML_TAGGED_TPM_PROPERTY() { concat!("Alignment of ", stringify!(TPML_TAGGED_TPM_PROPERTY)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).count as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3077,9 +3200,7 @@ fn bindgen_test_layout_TPML_TAGGED_TPM_PROPERTY() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).tpmProperty as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).tpmProperty) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -3106,6 +3227,9 @@ pub struct TPML_TAGGED_PCR_PROPERTY { } #[test] fn bindgen_test_layout_TPML_TAGGED_PCR_PROPERTY() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 1012usize, @@ -3117,7 +3241,7 @@ fn bindgen_test_layout_TPML_TAGGED_PCR_PROPERTY() { concat!("Alignment of ", stringify!(TPML_TAGGED_PCR_PROPERTY)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).count as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3127,9 +3251,7 @@ fn bindgen_test_layout_TPML_TAGGED_PCR_PROPERTY() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pcrProperty as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).pcrProperty) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -3156,6 +3278,8 @@ pub struct TPML_ECC_CURVE { } #[test] fn bindgen_test_layout_TPML_ECC_CURVE() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 1020usize, @@ -3167,7 +3291,7 @@ fn bindgen_test_layout_TPML_ECC_CURVE() { concat!("Alignment of ", stringify!(TPML_ECC_CURVE)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).count as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3177,7 +3301,7 @@ fn bindgen_test_layout_TPML_ECC_CURVE() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).eccCurves as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).eccCurves) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -3204,6 +3328,9 @@ pub struct TPML_INTEL_PTT_PROPERTY { } #[test] fn bindgen_test_layout_TPML_INTEL_PTT_PROPERTY() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 1028usize, @@ -3215,7 +3342,7 @@ fn bindgen_test_layout_TPML_INTEL_PTT_PROPERTY() { concat!("Alignment of ", stringify!(TPML_INTEL_PTT_PROPERTY)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).count as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3225,9 +3352,7 @@ fn bindgen_test_layout_TPML_INTEL_PTT_PROPERTY() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).property as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).property) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -3262,6 +3387,8 @@ pub union TPMU_CAPABILITIES { } #[test] fn bindgen_test_layout_TPMU_CAPABILITIES() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 1028usize, @@ -3273,7 +3400,7 @@ fn bindgen_test_layout_TPMU_CAPABILITIES() { concat!("Alignment of ", stringify!(TPMU_CAPABILITIES)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).algorithms as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).algorithms) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3283,7 +3410,7 @@ fn bindgen_test_layout_TPMU_CAPABILITIES() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).handles as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).handles) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3293,7 +3420,7 @@ fn bindgen_test_layout_TPMU_CAPABILITIES() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).command as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).command) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3303,7 +3430,7 @@ fn bindgen_test_layout_TPMU_CAPABILITIES() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ppCommands as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ppCommands) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3313,7 +3440,7 @@ fn bindgen_test_layout_TPMU_CAPABILITIES() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).auditCommands as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).auditCommands) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3323,7 +3450,7 @@ fn bindgen_test_layout_TPMU_CAPABILITIES() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).assignedPCR as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).assignedPCR) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3333,7 +3460,7 @@ fn bindgen_test_layout_TPMU_CAPABILITIES() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).tpmProperties as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).tpmProperties) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3343,7 +3470,7 @@ fn bindgen_test_layout_TPMU_CAPABILITIES() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).pcrProperties as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).pcrProperties) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3353,7 +3480,7 @@ fn bindgen_test_layout_TPMU_CAPABILITIES() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).eccCurves as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).eccCurves) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3363,9 +3490,7 @@ fn bindgen_test_layout_TPMU_CAPABILITIES() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).intelPttProperty as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).intelPttProperty) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3392,6 +3517,8 @@ pub struct TPMS_CAPABILITY_DATA { } #[test] fn bindgen_test_layout_TPMS_CAPABILITY_DATA() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 1032usize, @@ -3403,7 +3530,7 @@ fn bindgen_test_layout_TPMS_CAPABILITY_DATA() { concat!("Alignment of ", stringify!(TPMS_CAPABILITY_DATA)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).capability as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).capability) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3413,7 +3540,7 @@ fn bindgen_test_layout_TPMS_CAPABILITY_DATA() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).data as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -3442,6 +3569,8 @@ pub struct TPMS_CLOCK_INFO { } #[test] fn bindgen_test_layout_TPMS_CLOCK_INFO() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 24usize, @@ -3453,7 +3582,7 @@ fn bindgen_test_layout_TPMS_CLOCK_INFO() { concat!("Alignment of ", stringify!(TPMS_CLOCK_INFO)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).clock as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).clock) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3463,7 +3592,7 @@ fn bindgen_test_layout_TPMS_CLOCK_INFO() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).resetCount as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).resetCount) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -3473,7 +3602,7 @@ fn bindgen_test_layout_TPMS_CLOCK_INFO() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).restartCount as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).restartCount) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -3483,7 +3612,7 @@ fn bindgen_test_layout_TPMS_CLOCK_INFO() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).safe as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).safe) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -3501,6 +3630,8 @@ pub struct TPMS_TIME_INFO { } #[test] fn bindgen_test_layout_TPMS_TIME_INFO() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 32usize, @@ -3512,7 +3643,7 @@ fn bindgen_test_layout_TPMS_TIME_INFO() { concat!("Alignment of ", stringify!(TPMS_TIME_INFO)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).time as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).time) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3522,7 +3653,7 @@ fn bindgen_test_layout_TPMS_TIME_INFO() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).clockInfo as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).clockInfo) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -3540,6 +3671,9 @@ pub struct TPMS_TIME_ATTEST_INFO { } #[test] fn bindgen_test_layout_TPMS_TIME_ATTEST_INFO() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 40usize, @@ -3551,7 +3685,7 @@ fn bindgen_test_layout_TPMS_TIME_ATTEST_INFO() { concat!("Alignment of ", stringify!(TPMS_TIME_ATTEST_INFO)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).time as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).time) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3561,9 +3695,7 @@ fn bindgen_test_layout_TPMS_TIME_ATTEST_INFO() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).firmwareVersion as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).firmwareVersion) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -3581,6 +3713,8 @@ pub struct TPMS_CERTIFY_INFO { } #[test] fn bindgen_test_layout_TPMS_CERTIFY_INFO() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 140usize, @@ -3592,7 +3726,7 @@ fn bindgen_test_layout_TPMS_CERTIFY_INFO() { concat!("Alignment of ", stringify!(TPMS_CERTIFY_INFO)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).name as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3602,7 +3736,7 @@ fn bindgen_test_layout_TPMS_CERTIFY_INFO() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).qualifiedName as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).qualifiedName) as usize - ptr as usize }, 70usize, concat!( "Offset of field: ", @@ -3629,6 +3763,8 @@ pub struct TPMS_QUOTE_INFO { } #[test] fn bindgen_test_layout_TPMS_QUOTE_INFO() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 200usize, @@ -3640,7 +3776,7 @@ fn bindgen_test_layout_TPMS_QUOTE_INFO() { concat!("Alignment of ", stringify!(TPMS_QUOTE_INFO)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).pcrSelect as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).pcrSelect) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3650,7 +3786,7 @@ fn bindgen_test_layout_TPMS_QUOTE_INFO() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).pcrDigest as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).pcrDigest) as usize - ptr as usize }, 132usize, concat!( "Offset of field: ", @@ -3679,6 +3815,9 @@ pub struct TPMS_COMMAND_AUDIT_INFO { } #[test] fn bindgen_test_layout_TPMS_COMMAND_AUDIT_INFO() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 144usize, @@ -3690,9 +3829,7 @@ fn bindgen_test_layout_TPMS_COMMAND_AUDIT_INFO() { concat!("Alignment of ", stringify!(TPMS_COMMAND_AUDIT_INFO)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).auditCounter as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).auditCounter) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3702,9 +3839,7 @@ fn bindgen_test_layout_TPMS_COMMAND_AUDIT_INFO() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).digestAlg as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).digestAlg) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -3714,9 +3849,7 @@ fn bindgen_test_layout_TPMS_COMMAND_AUDIT_INFO() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).auditDigest as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).auditDigest) as usize - ptr as usize }, 10usize, concat!( "Offset of field: ", @@ -3726,9 +3859,7 @@ fn bindgen_test_layout_TPMS_COMMAND_AUDIT_INFO() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).commandDigest as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).commandDigest) as usize - ptr as usize }, 76usize, concat!( "Offset of field: ", @@ -3755,6 +3886,9 @@ pub struct TPMS_SESSION_AUDIT_INFO { } #[test] fn bindgen_test_layout_TPMS_SESSION_AUDIT_INFO() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 68usize, @@ -3766,10 +3900,7 @@ fn bindgen_test_layout_TPMS_SESSION_AUDIT_INFO() { concat!("Alignment of ", stringify!(TPMS_SESSION_AUDIT_INFO)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).exclusiveSession as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).exclusiveSession) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3779,9 +3910,7 @@ fn bindgen_test_layout_TPMS_SESSION_AUDIT_INFO() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).sessionDigest as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).sessionDigest) as usize - ptr as usize }, 2usize, concat!( "Offset of field: ", @@ -3808,6 +3937,8 @@ pub struct TPMS_CREATION_INFO { } #[test] fn bindgen_test_layout_TPMS_CREATION_INFO() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 136usize, @@ -3819,7 +3950,7 @@ fn bindgen_test_layout_TPMS_CREATION_INFO() { concat!("Alignment of ", stringify!(TPMS_CREATION_INFO)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).objectName as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).objectName) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3829,7 +3960,7 @@ fn bindgen_test_layout_TPMS_CREATION_INFO() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).creationHash as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).creationHash) as usize - ptr as usize }, 70usize, concat!( "Offset of field: ", @@ -3857,6 +3988,8 @@ pub struct TPMS_NV_CERTIFY_INFO { } #[test] fn bindgen_test_layout_TPMS_NV_CERTIFY_INFO() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 2122usize, @@ -3868,7 +4001,7 @@ fn bindgen_test_layout_TPMS_NV_CERTIFY_INFO() { concat!("Alignment of ", stringify!(TPMS_NV_CERTIFY_INFO)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).indexName as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).indexName) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3878,7 +4011,7 @@ fn bindgen_test_layout_TPMS_NV_CERTIFY_INFO() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).offset as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).offset) as usize - ptr as usize }, 70usize, concat!( "Offset of field: ", @@ -3888,7 +4021,7 @@ fn bindgen_test_layout_TPMS_NV_CERTIFY_INFO() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).nvContents as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).nvContents) as usize - ptr as usize }, 72usize, concat!( "Offset of field: ", @@ -3921,6 +4054,8 @@ pub union TPMU_ATTEST { } #[test] fn bindgen_test_layout_TPMU_ATTEST() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 2128usize, @@ -3932,7 +4067,7 @@ fn bindgen_test_layout_TPMU_ATTEST() { concat!("Alignment of ", stringify!(TPMU_ATTEST)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).certify as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).certify) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3942,7 +4077,7 @@ fn bindgen_test_layout_TPMU_ATTEST() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).creation as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).creation) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3952,7 +4087,7 @@ fn bindgen_test_layout_TPMU_ATTEST() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).quote as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).quote) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3962,7 +4097,7 @@ fn bindgen_test_layout_TPMU_ATTEST() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).commandAudit as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).commandAudit) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3972,7 +4107,7 @@ fn bindgen_test_layout_TPMU_ATTEST() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).sessionAudit as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).sessionAudit) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3982,7 +4117,7 @@ fn bindgen_test_layout_TPMU_ATTEST() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).time as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).time) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3992,7 +4127,7 @@ fn bindgen_test_layout_TPMU_ATTEST() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).nv as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).nv) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -4024,6 +4159,8 @@ pub struct TPMS_ATTEST { } #[test] fn bindgen_test_layout_TPMS_ATTEST() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 2304usize, @@ -4035,7 +4172,7 @@ fn bindgen_test_layout_TPMS_ATTEST() { concat!("Alignment of ", stringify!(TPMS_ATTEST)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).magic as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).magic) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -4045,7 +4182,7 @@ fn bindgen_test_layout_TPMS_ATTEST() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -4055,7 +4192,7 @@ fn bindgen_test_layout_TPMS_ATTEST() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).qualifiedSigner as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).qualifiedSigner) as usize - ptr as usize }, 6usize, concat!( "Offset of field: ", @@ -4065,7 +4202,7 @@ fn bindgen_test_layout_TPMS_ATTEST() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).extraData as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).extraData) as usize - ptr as usize }, 76usize, concat!( "Offset of field: ", @@ -4075,7 +4212,7 @@ fn bindgen_test_layout_TPMS_ATTEST() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).clockInfo as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).clockInfo) as usize - ptr as usize }, 144usize, concat!( "Offset of field: ", @@ -4085,7 +4222,7 @@ fn bindgen_test_layout_TPMS_ATTEST() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).firmwareVersion as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).firmwareVersion) as usize - ptr as usize }, 168usize, concat!( "Offset of field: ", @@ -4095,7 +4232,7 @@ fn bindgen_test_layout_TPMS_ATTEST() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).attested as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).attested) as usize - ptr as usize }, 176usize, concat!( "Offset of field: ", @@ -4122,6 +4259,8 @@ pub struct TPM2B_ATTEST { } #[test] fn bindgen_test_layout_TPM2B_ATTEST() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 2306usize, @@ -4133,7 +4272,7 @@ fn bindgen_test_layout_TPM2B_ATTEST() { concat!("Alignment of ", stringify!(TPM2B_ATTEST)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).size as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -4143,7 +4282,7 @@ fn bindgen_test_layout_TPM2B_ATTEST() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).attestationData as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).attestationData) as usize - ptr as usize }, 2usize, concat!( "Offset of field: ", @@ -4172,6 +4311,8 @@ pub struct TPMS_AUTH_COMMAND { } #[test] fn bindgen_test_layout_TPMS_AUTH_COMMAND() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 140usize, @@ -4183,7 +4324,7 @@ fn bindgen_test_layout_TPMS_AUTH_COMMAND() { concat!("Alignment of ", stringify!(TPMS_AUTH_COMMAND)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).sessionHandle as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).sessionHandle) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -4193,7 +4334,7 @@ fn bindgen_test_layout_TPMS_AUTH_COMMAND() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).nonce as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).nonce) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -4203,9 +4344,7 @@ fn bindgen_test_layout_TPMS_AUTH_COMMAND() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).sessionAttributes as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).sessionAttributes) as usize - ptr as usize }, 70usize, concat!( "Offset of field: ", @@ -4215,7 +4354,7 @@ fn bindgen_test_layout_TPMS_AUTH_COMMAND() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).hmac as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).hmac) as usize - ptr as usize }, 72usize, concat!( "Offset of field: ", @@ -4243,6 +4382,8 @@ pub struct TPMS_AUTH_RESPONSE { } #[test] fn bindgen_test_layout_TPMS_AUTH_RESPONSE() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 134usize, @@ -4254,7 +4395,7 @@ fn bindgen_test_layout_TPMS_AUTH_RESPONSE() { concat!("Alignment of ", stringify!(TPMS_AUTH_RESPONSE)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).nonce as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).nonce) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -4264,9 +4405,7 @@ fn bindgen_test_layout_TPMS_AUTH_RESPONSE() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).sessionAttributes as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).sessionAttributes) as usize - ptr as usize }, 66usize, concat!( "Offset of field: ", @@ -4276,7 +4415,7 @@ fn bindgen_test_layout_TPMS_AUTH_RESPONSE() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).hmac as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).hmac) as usize - ptr as usize }, 68usize, concat!( "Offset of field: ", @@ -4309,6 +4448,8 @@ pub union TPMU_SYM_KEY_BITS { } #[test] fn bindgen_test_layout_TPMU_SYM_KEY_BITS() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 2usize, @@ -4320,7 +4461,7 @@ fn bindgen_test_layout_TPMU_SYM_KEY_BITS() { concat!("Alignment of ", stringify!(TPMU_SYM_KEY_BITS)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).aes as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).aes) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -4330,7 +4471,7 @@ fn bindgen_test_layout_TPMU_SYM_KEY_BITS() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).sm4 as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).sm4) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -4340,7 +4481,7 @@ fn bindgen_test_layout_TPMU_SYM_KEY_BITS() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).camellia as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).camellia) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -4350,7 +4491,7 @@ fn bindgen_test_layout_TPMU_SYM_KEY_BITS() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).sym as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).sym) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -4360,7 +4501,7 @@ fn bindgen_test_layout_TPMU_SYM_KEY_BITS() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).exclusiveOr as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).exclusiveOr) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -4389,6 +4530,8 @@ pub union TPMU_SYM_MODE { } #[test] fn bindgen_test_layout_TPMU_SYM_MODE() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 2usize, @@ -4400,7 +4543,7 @@ fn bindgen_test_layout_TPMU_SYM_MODE() { concat!("Alignment of ", stringify!(TPMU_SYM_MODE)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).aes as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).aes) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -4410,7 +4553,7 @@ fn bindgen_test_layout_TPMU_SYM_MODE() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).sm4 as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).sm4) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -4420,7 +4563,7 @@ fn bindgen_test_layout_TPMU_SYM_MODE() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).camellia as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).camellia) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -4430,7 +4573,7 @@ fn bindgen_test_layout_TPMU_SYM_MODE() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).sym as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).sym) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -4458,6 +4601,8 @@ pub struct TPMT_SYM_DEF { } #[test] fn bindgen_test_layout_TPMT_SYM_DEF() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 6usize, @@ -4469,7 +4614,7 @@ fn bindgen_test_layout_TPMT_SYM_DEF() { concat!("Alignment of ", stringify!(TPMT_SYM_DEF)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).algorithm as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).algorithm) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -4479,7 +4624,7 @@ fn bindgen_test_layout_TPMT_SYM_DEF() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).keyBits as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).keyBits) as usize - ptr as usize }, 2usize, concat!( "Offset of field: ", @@ -4489,7 +4634,7 @@ fn bindgen_test_layout_TPMT_SYM_DEF() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).mode as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).mode) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -4517,6 +4662,8 @@ pub struct TPMT_SYM_DEF_OBJECT { } #[test] fn bindgen_test_layout_TPMT_SYM_DEF_OBJECT() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 6usize, @@ -4528,7 +4675,7 @@ fn bindgen_test_layout_TPMT_SYM_DEF_OBJECT() { concat!("Alignment of ", stringify!(TPMT_SYM_DEF_OBJECT)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).algorithm as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).algorithm) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -4538,7 +4685,7 @@ fn bindgen_test_layout_TPMT_SYM_DEF_OBJECT() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).keyBits as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).keyBits) as usize - ptr as usize }, 2usize, concat!( "Offset of field: ", @@ -4548,7 +4695,7 @@ fn bindgen_test_layout_TPMT_SYM_DEF_OBJECT() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).mode as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).mode) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -4575,6 +4722,8 @@ pub struct TPM2B_SYM_KEY { } #[test] fn bindgen_test_layout_TPM2B_SYM_KEY() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 34usize, @@ -4586,7 +4735,7 @@ fn bindgen_test_layout_TPM2B_SYM_KEY() { concat!("Alignment of ", stringify!(TPM2B_SYM_KEY)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).size as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -4596,7 +4745,7 @@ fn bindgen_test_layout_TPM2B_SYM_KEY() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).buffer as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 2usize, concat!( "Offset of field: ", @@ -4613,6 +4762,8 @@ pub struct TPMS_SYMCIPHER_PARMS { } #[test] fn bindgen_test_layout_TPMS_SYMCIPHER_PARMS() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 6usize, @@ -4624,7 +4775,7 @@ fn bindgen_test_layout_TPMS_SYMCIPHER_PARMS() { concat!("Alignment of ", stringify!(TPMS_SYMCIPHER_PARMS)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).sym as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).sym) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -4651,6 +4802,8 @@ pub struct TPM2B_SENSITIVE_DATA { } #[test] fn bindgen_test_layout_TPM2B_SENSITIVE_DATA() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 258usize, @@ -4662,7 +4815,7 @@ fn bindgen_test_layout_TPM2B_SENSITIVE_DATA() { concat!("Alignment of ", stringify!(TPM2B_SENSITIVE_DATA)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).size as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -4672,7 +4825,7 @@ fn bindgen_test_layout_TPM2B_SENSITIVE_DATA() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).buffer as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 2usize, concat!( "Offset of field: ", @@ -4699,6 +4852,9 @@ pub struct TPMS_SENSITIVE_CREATE { } #[test] fn bindgen_test_layout_TPMS_SENSITIVE_CREATE() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 324usize, @@ -4710,7 +4866,7 @@ fn bindgen_test_layout_TPMS_SENSITIVE_CREATE() { concat!("Alignment of ", stringify!(TPMS_SENSITIVE_CREATE)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).userAuth as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).userAuth) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -4720,7 +4876,7 @@ fn bindgen_test_layout_TPMS_SENSITIVE_CREATE() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).data as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, 66usize, concat!( "Offset of field: ", @@ -4747,6 +4903,9 @@ pub struct TPM2B_SENSITIVE_CREATE { } #[test] fn bindgen_test_layout_TPM2B_SENSITIVE_CREATE() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 326usize, @@ -4758,7 +4917,7 @@ fn bindgen_test_layout_TPM2B_SENSITIVE_CREATE() { concat!("Alignment of ", stringify!(TPM2B_SENSITIVE_CREATE)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).size as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -4768,9 +4927,7 @@ fn bindgen_test_layout_TPM2B_SENSITIVE_CREATE() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).sensitive as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).sensitive) as usize - ptr as usize }, 2usize, concat!( "Offset of field: ", @@ -4796,6 +4953,8 @@ pub struct TPMS_SCHEME_HASH { } #[test] fn bindgen_test_layout_TPMS_SCHEME_HASH() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 2usize, @@ -4807,7 +4966,7 @@ fn bindgen_test_layout_TPMS_SCHEME_HASH() { concat!("Alignment of ", stringify!(TPMS_SCHEME_HASH)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).hashAlg as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).hashAlg) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -4825,6 +4984,8 @@ pub struct TPMS_SCHEME_ECDAA { } #[test] fn bindgen_test_layout_TPMS_SCHEME_ECDAA() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 4usize, @@ -4836,7 +4997,7 @@ fn bindgen_test_layout_TPMS_SCHEME_ECDAA() { concat!("Alignment of ", stringify!(TPMS_SCHEME_ECDAA)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).hashAlg as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).hashAlg) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -4846,7 +5007,7 @@ fn bindgen_test_layout_TPMS_SCHEME_ECDAA() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).count as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 2usize, concat!( "Offset of field: ", @@ -4866,6 +5027,8 @@ pub struct TPMS_SCHEME_XOR { } #[test] fn bindgen_test_layout_TPMS_SCHEME_XOR() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 4usize, @@ -4877,7 +5040,7 @@ fn bindgen_test_layout_TPMS_SCHEME_XOR() { concat!("Alignment of ", stringify!(TPMS_SCHEME_XOR)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).hashAlg as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).hashAlg) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -4887,7 +5050,7 @@ fn bindgen_test_layout_TPMS_SCHEME_XOR() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).kdf as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, 2usize, concat!( "Offset of field: ", @@ -4905,6 +5068,9 @@ pub union TPMU_SCHEME_KEYEDHASH { } #[test] fn bindgen_test_layout_TPMU_SCHEME_KEYEDHASH() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 4usize, @@ -4916,7 +5082,7 @@ fn bindgen_test_layout_TPMU_SCHEME_KEYEDHASH() { concat!("Alignment of ", stringify!(TPMU_SCHEME_KEYEDHASH)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).hmac as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).hmac) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -4926,9 +5092,7 @@ fn bindgen_test_layout_TPMU_SCHEME_KEYEDHASH() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).exclusiveOr as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).exclusiveOr) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -4955,6 +5119,9 @@ pub struct TPMT_KEYEDHASH_SCHEME { } #[test] fn bindgen_test_layout_TPMT_KEYEDHASH_SCHEME() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 6usize, @@ -4966,7 +5133,7 @@ fn bindgen_test_layout_TPMT_KEYEDHASH_SCHEME() { concat!("Alignment of ", stringify!(TPMT_KEYEDHASH_SCHEME)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).scheme as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).scheme) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -4976,7 +5143,7 @@ fn bindgen_test_layout_TPMT_KEYEDHASH_SCHEME() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).details as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).details) as usize - ptr as usize }, 2usize, concat!( "Offset of field: ", @@ -5015,6 +5182,8 @@ pub union TPMU_SIG_SCHEME { } #[test] fn bindgen_test_layout_TPMU_SIG_SCHEME() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 4usize, @@ -5026,7 +5195,7 @@ fn bindgen_test_layout_TPMU_SIG_SCHEME() { concat!("Alignment of ", stringify!(TPMU_SIG_SCHEME)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).rsassa as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).rsassa) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -5036,7 +5205,7 @@ fn bindgen_test_layout_TPMU_SIG_SCHEME() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).rsapss as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).rsapss) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -5046,7 +5215,7 @@ fn bindgen_test_layout_TPMU_SIG_SCHEME() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ecdsa as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ecdsa) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -5056,7 +5225,7 @@ fn bindgen_test_layout_TPMU_SIG_SCHEME() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ecdaa as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ecdaa) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -5066,7 +5235,7 @@ fn bindgen_test_layout_TPMU_SIG_SCHEME() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).sm2 as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).sm2) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -5076,7 +5245,7 @@ fn bindgen_test_layout_TPMU_SIG_SCHEME() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ecschnorr as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ecschnorr) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -5086,7 +5255,7 @@ fn bindgen_test_layout_TPMU_SIG_SCHEME() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).hmac as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).hmac) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -5096,7 +5265,7 @@ fn bindgen_test_layout_TPMU_SIG_SCHEME() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).any as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).any) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -5123,6 +5292,8 @@ pub struct TPMT_SIG_SCHEME { } #[test] fn bindgen_test_layout_TPMT_SIG_SCHEME() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 6usize, @@ -5134,7 +5305,7 @@ fn bindgen_test_layout_TPMT_SIG_SCHEME() { concat!("Alignment of ", stringify!(TPMT_SIG_SCHEME)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).scheme as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).scheme) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -5144,7 +5315,7 @@ fn bindgen_test_layout_TPMT_SIG_SCHEME() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).details as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).details) as usize - ptr as usize }, 2usize, concat!( "Offset of field: ", @@ -5181,6 +5352,8 @@ pub union TPMU_KDF_SCHEME { } #[test] fn bindgen_test_layout_TPMU_KDF_SCHEME() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 2usize, @@ -5192,7 +5365,7 @@ fn bindgen_test_layout_TPMU_KDF_SCHEME() { concat!("Alignment of ", stringify!(TPMU_KDF_SCHEME)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).mgf1 as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).mgf1) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -5202,7 +5375,7 @@ fn bindgen_test_layout_TPMU_KDF_SCHEME() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).kdf1_sp800_56a as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).kdf1_sp800_56a) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -5212,7 +5385,7 @@ fn bindgen_test_layout_TPMU_KDF_SCHEME() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).kdf2 as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).kdf2) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -5222,7 +5395,7 @@ fn bindgen_test_layout_TPMU_KDF_SCHEME() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).kdf1_sp800_108 as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).kdf1_sp800_108) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -5249,6 +5422,8 @@ pub struct TPMT_KDF_SCHEME { } #[test] fn bindgen_test_layout_TPMT_KDF_SCHEME() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 4usize, @@ -5260,7 +5435,7 @@ fn bindgen_test_layout_TPMT_KDF_SCHEME() { concat!("Alignment of ", stringify!(TPMT_KDF_SCHEME)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).scheme as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).scheme) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -5270,7 +5445,7 @@ fn bindgen_test_layout_TPMT_KDF_SCHEME() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).details as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).details) as usize - ptr as usize }, 2usize, concat!( "Offset of field: ", @@ -5307,6 +5482,8 @@ pub union TPMU_ASYM_SCHEME { } #[test] fn bindgen_test_layout_TPMU_ASYM_SCHEME() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 4usize, @@ -5318,7 +5495,7 @@ fn bindgen_test_layout_TPMU_ASYM_SCHEME() { concat!("Alignment of ", stringify!(TPMU_ASYM_SCHEME)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ecdh as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ecdh) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -5328,7 +5505,7 @@ fn bindgen_test_layout_TPMU_ASYM_SCHEME() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ecmqv as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ecmqv) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -5338,7 +5515,7 @@ fn bindgen_test_layout_TPMU_ASYM_SCHEME() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).rsassa as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).rsassa) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -5348,7 +5525,7 @@ fn bindgen_test_layout_TPMU_ASYM_SCHEME() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).rsapss as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).rsapss) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -5358,7 +5535,7 @@ fn bindgen_test_layout_TPMU_ASYM_SCHEME() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ecdsa as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ecdsa) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -5368,7 +5545,7 @@ fn bindgen_test_layout_TPMU_ASYM_SCHEME() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ecdaa as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ecdaa) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -5378,7 +5555,7 @@ fn bindgen_test_layout_TPMU_ASYM_SCHEME() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).sm2 as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).sm2) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -5388,7 +5565,7 @@ fn bindgen_test_layout_TPMU_ASYM_SCHEME() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ecschnorr as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ecschnorr) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -5398,7 +5575,7 @@ fn bindgen_test_layout_TPMU_ASYM_SCHEME() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).rsaes as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).rsaes) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -5408,7 +5585,7 @@ fn bindgen_test_layout_TPMU_ASYM_SCHEME() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).oaep as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).oaep) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -5418,7 +5595,7 @@ fn bindgen_test_layout_TPMU_ASYM_SCHEME() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).anySig as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).anySig) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -5445,6 +5622,8 @@ pub struct TPMT_ASYM_SCHEME { } #[test] fn bindgen_test_layout_TPMT_ASYM_SCHEME() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 6usize, @@ -5456,7 +5635,7 @@ fn bindgen_test_layout_TPMT_ASYM_SCHEME() { concat!("Alignment of ", stringify!(TPMT_ASYM_SCHEME)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).scheme as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).scheme) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -5466,7 +5645,7 @@ fn bindgen_test_layout_TPMT_ASYM_SCHEME() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).details as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).details) as usize - ptr as usize }, 2usize, concat!( "Offset of field: ", @@ -5494,6 +5673,8 @@ pub struct TPMT_RSA_SCHEME { } #[test] fn bindgen_test_layout_TPMT_RSA_SCHEME() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 6usize, @@ -5505,7 +5686,7 @@ fn bindgen_test_layout_TPMT_RSA_SCHEME() { concat!("Alignment of ", stringify!(TPMT_RSA_SCHEME)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).scheme as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).scheme) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -5515,7 +5696,7 @@ fn bindgen_test_layout_TPMT_RSA_SCHEME() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).details as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).details) as usize - ptr as usize }, 2usize, concat!( "Offset of field: ", @@ -5543,6 +5724,8 @@ pub struct TPMT_RSA_DECRYPT { } #[test] fn bindgen_test_layout_TPMT_RSA_DECRYPT() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 6usize, @@ -5554,7 +5737,7 @@ fn bindgen_test_layout_TPMT_RSA_DECRYPT() { concat!("Alignment of ", stringify!(TPMT_RSA_DECRYPT)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).scheme as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).scheme) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -5564,7 +5747,7 @@ fn bindgen_test_layout_TPMT_RSA_DECRYPT() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).details as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).details) as usize - ptr as usize }, 2usize, concat!( "Offset of field: ", @@ -5591,6 +5774,8 @@ pub struct TPM2B_PUBLIC_KEY_RSA { } #[test] fn bindgen_test_layout_TPM2B_PUBLIC_KEY_RSA() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 514usize, @@ -5602,7 +5787,7 @@ fn bindgen_test_layout_TPM2B_PUBLIC_KEY_RSA() { concat!("Alignment of ", stringify!(TPM2B_PUBLIC_KEY_RSA)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).size as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -5612,7 +5797,7 @@ fn bindgen_test_layout_TPM2B_PUBLIC_KEY_RSA() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).buffer as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 2usize, concat!( "Offset of field: ", @@ -5640,6 +5825,9 @@ pub struct TPM2B_PRIVATE_KEY_RSA { } #[test] fn bindgen_test_layout_TPM2B_PRIVATE_KEY_RSA() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 258usize, @@ -5651,7 +5839,7 @@ fn bindgen_test_layout_TPM2B_PRIVATE_KEY_RSA() { concat!("Alignment of ", stringify!(TPM2B_PRIVATE_KEY_RSA)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).size as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -5661,7 +5849,7 @@ fn bindgen_test_layout_TPM2B_PRIVATE_KEY_RSA() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).buffer as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 2usize, concat!( "Offset of field: ", @@ -5688,6 +5876,8 @@ pub struct TPM2B_ECC_PARAMETER { } #[test] fn bindgen_test_layout_TPM2B_ECC_PARAMETER() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 130usize, @@ -5699,7 +5889,7 @@ fn bindgen_test_layout_TPM2B_ECC_PARAMETER() { concat!("Alignment of ", stringify!(TPM2B_ECC_PARAMETER)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).size as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -5709,7 +5899,7 @@ fn bindgen_test_layout_TPM2B_ECC_PARAMETER() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).buffer as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 2usize, concat!( "Offset of field: ", @@ -5736,6 +5926,8 @@ pub struct TPMS_ECC_POINT { } #[test] fn bindgen_test_layout_TPMS_ECC_POINT() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 260usize, @@ -5747,7 +5939,7 @@ fn bindgen_test_layout_TPMS_ECC_POINT() { concat!("Alignment of ", stringify!(TPMS_ECC_POINT)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).x as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -5757,7 +5949,7 @@ fn bindgen_test_layout_TPMS_ECC_POINT() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).y as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, 130usize, concat!( "Offset of field: ", @@ -5784,6 +5976,8 @@ pub struct TPM2B_ECC_POINT { } #[test] fn bindgen_test_layout_TPM2B_ECC_POINT() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 262usize, @@ -5795,7 +5989,7 @@ fn bindgen_test_layout_TPM2B_ECC_POINT() { concat!("Alignment of ", stringify!(TPM2B_ECC_POINT)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).size as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -5805,7 +5999,7 @@ fn bindgen_test_layout_TPM2B_ECC_POINT() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).point as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).point) as usize - ptr as usize }, 2usize, concat!( "Offset of field: ", @@ -5834,6 +6028,8 @@ pub struct TPMT_ECC_SCHEME { } #[test] fn bindgen_test_layout_TPMT_ECC_SCHEME() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 6usize, @@ -5845,7 +6041,7 @@ fn bindgen_test_layout_TPMT_ECC_SCHEME() { concat!("Alignment of ", stringify!(TPMT_ECC_SCHEME)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).scheme as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).scheme) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -5855,7 +6051,7 @@ fn bindgen_test_layout_TPMT_ECC_SCHEME() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).details as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).details) as usize - ptr as usize }, 2usize, concat!( "Offset of field: ", @@ -5891,6 +6087,9 @@ pub struct TPMS_ALGORITHM_DETAIL_ECC { } #[test] fn bindgen_test_layout_TPMS_ALGORITHM_DETAIL_ECC() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 924usize, @@ -5902,9 +6101,7 @@ fn bindgen_test_layout_TPMS_ALGORITHM_DETAIL_ECC() { concat!("Alignment of ", stringify!(TPMS_ALGORITHM_DETAIL_ECC)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).curveID as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).curveID) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -5914,9 +6111,7 @@ fn bindgen_test_layout_TPMS_ALGORITHM_DETAIL_ECC() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).keySize as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).keySize) as usize - ptr as usize }, 2usize, concat!( "Offset of field: ", @@ -5926,7 +6121,7 @@ fn bindgen_test_layout_TPMS_ALGORITHM_DETAIL_ECC() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).kdf as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -5936,7 +6131,7 @@ fn bindgen_test_layout_TPMS_ALGORITHM_DETAIL_ECC() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).sign as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).sign) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -5946,7 +6141,7 @@ fn bindgen_test_layout_TPMS_ALGORITHM_DETAIL_ECC() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).p as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).p) as usize - ptr as usize }, 14usize, concat!( "Offset of field: ", @@ -5956,7 +6151,7 @@ fn bindgen_test_layout_TPMS_ALGORITHM_DETAIL_ECC() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).a as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).a) as usize - ptr as usize }, 144usize, concat!( "Offset of field: ", @@ -5966,7 +6161,7 @@ fn bindgen_test_layout_TPMS_ALGORITHM_DETAIL_ECC() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).b as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).b) as usize - ptr as usize }, 274usize, concat!( "Offset of field: ", @@ -5976,7 +6171,7 @@ fn bindgen_test_layout_TPMS_ALGORITHM_DETAIL_ECC() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).gX as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).gX) as usize - ptr as usize }, 404usize, concat!( "Offset of field: ", @@ -5986,7 +6181,7 @@ fn bindgen_test_layout_TPMS_ALGORITHM_DETAIL_ECC() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).gY as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).gY) as usize - ptr as usize }, 534usize, concat!( "Offset of field: ", @@ -5996,7 +6191,7 @@ fn bindgen_test_layout_TPMS_ALGORITHM_DETAIL_ECC() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).n as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).n) as usize - ptr as usize }, 664usize, concat!( "Offset of field: ", @@ -6006,7 +6201,7 @@ fn bindgen_test_layout_TPMS_ALGORITHM_DETAIL_ECC() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).h as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).h) as usize - ptr as usize }, 794usize, concat!( "Offset of field: ", @@ -6033,6 +6228,8 @@ pub struct TPMS_SIGNATURE_RSA { } #[test] fn bindgen_test_layout_TPMS_SIGNATURE_RSA() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 516usize, @@ -6044,7 +6241,7 @@ fn bindgen_test_layout_TPMS_SIGNATURE_RSA() { concat!("Alignment of ", stringify!(TPMS_SIGNATURE_RSA)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).hash as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).hash) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -6054,7 +6251,7 @@ fn bindgen_test_layout_TPMS_SIGNATURE_RSA() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).sig as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).sig) as usize - ptr as usize }, 2usize, concat!( "Offset of field: ", @@ -6084,6 +6281,8 @@ pub struct TPMS_SIGNATURE_ECC { } #[test] fn bindgen_test_layout_TPMS_SIGNATURE_ECC() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 262usize, @@ -6095,7 +6294,7 @@ fn bindgen_test_layout_TPMS_SIGNATURE_ECC() { concat!("Alignment of ", stringify!(TPMS_SIGNATURE_ECC)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).hash as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).hash) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -6105,7 +6304,7 @@ fn bindgen_test_layout_TPMS_SIGNATURE_ECC() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).signatureR as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).signatureR) as usize - ptr as usize }, 2usize, concat!( "Offset of field: ", @@ -6115,7 +6314,7 @@ fn bindgen_test_layout_TPMS_SIGNATURE_ECC() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).signatureS as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).signatureS) as usize - ptr as usize }, 132usize, concat!( "Offset of field: ", @@ -6152,6 +6351,8 @@ pub union TPMU_SIGNATURE { } #[test] fn bindgen_test_layout_TPMU_SIGNATURE() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 516usize, @@ -6163,7 +6364,7 @@ fn bindgen_test_layout_TPMU_SIGNATURE() { concat!("Alignment of ", stringify!(TPMU_SIGNATURE)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).rsassa as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).rsassa) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -6173,7 +6374,7 @@ fn bindgen_test_layout_TPMU_SIGNATURE() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).rsapss as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).rsapss) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -6183,7 +6384,7 @@ fn bindgen_test_layout_TPMU_SIGNATURE() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ecdsa as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ecdsa) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -6193,7 +6394,7 @@ fn bindgen_test_layout_TPMU_SIGNATURE() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ecdaa as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ecdaa) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -6203,7 +6404,7 @@ fn bindgen_test_layout_TPMU_SIGNATURE() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).sm2 as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).sm2) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -6213,7 +6414,7 @@ fn bindgen_test_layout_TPMU_SIGNATURE() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ecschnorr as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ecschnorr) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -6223,7 +6424,7 @@ fn bindgen_test_layout_TPMU_SIGNATURE() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).hmac as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).hmac) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -6233,7 +6434,7 @@ fn bindgen_test_layout_TPMU_SIGNATURE() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).any as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).any) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -6260,6 +6461,8 @@ pub struct TPMT_SIGNATURE { } #[test] fn bindgen_test_layout_TPMT_SIGNATURE() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 518usize, @@ -6271,7 +6474,7 @@ fn bindgen_test_layout_TPMT_SIGNATURE() { concat!("Alignment of ", stringify!(TPMT_SIGNATURE)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).sigAlg as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).sigAlg) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -6281,7 +6484,7 @@ fn bindgen_test_layout_TPMT_SIGNATURE() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).signature as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).signature) as usize - ptr as usize }, 2usize, concat!( "Offset of field: ", @@ -6310,6 +6513,9 @@ pub union TPMU_ENCRYPTED_SECRET { } #[test] fn bindgen_test_layout_TPMU_ENCRYPTED_SECRET() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 512usize, @@ -6321,7 +6527,7 @@ fn bindgen_test_layout_TPMU_ENCRYPTED_SECRET() { concat!("Alignment of ", stringify!(TPMU_ENCRYPTED_SECRET)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ecc as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ecc) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -6331,7 +6537,7 @@ fn bindgen_test_layout_TPMU_ENCRYPTED_SECRET() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).rsa as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).rsa) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -6341,7 +6547,7 @@ fn bindgen_test_layout_TPMU_ENCRYPTED_SECRET() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).symmetric as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).symmetric) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -6351,7 +6557,7 @@ fn bindgen_test_layout_TPMU_ENCRYPTED_SECRET() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).keyedHash as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).keyedHash) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -6378,6 +6584,9 @@ pub struct TPM2B_ENCRYPTED_SECRET { } #[test] fn bindgen_test_layout_TPM2B_ENCRYPTED_SECRET() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 514usize, @@ -6389,7 +6598,7 @@ fn bindgen_test_layout_TPM2B_ENCRYPTED_SECRET() { concat!("Alignment of ", stringify!(TPM2B_ENCRYPTED_SECRET)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).size as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -6399,7 +6608,7 @@ fn bindgen_test_layout_TPM2B_ENCRYPTED_SECRET() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).secret as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).secret) as usize - ptr as usize }, 2usize, concat!( "Offset of field: ", @@ -6429,6 +6638,8 @@ pub union TPMU_PUBLIC_ID { } #[test] fn bindgen_test_layout_TPMU_PUBLIC_ID() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 514usize, @@ -6440,7 +6651,7 @@ fn bindgen_test_layout_TPMU_PUBLIC_ID() { concat!("Alignment of ", stringify!(TPMU_PUBLIC_ID)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).keyedHash as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).keyedHash) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -6450,7 +6661,7 @@ fn bindgen_test_layout_TPMU_PUBLIC_ID() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).sym as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).sym) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -6460,7 +6671,7 @@ fn bindgen_test_layout_TPMU_PUBLIC_ID() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).rsa as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).rsa) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -6470,7 +6681,7 @@ fn bindgen_test_layout_TPMU_PUBLIC_ID() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ecc as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ecc) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -6496,6 +6707,8 @@ pub struct TPMS_KEYEDHASH_PARMS { } #[test] fn bindgen_test_layout_TPMS_KEYEDHASH_PARMS() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 6usize, @@ -6507,7 +6720,7 @@ fn bindgen_test_layout_TPMS_KEYEDHASH_PARMS() { concat!("Alignment of ", stringify!(TPMS_KEYEDHASH_PARMS)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).scheme as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).scheme) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -6534,6 +6747,8 @@ pub struct TPMS_ASYM_PARMS { } #[test] fn bindgen_test_layout_TPMS_ASYM_PARMS() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 12usize, @@ -6545,7 +6760,7 @@ fn bindgen_test_layout_TPMS_ASYM_PARMS() { concat!("Alignment of ", stringify!(TPMS_ASYM_PARMS)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).symmetric as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).symmetric) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -6555,7 +6770,7 @@ fn bindgen_test_layout_TPMS_ASYM_PARMS() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).scheme as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).scheme) as usize - ptr as usize }, 6usize, concat!( "Offset of field: ", @@ -6584,6 +6799,8 @@ pub struct TPMS_RSA_PARMS { } #[test] fn bindgen_test_layout_TPMS_RSA_PARMS() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 20usize, @@ -6595,7 +6812,7 @@ fn bindgen_test_layout_TPMS_RSA_PARMS() { concat!("Alignment of ", stringify!(TPMS_RSA_PARMS)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).symmetric as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).symmetric) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -6605,7 +6822,7 @@ fn bindgen_test_layout_TPMS_RSA_PARMS() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).scheme as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).scheme) as usize - ptr as usize }, 6usize, concat!( "Offset of field: ", @@ -6615,7 +6832,7 @@ fn bindgen_test_layout_TPMS_RSA_PARMS() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).keyBits as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).keyBits) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -6625,7 +6842,7 @@ fn bindgen_test_layout_TPMS_RSA_PARMS() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).exponent as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).exponent) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -6654,6 +6871,8 @@ pub struct TPMS_ECC_PARMS { } #[test] fn bindgen_test_layout_TPMS_ECC_PARMS() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 18usize, @@ -6665,7 +6884,7 @@ fn bindgen_test_layout_TPMS_ECC_PARMS() { concat!("Alignment of ", stringify!(TPMS_ECC_PARMS)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).symmetric as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).symmetric) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -6675,7 +6894,7 @@ fn bindgen_test_layout_TPMS_ECC_PARMS() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).scheme as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).scheme) as usize - ptr as usize }, 6usize, concat!( "Offset of field: ", @@ -6685,7 +6904,7 @@ fn bindgen_test_layout_TPMS_ECC_PARMS() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).curveID as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).curveID) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -6695,7 +6914,7 @@ fn bindgen_test_layout_TPMS_ECC_PARMS() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).kdf as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, 14usize, concat!( "Offset of field: ", @@ -6725,6 +6944,8 @@ pub union TPMU_PUBLIC_PARMS { } #[test] fn bindgen_test_layout_TPMU_PUBLIC_PARMS() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 20usize, @@ -6736,9 +6957,7 @@ fn bindgen_test_layout_TPMU_PUBLIC_PARMS() { concat!("Alignment of ", stringify!(TPMU_PUBLIC_PARMS)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).keyedHashDetail as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).keyedHashDetail) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -6748,7 +6967,7 @@ fn bindgen_test_layout_TPMU_PUBLIC_PARMS() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).symDetail as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).symDetail) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -6758,7 +6977,7 @@ fn bindgen_test_layout_TPMU_PUBLIC_PARMS() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).rsaDetail as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).rsaDetail) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -6768,7 +6987,7 @@ fn bindgen_test_layout_TPMU_PUBLIC_PARMS() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).eccDetail as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).eccDetail) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -6778,7 +6997,7 @@ fn bindgen_test_layout_TPMU_PUBLIC_PARMS() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).asymDetail as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).asymDetail) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -6805,6 +7024,8 @@ pub struct TPMT_PUBLIC_PARMS { } #[test] fn bindgen_test_layout_TPMT_PUBLIC_PARMS() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 24usize, @@ -6816,7 +7037,7 @@ fn bindgen_test_layout_TPMT_PUBLIC_PARMS() { concat!("Alignment of ", stringify!(TPMT_PUBLIC_PARMS)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -6826,7 +7047,7 @@ fn bindgen_test_layout_TPMT_PUBLIC_PARMS() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).parameters as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).parameters) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -6857,6 +7078,8 @@ pub struct TPMT_PUBLIC { } #[test] fn bindgen_test_layout_TPMT_PUBLIC() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 612usize, @@ -6868,7 +7091,7 @@ fn bindgen_test_layout_TPMT_PUBLIC() { concat!("Alignment of ", stringify!(TPMT_PUBLIC)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -6878,7 +7101,7 @@ fn bindgen_test_layout_TPMT_PUBLIC() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).nameAlg as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).nameAlg) as usize - ptr as usize }, 2usize, concat!( "Offset of field: ", @@ -6888,7 +7111,7 @@ fn bindgen_test_layout_TPMT_PUBLIC() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).objectAttributes as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).objectAttributes) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -6898,7 +7121,7 @@ fn bindgen_test_layout_TPMT_PUBLIC() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).authPolicy as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).authPolicy) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -6908,7 +7131,7 @@ fn bindgen_test_layout_TPMT_PUBLIC() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).parameters as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).parameters) as usize - ptr as usize }, 76usize, concat!( "Offset of field: ", @@ -6918,7 +7141,7 @@ fn bindgen_test_layout_TPMT_PUBLIC() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).unique as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).unique) as usize - ptr as usize }, 96usize, concat!( "Offset of field: ", @@ -6945,6 +7168,8 @@ pub struct TPM2B_PUBLIC { } #[test] fn bindgen_test_layout_TPM2B_PUBLIC() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 616usize, @@ -6956,7 +7181,7 @@ fn bindgen_test_layout_TPM2B_PUBLIC() { concat!("Alignment of ", stringify!(TPM2B_PUBLIC)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).size as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -6966,7 +7191,7 @@ fn bindgen_test_layout_TPM2B_PUBLIC() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).publicArea as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).publicArea) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -6993,6 +7218,8 @@ pub struct TPM2B_TEMPLATE { } #[test] fn bindgen_test_layout_TPM2B_TEMPLATE() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 614usize, @@ -7004,7 +7231,7 @@ fn bindgen_test_layout_TPM2B_TEMPLATE() { concat!("Alignment of ", stringify!(TPM2B_TEMPLATE)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).size as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -7014,7 +7241,7 @@ fn bindgen_test_layout_TPM2B_TEMPLATE() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).buffer as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 2usize, concat!( "Offset of field: ", @@ -7041,6 +7268,9 @@ pub struct TPM2B_PRIVATE_VENDOR_SPECIFIC { } #[test] fn bindgen_test_layout_TPM2B_PRIVATE_VENDOR_SPECIFIC() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 1282usize, @@ -7052,9 +7282,7 @@ fn bindgen_test_layout_TPM2B_PRIVATE_VENDOR_SPECIFIC() { concat!("Alignment of ", stringify!(TPM2B_PRIVATE_VENDOR_SPECIFIC)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).size as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -7064,9 +7292,7 @@ fn bindgen_test_layout_TPM2B_PRIVATE_VENDOR_SPECIFIC() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).buffer as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 2usize, concat!( "Offset of field: ", @@ -7096,6 +7322,9 @@ pub union TPMU_SENSITIVE_COMPOSITE { } #[test] fn bindgen_test_layout_TPMU_SENSITIVE_COMPOSITE() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 1282usize, @@ -7107,7 +7336,7 @@ fn bindgen_test_layout_TPMU_SENSITIVE_COMPOSITE() { concat!("Alignment of ", stringify!(TPMU_SENSITIVE_COMPOSITE)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).rsa as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).rsa) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -7117,7 +7346,7 @@ fn bindgen_test_layout_TPMU_SENSITIVE_COMPOSITE() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ecc as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ecc) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -7127,7 +7356,7 @@ fn bindgen_test_layout_TPMU_SENSITIVE_COMPOSITE() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).bits as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).bits) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -7137,7 +7366,7 @@ fn bindgen_test_layout_TPMU_SENSITIVE_COMPOSITE() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).sym as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).sym) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -7147,7 +7376,7 @@ fn bindgen_test_layout_TPMU_SENSITIVE_COMPOSITE() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).any as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).any) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -7176,6 +7405,8 @@ pub struct TPMT_SENSITIVE { } #[test] fn bindgen_test_layout_TPMT_SENSITIVE() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 1416usize, @@ -7187,7 +7418,7 @@ fn bindgen_test_layout_TPMT_SENSITIVE() { concat!("Alignment of ", stringify!(TPMT_SENSITIVE)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).sensitiveType as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).sensitiveType) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -7197,7 +7428,7 @@ fn bindgen_test_layout_TPMT_SENSITIVE() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).authValue as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).authValue) as usize - ptr as usize }, 2usize, concat!( "Offset of field: ", @@ -7207,7 +7438,7 @@ fn bindgen_test_layout_TPMT_SENSITIVE() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).seedValue as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).seedValue) as usize - ptr as usize }, 68usize, concat!( "Offset of field: ", @@ -7217,7 +7448,7 @@ fn bindgen_test_layout_TPMT_SENSITIVE() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).sensitive as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).sensitive) as usize - ptr as usize }, 134usize, concat!( "Offset of field: ", @@ -7244,6 +7475,8 @@ pub struct TPM2B_SENSITIVE { } #[test] fn bindgen_test_layout_TPM2B_SENSITIVE() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 1418usize, @@ -7255,7 +7488,7 @@ fn bindgen_test_layout_TPM2B_SENSITIVE() { concat!("Alignment of ", stringify!(TPM2B_SENSITIVE)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).size as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -7265,7 +7498,7 @@ fn bindgen_test_layout_TPM2B_SENSITIVE() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).sensitiveArea as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).sensitiveArea) as usize - ptr as usize }, 2usize, concat!( "Offset of field: ", @@ -7293,6 +7526,8 @@ pub struct _PRIVATE { } #[test] fn bindgen_test_layout__PRIVATE() { + const UNINIT: ::std::mem::MaybeUninit<_PRIVATE> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_PRIVATE>(), 1550usize, @@ -7304,7 +7539,7 @@ fn bindgen_test_layout__PRIVATE() { concat!("Alignment of ", stringify!(_PRIVATE)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_PRIVATE>())).integrityOuter as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).integrityOuter) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -7314,7 +7549,7 @@ fn bindgen_test_layout__PRIVATE() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_PRIVATE>())).integrityInner as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).integrityInner) as usize - ptr as usize }, 66usize, concat!( "Offset of field: ", @@ -7324,7 +7559,7 @@ fn bindgen_test_layout__PRIVATE() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_PRIVATE>())).sensitive as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).sensitive) as usize - ptr as usize }, 132usize, concat!( "Offset of field: ", @@ -7351,6 +7586,8 @@ pub struct TPM2B_PRIVATE { } #[test] fn bindgen_test_layout_TPM2B_PRIVATE() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 1552usize, @@ -7362,7 +7599,7 @@ fn bindgen_test_layout_TPM2B_PRIVATE() { concat!("Alignment of ", stringify!(TPM2B_PRIVATE)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).size as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -7372,7 +7609,7 @@ fn bindgen_test_layout_TPM2B_PRIVATE() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).buffer as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 2usize, concat!( "Offset of field: ", @@ -7399,6 +7636,8 @@ pub struct TPMS_ID_OBJECT { } #[test] fn bindgen_test_layout_TPMS_ID_OBJECT() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 132usize, @@ -7410,7 +7649,7 @@ fn bindgen_test_layout_TPMS_ID_OBJECT() { concat!("Alignment of ", stringify!(TPMS_ID_OBJECT)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).integrityHMAC as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).integrityHMAC) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -7420,7 +7659,7 @@ fn bindgen_test_layout_TPMS_ID_OBJECT() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).encIdentity as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).encIdentity) as usize - ptr as usize }, 66usize, concat!( "Offset of field: ", @@ -7447,6 +7686,8 @@ pub struct TPM2B_ID_OBJECT { } #[test] fn bindgen_test_layout_TPM2B_ID_OBJECT() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 134usize, @@ -7458,7 +7699,7 @@ fn bindgen_test_layout_TPM2B_ID_OBJECT() { concat!("Alignment of ", stringify!(TPM2B_ID_OBJECT)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).size as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -7468,7 +7709,7 @@ fn bindgen_test_layout_TPM2B_ID_OBJECT() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).credential as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).credential) as usize - ptr as usize }, 2usize, concat!( "Offset of field: ", @@ -7497,6 +7738,9 @@ pub struct TPMS_NV_PIN_COUNTER_PARAMETERS { } #[test] fn bindgen_test_layout_TPMS_NV_PIN_COUNTER_PARAMETERS() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, @@ -7508,9 +7752,7 @@ fn bindgen_test_layout_TPMS_NV_PIN_COUNTER_PARAMETERS() { concat!("Alignment of ", stringify!(TPMS_NV_PIN_COUNTER_PARAMETERS)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pinCount as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).pinCount) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -7520,9 +7762,7 @@ fn bindgen_test_layout_TPMS_NV_PIN_COUNTER_PARAMETERS() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pinLimit as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).pinLimit) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -7544,6 +7784,8 @@ pub struct TPMS_NV_PUBLIC { } #[test] fn bindgen_test_layout_TPMS_NV_PUBLIC() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 80usize, @@ -7555,7 +7797,7 @@ fn bindgen_test_layout_TPMS_NV_PUBLIC() { concat!("Alignment of ", stringify!(TPMS_NV_PUBLIC)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).nvIndex as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).nvIndex) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -7565,7 +7807,7 @@ fn bindgen_test_layout_TPMS_NV_PUBLIC() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).nameAlg as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).nameAlg) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -7575,7 +7817,7 @@ fn bindgen_test_layout_TPMS_NV_PUBLIC() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).attributes as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).attributes) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -7585,7 +7827,7 @@ fn bindgen_test_layout_TPMS_NV_PUBLIC() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).authPolicy as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).authPolicy) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -7595,7 +7837,7 @@ fn bindgen_test_layout_TPMS_NV_PUBLIC() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).dataSize as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).dataSize) as usize - ptr as usize }, 78usize, concat!( "Offset of field: ", @@ -7622,6 +7864,8 @@ pub struct TPM2B_NV_PUBLIC { } #[test] fn bindgen_test_layout_TPM2B_NV_PUBLIC() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 84usize, @@ -7633,7 +7877,7 @@ fn bindgen_test_layout_TPM2B_NV_PUBLIC() { concat!("Alignment of ", stringify!(TPM2B_NV_PUBLIC)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).size as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -7643,7 +7887,7 @@ fn bindgen_test_layout_TPM2B_NV_PUBLIC() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).nvPublic as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).nvPublic) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -7670,6 +7914,9 @@ pub struct TPM2B_CONTEXT_SENSITIVE { } #[test] fn bindgen_test_layout_TPM2B_CONTEXT_SENSITIVE() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 5122usize, @@ -7681,7 +7928,7 @@ fn bindgen_test_layout_TPM2B_CONTEXT_SENSITIVE() { concat!("Alignment of ", stringify!(TPM2B_CONTEXT_SENSITIVE)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).size as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -7691,7 +7938,7 @@ fn bindgen_test_layout_TPM2B_CONTEXT_SENSITIVE() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).buffer as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 2usize, concat!( "Offset of field: ", @@ -7718,6 +7965,8 @@ pub struct TPMS_CONTEXT_DATA { } #[test] fn bindgen_test_layout_TPMS_CONTEXT_DATA() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 5188usize, @@ -7729,7 +7978,7 @@ fn bindgen_test_layout_TPMS_CONTEXT_DATA() { concat!("Alignment of ", stringify!(TPMS_CONTEXT_DATA)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).integrity as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).integrity) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -7739,7 +7988,7 @@ fn bindgen_test_layout_TPMS_CONTEXT_DATA() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).encrypted as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).encrypted) as usize - ptr as usize }, 66usize, concat!( "Offset of field: ", @@ -7766,6 +8015,8 @@ pub struct TPM2B_CONTEXT_DATA { } #[test] fn bindgen_test_layout_TPM2B_CONTEXT_DATA() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 5190usize, @@ -7777,7 +8028,7 @@ fn bindgen_test_layout_TPM2B_CONTEXT_DATA() { concat!("Alignment of ", stringify!(TPM2B_CONTEXT_DATA)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).size as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -7787,7 +8038,7 @@ fn bindgen_test_layout_TPM2B_CONTEXT_DATA() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).buffer as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 2usize, concat!( "Offset of field: ", @@ -7816,6 +8067,8 @@ pub struct TPMS_CONTEXT { } #[test] fn bindgen_test_layout_TPMS_CONTEXT() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 5208usize, @@ -7827,7 +8080,7 @@ fn bindgen_test_layout_TPMS_CONTEXT() { concat!("Alignment of ", stringify!(TPMS_CONTEXT)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).sequence as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).sequence) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -7837,7 +8090,7 @@ fn bindgen_test_layout_TPMS_CONTEXT() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).savedHandle as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).savedHandle) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -7847,7 +8100,7 @@ fn bindgen_test_layout_TPMS_CONTEXT() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).hierarchy as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).hierarchy) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -7857,7 +8110,7 @@ fn bindgen_test_layout_TPMS_CONTEXT() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).contextBlob as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).contextBlob) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -7889,6 +8142,8 @@ pub struct TPMS_CREATION_DATA { } #[test] fn bindgen_test_layout_TPMS_CREATION_DATA() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 408usize, @@ -7900,7 +8155,7 @@ fn bindgen_test_layout_TPMS_CREATION_DATA() { concat!("Alignment of ", stringify!(TPMS_CREATION_DATA)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).pcrSelect as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).pcrSelect) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -7910,7 +8165,7 @@ fn bindgen_test_layout_TPMS_CREATION_DATA() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).pcrDigest as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).pcrDigest) as usize - ptr as usize }, 132usize, concat!( "Offset of field: ", @@ -7920,7 +8175,7 @@ fn bindgen_test_layout_TPMS_CREATION_DATA() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).locality as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).locality) as usize - ptr as usize }, 198usize, concat!( "Offset of field: ", @@ -7930,9 +8185,7 @@ fn bindgen_test_layout_TPMS_CREATION_DATA() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).parentNameAlg as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).parentNameAlg) as usize - ptr as usize }, 200usize, concat!( "Offset of field: ", @@ -7942,7 +8195,7 @@ fn bindgen_test_layout_TPMS_CREATION_DATA() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).parentName as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).parentName) as usize - ptr as usize }, 202usize, concat!( "Offset of field: ", @@ -7952,9 +8205,7 @@ fn bindgen_test_layout_TPMS_CREATION_DATA() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).parentQualifiedName as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).parentQualifiedName) as usize - ptr as usize }, 272usize, concat!( "Offset of field: ", @@ -7964,7 +8215,7 @@ fn bindgen_test_layout_TPMS_CREATION_DATA() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).outsideInfo as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).outsideInfo) as usize - ptr as usize }, 342usize, concat!( "Offset of field: ", @@ -7991,6 +8242,8 @@ pub struct TPM2B_CREATION_DATA { } #[test] fn bindgen_test_layout_TPM2B_CREATION_DATA() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 412usize, @@ -8002,7 +8255,7 @@ fn bindgen_test_layout_TPM2B_CREATION_DATA() { concat!("Alignment of ", stringify!(TPM2B_CREATION_DATA)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).size as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -8012,9 +8265,7 @@ fn bindgen_test_layout_TPM2B_CREATION_DATA() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).creationData as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).creationData) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -8044,6 +8295,8 @@ pub struct TPMS_AC_OUTPUT { } #[test] fn bindgen_test_layout_TPMS_AC_OUTPUT() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, @@ -8055,7 +8308,7 @@ fn bindgen_test_layout_TPMS_AC_OUTPUT() { concat!("Alignment of ", stringify!(TPMS_AC_OUTPUT)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).tag as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).tag) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -8065,7 +8318,7 @@ fn bindgen_test_layout_TPMS_AC_OUTPUT() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).data as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -8083,6 +8336,8 @@ pub struct TPML_AC_CAPABILITIES { } #[test] fn bindgen_test_layout_TPML_AC_CAPABILITIES() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 1028usize, @@ -8094,7 +8349,7 @@ fn bindgen_test_layout_TPML_AC_CAPABILITIES() { concat!("Alignment of ", stringify!(TPML_AC_CAPABILITIES)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).count as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -8104,9 +8359,7 @@ fn bindgen_test_layout_TPML_AC_CAPABILITIES() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).acCapabilities as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).acCapabilities) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -8134,6 +8387,8 @@ pub struct pollfd { } #[test] fn bindgen_test_layout_pollfd() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, @@ -8145,7 +8400,7 @@ fn bindgen_test_layout_pollfd() { concat!("Alignment of ", stringify!(pollfd)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).fd as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).fd) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -8155,7 +8410,7 @@ fn bindgen_test_layout_pollfd() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).events as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).events) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -8165,7 +8420,7 @@ fn bindgen_test_layout_pollfd() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).revents as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).revents) as usize - ptr as usize }, 6usize, concat!( "Offset of field: ", @@ -8247,6 +8502,9 @@ pub struct TSS2_TCTI_CONTEXT_COMMON_V1 { } #[test] fn bindgen_test_layout_TSS2_TCTI_CONTEXT_COMMON_V1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 64usize, @@ -8258,9 +8516,7 @@ fn bindgen_test_layout_TSS2_TCTI_CONTEXT_COMMON_V1() { concat!("Alignment of ", stringify!(TSS2_TCTI_CONTEXT_COMMON_V1)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).magic as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).magic) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -8270,9 +8526,7 @@ fn bindgen_test_layout_TSS2_TCTI_CONTEXT_COMMON_V1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).version as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -8282,9 +8536,7 @@ fn bindgen_test_layout_TSS2_TCTI_CONTEXT_COMMON_V1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).transmit as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).transmit) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -8294,9 +8546,7 @@ fn bindgen_test_layout_TSS2_TCTI_CONTEXT_COMMON_V1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).receive as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).receive) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -8306,9 +8556,7 @@ fn bindgen_test_layout_TSS2_TCTI_CONTEXT_COMMON_V1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).finalize as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).finalize) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -8318,9 +8566,7 @@ fn bindgen_test_layout_TSS2_TCTI_CONTEXT_COMMON_V1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).cancel as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).cancel) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -8330,10 +8576,7 @@ fn bindgen_test_layout_TSS2_TCTI_CONTEXT_COMMON_V1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).getPollHandles as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).getPollHandles) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", @@ -8343,9 +8586,7 @@ fn bindgen_test_layout_TSS2_TCTI_CONTEXT_COMMON_V1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).setLocality as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).setLocality) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", @@ -8363,6 +8604,9 @@ pub struct TSS2_TCTI_CONTEXT_COMMON_V2 { } #[test] fn bindgen_test_layout_TSS2_TCTI_CONTEXT_COMMON_V2() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 72usize, @@ -8374,7 +8618,7 @@ fn bindgen_test_layout_TSS2_TCTI_CONTEXT_COMMON_V2() { concat!("Alignment of ", stringify!(TSS2_TCTI_CONTEXT_COMMON_V2)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).v1 as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).v1) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -8384,9 +8628,7 @@ fn bindgen_test_layout_TSS2_TCTI_CONTEXT_COMMON_V2() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).makeSticky as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).makeSticky) as usize - ptr as usize }, 64usize, concat!( "Offset of field: ", @@ -8408,6 +8650,8 @@ pub struct TSS2_TCTI_INFO { } #[test] fn bindgen_test_layout_TSS2_TCTI_INFO() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 40usize, @@ -8419,7 +8663,7 @@ fn bindgen_test_layout_TSS2_TCTI_INFO() { concat!("Alignment of ", stringify!(TSS2_TCTI_INFO)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).version as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -8429,7 +8673,7 @@ fn bindgen_test_layout_TSS2_TCTI_INFO() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).name as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -8439,7 +8683,7 @@ fn bindgen_test_layout_TSS2_TCTI_INFO() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).description as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).description) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -8449,7 +8693,7 @@ fn bindgen_test_layout_TSS2_TCTI_INFO() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).config_help as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).config_help) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -8459,7 +8703,7 @@ fn bindgen_test_layout_TSS2_TCTI_INFO() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).init as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).init) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -8494,6 +8738,9 @@ pub struct TSS2L_SYS_AUTH_COMMAND { } #[test] fn bindgen_test_layout_TSS2L_SYS_AUTH_COMMAND() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 424usize, @@ -8505,7 +8752,7 @@ fn bindgen_test_layout_TSS2L_SYS_AUTH_COMMAND() { concat!("Alignment of ", stringify!(TSS2L_SYS_AUTH_COMMAND)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).count as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -8515,7 +8762,7 @@ fn bindgen_test_layout_TSS2L_SYS_AUTH_COMMAND() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).auths as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).auths) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -8542,6 +8789,9 @@ pub struct TSS2L_SYS_AUTH_RESPONSE { } #[test] fn bindgen_test_layout_TSS2L_SYS_AUTH_RESPONSE() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 404usize, @@ -8553,7 +8803,7 @@ fn bindgen_test_layout_TSS2L_SYS_AUTH_RESPONSE() { concat!("Alignment of ", stringify!(TSS2L_SYS_AUTH_RESPONSE)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).count as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -8563,7 +8813,7 @@ fn bindgen_test_layout_TSS2L_SYS_AUTH_RESPONSE() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).auths as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).auths) as usize - ptr as usize }, 2usize, concat!( "Offset of field: ", @@ -14545,6 +14795,8 @@ pub struct imaxdiv_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, @@ -14556,7 +14808,7 @@ fn bindgen_test_layout_imaxdiv_t() { concat!("Alignment of ", stringify!(imaxdiv_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).quot as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).quot) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -14566,7 +14818,7 @@ fn bindgen_test_layout_imaxdiv_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).rem as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).rem) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -14636,6 +14888,9 @@ pub struct __darwin_i386_thread_state { } #[test] fn bindgen_test_layout___darwin_i386_thread_state() { + const UNINIT: ::std::mem::MaybeUninit<__darwin_i386_thread_state> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<__darwin_i386_thread_state>(), 64usize, @@ -14647,9 +14902,7 @@ fn bindgen_test_layout___darwin_i386_thread_state() { concat!("Alignment of ", stringify!(__darwin_i386_thread_state)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_thread_state>())).__eax as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__eax) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -14659,9 +14912,7 @@ fn bindgen_test_layout___darwin_i386_thread_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_thread_state>())).__ebx as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__ebx) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -14671,9 +14922,7 @@ fn bindgen_test_layout___darwin_i386_thread_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_thread_state>())).__ecx as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__ecx) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -14683,9 +14932,7 @@ fn bindgen_test_layout___darwin_i386_thread_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_thread_state>())).__edx as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__edx) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -14695,9 +14942,7 @@ fn bindgen_test_layout___darwin_i386_thread_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_thread_state>())).__edi as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__edi) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -14707,9 +14952,7 @@ fn bindgen_test_layout___darwin_i386_thread_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_thread_state>())).__esi as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__esi) as usize - ptr as usize }, 20usize, concat!( "Offset of field: ", @@ -14719,9 +14962,7 @@ fn bindgen_test_layout___darwin_i386_thread_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_thread_state>())).__ebp as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__ebp) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -14731,9 +14972,7 @@ fn bindgen_test_layout___darwin_i386_thread_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_thread_state>())).__esp as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__esp) as usize - ptr as usize }, 28usize, concat!( "Offset of field: ", @@ -14743,7 +14982,7 @@ fn bindgen_test_layout___darwin_i386_thread_state() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_i386_thread_state>())).__ss as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).__ss) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -14753,9 +14992,7 @@ fn bindgen_test_layout___darwin_i386_thread_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_thread_state>())).__eflags as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__eflags) as usize - ptr as usize }, 36usize, concat!( "Offset of field: ", @@ -14765,9 +15002,7 @@ fn bindgen_test_layout___darwin_i386_thread_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_thread_state>())).__eip as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__eip) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -14777,7 +15012,7 @@ fn bindgen_test_layout___darwin_i386_thread_state() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_i386_thread_state>())).__cs as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).__cs) as usize - ptr as usize }, 44usize, concat!( "Offset of field: ", @@ -14787,7 +15022,7 @@ fn bindgen_test_layout___darwin_i386_thread_state() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_i386_thread_state>())).__ds as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).__ds) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", @@ -14797,7 +15032,7 @@ fn bindgen_test_layout___darwin_i386_thread_state() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_i386_thread_state>())).__es as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).__es) as usize - ptr as usize }, 52usize, concat!( "Offset of field: ", @@ -14807,7 +15042,7 @@ fn bindgen_test_layout___darwin_i386_thread_state() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_i386_thread_state>())).__fs as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).__fs) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", @@ -14817,7 +15052,7 @@ fn bindgen_test_layout___darwin_i386_thread_state() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_i386_thread_state>())).__gs as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).__gs) as usize - ptr as usize }, 60usize, concat!( "Offset of field: ", @@ -15245,6 +15480,8 @@ pub struct __darwin_mmst_reg { } #[test] fn bindgen_test_layout___darwin_mmst_reg() { + const UNINIT: ::std::mem::MaybeUninit<__darwin_mmst_reg> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<__darwin_mmst_reg>(), 16usize, @@ -15256,7 +15493,7 @@ fn bindgen_test_layout___darwin_mmst_reg() { concat!("Alignment of ", stringify!(__darwin_mmst_reg)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_mmst_reg>())).__mmst_reg as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).__mmst_reg) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -15266,7 +15503,7 @@ fn bindgen_test_layout___darwin_mmst_reg() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_mmst_reg>())).__mmst_rsrv as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).__mmst_rsrv) as usize - ptr as usize }, 10usize, concat!( "Offset of field: ", @@ -15283,6 +15520,8 @@ pub struct __darwin_xmm_reg { } #[test] fn bindgen_test_layout___darwin_xmm_reg() { + const UNINIT: ::std::mem::MaybeUninit<__darwin_xmm_reg> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<__darwin_xmm_reg>(), 16usize, @@ -15294,7 +15533,7 @@ fn bindgen_test_layout___darwin_xmm_reg() { concat!("Alignment of ", stringify!(__darwin_xmm_reg)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_xmm_reg>())).__xmm_reg as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).__xmm_reg) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -15311,6 +15550,8 @@ pub struct __darwin_ymm_reg { } #[test] fn bindgen_test_layout___darwin_ymm_reg() { + const UNINIT: ::std::mem::MaybeUninit<__darwin_ymm_reg> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<__darwin_ymm_reg>(), 32usize, @@ -15322,7 +15563,7 @@ fn bindgen_test_layout___darwin_ymm_reg() { concat!("Alignment of ", stringify!(__darwin_ymm_reg)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_ymm_reg>())).__ymm_reg as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).__ymm_reg) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -15339,6 +15580,8 @@ pub struct __darwin_zmm_reg { } #[test] fn bindgen_test_layout___darwin_zmm_reg() { + const UNINIT: ::std::mem::MaybeUninit<__darwin_zmm_reg> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<__darwin_zmm_reg>(), 64usize, @@ -15350,7 +15593,7 @@ fn bindgen_test_layout___darwin_zmm_reg() { concat!("Alignment of ", stringify!(__darwin_zmm_reg)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_zmm_reg>())).__zmm_reg as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).__zmm_reg) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -15376,6 +15619,8 @@ pub struct __darwin_opmask_reg { } #[test] fn bindgen_test_layout___darwin_opmask_reg() { + const UNINIT: ::std::mem::MaybeUninit<__darwin_opmask_reg> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<__darwin_opmask_reg>(), 8usize, @@ -15387,9 +15632,7 @@ fn bindgen_test_layout___darwin_opmask_reg() { concat!("Alignment of ", stringify!(__darwin_opmask_reg)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_opmask_reg>())).__opmask_reg as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__opmask_reg) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -15437,6 +15680,9 @@ pub struct __darwin_i386_float_state { } #[test] fn bindgen_test_layout___darwin_i386_float_state() { + const UNINIT: ::std::mem::MaybeUninit<__darwin_i386_float_state> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<__darwin_i386_float_state>(), 524usize, @@ -15448,10 +15694,7 @@ fn bindgen_test_layout___darwin_i386_float_state() { concat!("Alignment of ", stringify!(__darwin_i386_float_state)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_reserved as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_reserved) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -15461,9 +15704,7 @@ fn bindgen_test_layout___darwin_i386_float_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_fcw as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_fcw) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -15473,9 +15714,7 @@ fn bindgen_test_layout___darwin_i386_float_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_fsw as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_fsw) as usize - ptr as usize }, 10usize, concat!( "Offset of field: ", @@ -15485,9 +15724,7 @@ fn bindgen_test_layout___darwin_i386_float_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_ftw as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_ftw) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -15497,9 +15734,7 @@ fn bindgen_test_layout___darwin_i386_float_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_rsrv1 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_rsrv1) as usize - ptr as usize }, 13usize, concat!( "Offset of field: ", @@ -15509,9 +15744,7 @@ fn bindgen_test_layout___darwin_i386_float_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_fop as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_fop) as usize - ptr as usize }, 14usize, concat!( "Offset of field: ", @@ -15521,9 +15754,7 @@ fn bindgen_test_layout___darwin_i386_float_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_ip as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_ip) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -15533,9 +15764,7 @@ fn bindgen_test_layout___darwin_i386_float_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_cs as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_cs) as usize - ptr as usize }, 20usize, concat!( "Offset of field: ", @@ -15545,9 +15774,7 @@ fn bindgen_test_layout___darwin_i386_float_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_rsrv2 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_rsrv2) as usize - ptr as usize }, 22usize, concat!( "Offset of field: ", @@ -15557,9 +15784,7 @@ fn bindgen_test_layout___darwin_i386_float_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_dp as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_dp) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -15569,9 +15794,7 @@ fn bindgen_test_layout___darwin_i386_float_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_ds as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_ds) as usize - ptr as usize }, 28usize, concat!( "Offset of field: ", @@ -15581,9 +15804,7 @@ fn bindgen_test_layout___darwin_i386_float_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_rsrv3 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_rsrv3) as usize - ptr as usize }, 30usize, concat!( "Offset of field: ", @@ -15593,9 +15814,7 @@ fn bindgen_test_layout___darwin_i386_float_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_mxcsr as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_mxcsr) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -15605,10 +15824,7 @@ fn bindgen_test_layout___darwin_i386_float_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_mxcsrmask as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_mxcsrmask) as usize - ptr as usize }, 36usize, concat!( "Offset of field: ", @@ -15618,9 +15834,7 @@ fn bindgen_test_layout___darwin_i386_float_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_stmm0 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_stmm0) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -15630,9 +15844,7 @@ fn bindgen_test_layout___darwin_i386_float_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_stmm1 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_stmm1) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", @@ -15642,9 +15854,7 @@ fn bindgen_test_layout___darwin_i386_float_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_stmm2 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_stmm2) as usize - ptr as usize }, 72usize, concat!( "Offset of field: ", @@ -15654,9 +15864,7 @@ fn bindgen_test_layout___darwin_i386_float_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_stmm3 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_stmm3) as usize - ptr as usize }, 88usize, concat!( "Offset of field: ", @@ -15666,9 +15874,7 @@ fn bindgen_test_layout___darwin_i386_float_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_stmm4 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_stmm4) as usize - ptr as usize }, 104usize, concat!( "Offset of field: ", @@ -15678,9 +15884,7 @@ fn bindgen_test_layout___darwin_i386_float_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_stmm5 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_stmm5) as usize - ptr as usize }, 120usize, concat!( "Offset of field: ", @@ -15690,9 +15894,7 @@ fn bindgen_test_layout___darwin_i386_float_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_stmm6 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_stmm6) as usize - ptr as usize }, 136usize, concat!( "Offset of field: ", @@ -15702,9 +15904,7 @@ fn bindgen_test_layout___darwin_i386_float_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_stmm7 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_stmm7) as usize - ptr as usize }, 152usize, concat!( "Offset of field: ", @@ -15714,9 +15914,7 @@ fn bindgen_test_layout___darwin_i386_float_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_xmm0 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm0) as usize - ptr as usize }, 168usize, concat!( "Offset of field: ", @@ -15726,9 +15924,7 @@ fn bindgen_test_layout___darwin_i386_float_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_xmm1 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm1) as usize - ptr as usize }, 184usize, concat!( "Offset of field: ", @@ -15738,9 +15934,7 @@ fn bindgen_test_layout___darwin_i386_float_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_xmm2 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm2) as usize - ptr as usize }, 200usize, concat!( "Offset of field: ", @@ -15750,9 +15944,7 @@ fn bindgen_test_layout___darwin_i386_float_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_xmm3 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm3) as usize - ptr as usize }, 216usize, concat!( "Offset of field: ", @@ -15762,9 +15954,7 @@ fn bindgen_test_layout___darwin_i386_float_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_xmm4 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm4) as usize - ptr as usize }, 232usize, concat!( "Offset of field: ", @@ -15774,9 +15964,7 @@ fn bindgen_test_layout___darwin_i386_float_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_xmm5 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm5) as usize - ptr as usize }, 248usize, concat!( "Offset of field: ", @@ -15786,9 +15974,7 @@ fn bindgen_test_layout___darwin_i386_float_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_xmm6 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm6) as usize - ptr as usize }, 264usize, concat!( "Offset of field: ", @@ -15798,9 +15984,7 @@ fn bindgen_test_layout___darwin_i386_float_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_xmm7 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm7) as usize - ptr as usize }, 280usize, concat!( "Offset of field: ", @@ -15810,9 +15994,7 @@ fn bindgen_test_layout___darwin_i386_float_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_rsrv4 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_rsrv4) as usize - ptr as usize }, 296usize, concat!( "Offset of field: ", @@ -15822,10 +16004,7 @@ fn bindgen_test_layout___darwin_i386_float_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_reserved1 as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_reserved1) as usize - ptr as usize }, 520usize, concat!( "Offset of field: ", @@ -15891,6 +16070,9 @@ pub struct __darwin_i386_avx_state { } #[test] fn bindgen_test_layout___darwin_i386_avx_state() { + const UNINIT: ::std::mem::MaybeUninit<__darwin_i386_avx_state> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<__darwin_i386_avx_state>(), 716usize, @@ -15902,9 +16084,7 @@ fn bindgen_test_layout___darwin_i386_avx_state() { concat!("Alignment of ", stringify!(__darwin_i386_avx_state)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_reserved as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_reserved) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -15914,9 +16094,7 @@ fn bindgen_test_layout___darwin_i386_avx_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_fcw as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_fcw) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -15926,9 +16104,7 @@ fn bindgen_test_layout___darwin_i386_avx_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_fsw as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_fsw) as usize - ptr as usize }, 10usize, concat!( "Offset of field: ", @@ -15938,9 +16114,7 @@ fn bindgen_test_layout___darwin_i386_avx_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_ftw as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_ftw) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -15950,9 +16124,7 @@ fn bindgen_test_layout___darwin_i386_avx_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_rsrv1 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_rsrv1) as usize - ptr as usize }, 13usize, concat!( "Offset of field: ", @@ -15962,9 +16134,7 @@ fn bindgen_test_layout___darwin_i386_avx_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_fop as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_fop) as usize - ptr as usize }, 14usize, concat!( "Offset of field: ", @@ -15974,9 +16144,7 @@ fn bindgen_test_layout___darwin_i386_avx_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_ip as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_ip) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -15986,9 +16154,7 @@ fn bindgen_test_layout___darwin_i386_avx_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_cs as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_cs) as usize - ptr as usize }, 20usize, concat!( "Offset of field: ", @@ -15998,9 +16164,7 @@ fn bindgen_test_layout___darwin_i386_avx_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_rsrv2 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_rsrv2) as usize - ptr as usize }, 22usize, concat!( "Offset of field: ", @@ -16010,9 +16174,7 @@ fn bindgen_test_layout___darwin_i386_avx_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_dp as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_dp) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -16022,9 +16184,7 @@ fn bindgen_test_layout___darwin_i386_avx_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_ds as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_ds) as usize - ptr as usize }, 28usize, concat!( "Offset of field: ", @@ -16034,9 +16194,7 @@ fn bindgen_test_layout___darwin_i386_avx_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_rsrv3 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_rsrv3) as usize - ptr as usize }, 30usize, concat!( "Offset of field: ", @@ -16046,9 +16204,7 @@ fn bindgen_test_layout___darwin_i386_avx_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_mxcsr as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_mxcsr) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -16058,9 +16214,7 @@ fn bindgen_test_layout___darwin_i386_avx_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_mxcsrmask as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_mxcsrmask) as usize - ptr as usize }, 36usize, concat!( "Offset of field: ", @@ -16070,9 +16224,7 @@ fn bindgen_test_layout___darwin_i386_avx_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_stmm0 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_stmm0) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -16082,9 +16234,7 @@ fn bindgen_test_layout___darwin_i386_avx_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_stmm1 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_stmm1) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", @@ -16094,9 +16244,7 @@ fn bindgen_test_layout___darwin_i386_avx_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_stmm2 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_stmm2) as usize - ptr as usize }, 72usize, concat!( "Offset of field: ", @@ -16106,9 +16254,7 @@ fn bindgen_test_layout___darwin_i386_avx_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_stmm3 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_stmm3) as usize - ptr as usize }, 88usize, concat!( "Offset of field: ", @@ -16118,9 +16264,7 @@ fn bindgen_test_layout___darwin_i386_avx_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_stmm4 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_stmm4) as usize - ptr as usize }, 104usize, concat!( "Offset of field: ", @@ -16130,9 +16274,7 @@ fn bindgen_test_layout___darwin_i386_avx_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_stmm5 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_stmm5) as usize - ptr as usize }, 120usize, concat!( "Offset of field: ", @@ -16142,9 +16284,7 @@ fn bindgen_test_layout___darwin_i386_avx_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_stmm6 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_stmm6) as usize - ptr as usize }, 136usize, concat!( "Offset of field: ", @@ -16154,9 +16294,7 @@ fn bindgen_test_layout___darwin_i386_avx_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_stmm7 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_stmm7) as usize - ptr as usize }, 152usize, concat!( "Offset of field: ", @@ -16166,9 +16304,7 @@ fn bindgen_test_layout___darwin_i386_avx_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_xmm0 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm0) as usize - ptr as usize }, 168usize, concat!( "Offset of field: ", @@ -16178,9 +16314,7 @@ fn bindgen_test_layout___darwin_i386_avx_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_xmm1 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm1) as usize - ptr as usize }, 184usize, concat!( "Offset of field: ", @@ -16190,9 +16324,7 @@ fn bindgen_test_layout___darwin_i386_avx_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_xmm2 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm2) as usize - ptr as usize }, 200usize, concat!( "Offset of field: ", @@ -16202,9 +16334,7 @@ fn bindgen_test_layout___darwin_i386_avx_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_xmm3 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm3) as usize - ptr as usize }, 216usize, concat!( "Offset of field: ", @@ -16214,9 +16344,7 @@ fn bindgen_test_layout___darwin_i386_avx_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_xmm4 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm4) as usize - ptr as usize }, 232usize, concat!( "Offset of field: ", @@ -16226,9 +16354,7 @@ fn bindgen_test_layout___darwin_i386_avx_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_xmm5 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm5) as usize - ptr as usize }, 248usize, concat!( "Offset of field: ", @@ -16238,9 +16364,7 @@ fn bindgen_test_layout___darwin_i386_avx_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_xmm6 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm6) as usize - ptr as usize }, 264usize, concat!( "Offset of field: ", @@ -16250,9 +16374,7 @@ fn bindgen_test_layout___darwin_i386_avx_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_xmm7 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm7) as usize - ptr as usize }, 280usize, concat!( "Offset of field: ", @@ -16262,9 +16384,7 @@ fn bindgen_test_layout___darwin_i386_avx_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_rsrv4 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_rsrv4) as usize - ptr as usize }, 296usize, concat!( "Offset of field: ", @@ -16274,9 +16394,7 @@ fn bindgen_test_layout___darwin_i386_avx_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_reserved1 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_reserved1) as usize - ptr as usize }, 520usize, concat!( "Offset of field: ", @@ -16286,9 +16404,7 @@ fn bindgen_test_layout___darwin_i386_avx_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__avx_reserved1 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__avx_reserved1) as usize - ptr as usize }, 524usize, concat!( "Offset of field: ", @@ -16298,9 +16414,7 @@ fn bindgen_test_layout___darwin_i386_avx_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_ymmh0 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_ymmh0) as usize - ptr as usize }, 588usize, concat!( "Offset of field: ", @@ -16310,9 +16424,7 @@ fn bindgen_test_layout___darwin_i386_avx_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_ymmh1 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_ymmh1) as usize - ptr as usize }, 604usize, concat!( "Offset of field: ", @@ -16322,9 +16434,7 @@ fn bindgen_test_layout___darwin_i386_avx_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_ymmh2 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_ymmh2) as usize - ptr as usize }, 620usize, concat!( "Offset of field: ", @@ -16334,9 +16444,7 @@ fn bindgen_test_layout___darwin_i386_avx_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_ymmh3 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_ymmh3) as usize - ptr as usize }, 636usize, concat!( "Offset of field: ", @@ -16346,9 +16454,7 @@ fn bindgen_test_layout___darwin_i386_avx_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_ymmh4 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_ymmh4) as usize - ptr as usize }, 652usize, concat!( "Offset of field: ", @@ -16358,9 +16464,7 @@ fn bindgen_test_layout___darwin_i386_avx_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_ymmh5 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_ymmh5) as usize - ptr as usize }, 668usize, concat!( "Offset of field: ", @@ -16370,9 +16474,7 @@ fn bindgen_test_layout___darwin_i386_avx_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_ymmh6 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_ymmh6) as usize - ptr as usize }, 684usize, concat!( "Offset of field: ", @@ -16382,9 +16484,7 @@ fn bindgen_test_layout___darwin_i386_avx_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_ymmh7 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_ymmh7) as usize - ptr as usize }, 700usize, concat!( "Offset of field: ", @@ -16466,6 +16566,9 @@ pub struct __darwin_i386_avx512_state { } #[test] fn bindgen_test_layout___darwin_i386_avx512_state() { + const UNINIT: ::std::mem::MaybeUninit<__darwin_i386_avx512_state> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<__darwin_i386_avx512_state>(), 1036usize, @@ -16477,10 +16580,7 @@ fn bindgen_test_layout___darwin_i386_avx512_state() { concat!("Alignment of ", stringify!(__darwin_i386_avx512_state)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_reserved as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_reserved) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -16490,9 +16590,7 @@ fn bindgen_test_layout___darwin_i386_avx512_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_fcw as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_fcw) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -16502,9 +16600,7 @@ fn bindgen_test_layout___darwin_i386_avx512_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_fsw as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_fsw) as usize - ptr as usize }, 10usize, concat!( "Offset of field: ", @@ -16514,9 +16610,7 @@ fn bindgen_test_layout___darwin_i386_avx512_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_ftw as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_ftw) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -16526,9 +16620,7 @@ fn bindgen_test_layout___darwin_i386_avx512_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_rsrv1 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_rsrv1) as usize - ptr as usize }, 13usize, concat!( "Offset of field: ", @@ -16538,9 +16630,7 @@ fn bindgen_test_layout___darwin_i386_avx512_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_fop as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_fop) as usize - ptr as usize }, 14usize, concat!( "Offset of field: ", @@ -16550,9 +16640,7 @@ fn bindgen_test_layout___darwin_i386_avx512_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_ip as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_ip) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -16562,9 +16650,7 @@ fn bindgen_test_layout___darwin_i386_avx512_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_cs as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_cs) as usize - ptr as usize }, 20usize, concat!( "Offset of field: ", @@ -16574,9 +16660,7 @@ fn bindgen_test_layout___darwin_i386_avx512_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_rsrv2 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_rsrv2) as usize - ptr as usize }, 22usize, concat!( "Offset of field: ", @@ -16586,9 +16670,7 @@ fn bindgen_test_layout___darwin_i386_avx512_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_dp as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_dp) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -16598,9 +16680,7 @@ fn bindgen_test_layout___darwin_i386_avx512_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_ds as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_ds) as usize - ptr as usize }, 28usize, concat!( "Offset of field: ", @@ -16610,9 +16690,7 @@ fn bindgen_test_layout___darwin_i386_avx512_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_rsrv3 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_rsrv3) as usize - ptr as usize }, 30usize, concat!( "Offset of field: ", @@ -16622,9 +16700,7 @@ fn bindgen_test_layout___darwin_i386_avx512_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_mxcsr as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_mxcsr) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -16634,10 +16710,7 @@ fn bindgen_test_layout___darwin_i386_avx512_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_mxcsrmask as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_mxcsrmask) as usize - ptr as usize }, 36usize, concat!( "Offset of field: ", @@ -16647,9 +16720,7 @@ fn bindgen_test_layout___darwin_i386_avx512_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_stmm0 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_stmm0) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -16659,9 +16730,7 @@ fn bindgen_test_layout___darwin_i386_avx512_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_stmm1 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_stmm1) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", @@ -16671,9 +16740,7 @@ fn bindgen_test_layout___darwin_i386_avx512_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_stmm2 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_stmm2) as usize - ptr as usize }, 72usize, concat!( "Offset of field: ", @@ -16683,9 +16750,7 @@ fn bindgen_test_layout___darwin_i386_avx512_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_stmm3 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_stmm3) as usize - ptr as usize }, 88usize, concat!( "Offset of field: ", @@ -16695,9 +16760,7 @@ fn bindgen_test_layout___darwin_i386_avx512_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_stmm4 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_stmm4) as usize - ptr as usize }, 104usize, concat!( "Offset of field: ", @@ -16707,9 +16770,7 @@ fn bindgen_test_layout___darwin_i386_avx512_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_stmm5 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_stmm5) as usize - ptr as usize }, 120usize, concat!( "Offset of field: ", @@ -16719,9 +16780,7 @@ fn bindgen_test_layout___darwin_i386_avx512_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_stmm6 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_stmm6) as usize - ptr as usize }, 136usize, concat!( "Offset of field: ", @@ -16731,9 +16790,7 @@ fn bindgen_test_layout___darwin_i386_avx512_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_stmm7 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_stmm7) as usize - ptr as usize }, 152usize, concat!( "Offset of field: ", @@ -16743,9 +16800,7 @@ fn bindgen_test_layout___darwin_i386_avx512_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_xmm0 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm0) as usize - ptr as usize }, 168usize, concat!( "Offset of field: ", @@ -16755,9 +16810,7 @@ fn bindgen_test_layout___darwin_i386_avx512_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_xmm1 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm1) as usize - ptr as usize }, 184usize, concat!( "Offset of field: ", @@ -16767,9 +16820,7 @@ fn bindgen_test_layout___darwin_i386_avx512_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_xmm2 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm2) as usize - ptr as usize }, 200usize, concat!( "Offset of field: ", @@ -16779,9 +16830,7 @@ fn bindgen_test_layout___darwin_i386_avx512_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_xmm3 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm3) as usize - ptr as usize }, 216usize, concat!( "Offset of field: ", @@ -16791,9 +16840,7 @@ fn bindgen_test_layout___darwin_i386_avx512_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_xmm4 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm4) as usize - ptr as usize }, 232usize, concat!( "Offset of field: ", @@ -16803,9 +16850,7 @@ fn bindgen_test_layout___darwin_i386_avx512_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_xmm5 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm5) as usize - ptr as usize }, 248usize, concat!( "Offset of field: ", @@ -16815,9 +16860,7 @@ fn bindgen_test_layout___darwin_i386_avx512_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_xmm6 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm6) as usize - ptr as usize }, 264usize, concat!( "Offset of field: ", @@ -16827,9 +16870,7 @@ fn bindgen_test_layout___darwin_i386_avx512_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_xmm7 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm7) as usize - ptr as usize }, 280usize, concat!( "Offset of field: ", @@ -16839,9 +16880,7 @@ fn bindgen_test_layout___darwin_i386_avx512_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_rsrv4 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_rsrv4) as usize - ptr as usize }, 296usize, concat!( "Offset of field: ", @@ -16851,10 +16890,7 @@ fn bindgen_test_layout___darwin_i386_avx512_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_reserved1 as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_reserved1) as usize - ptr as usize }, 520usize, concat!( "Offset of field: ", @@ -16864,10 +16900,7 @@ fn bindgen_test_layout___darwin_i386_avx512_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__avx_reserved1 as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__avx_reserved1) as usize - ptr as usize }, 524usize, concat!( "Offset of field: ", @@ -16877,9 +16910,7 @@ fn bindgen_test_layout___darwin_i386_avx512_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_ymmh0 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_ymmh0) as usize - ptr as usize }, 588usize, concat!( "Offset of field: ", @@ -16889,9 +16920,7 @@ fn bindgen_test_layout___darwin_i386_avx512_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_ymmh1 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_ymmh1) as usize - ptr as usize }, 604usize, concat!( "Offset of field: ", @@ -16901,9 +16930,7 @@ fn bindgen_test_layout___darwin_i386_avx512_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_ymmh2 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_ymmh2) as usize - ptr as usize }, 620usize, concat!( "Offset of field: ", @@ -16913,9 +16940,7 @@ fn bindgen_test_layout___darwin_i386_avx512_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_ymmh3 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_ymmh3) as usize - ptr as usize }, 636usize, concat!( "Offset of field: ", @@ -16925,9 +16950,7 @@ fn bindgen_test_layout___darwin_i386_avx512_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_ymmh4 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_ymmh4) as usize - ptr as usize }, 652usize, concat!( "Offset of field: ", @@ -16937,9 +16960,7 @@ fn bindgen_test_layout___darwin_i386_avx512_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_ymmh5 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_ymmh5) as usize - ptr as usize }, 668usize, concat!( "Offset of field: ", @@ -16949,9 +16970,7 @@ fn bindgen_test_layout___darwin_i386_avx512_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_ymmh6 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_ymmh6) as usize - ptr as usize }, 684usize, concat!( "Offset of field: ", @@ -16961,9 +16980,7 @@ fn bindgen_test_layout___darwin_i386_avx512_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_ymmh7 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_ymmh7) as usize - ptr as usize }, 700usize, concat!( "Offset of field: ", @@ -16973,9 +16990,7 @@ fn bindgen_test_layout___darwin_i386_avx512_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_k0 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_k0) as usize - ptr as usize }, 716usize, concat!( "Offset of field: ", @@ -16985,9 +17000,7 @@ fn bindgen_test_layout___darwin_i386_avx512_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_k1 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_k1) as usize - ptr as usize }, 724usize, concat!( "Offset of field: ", @@ -16997,9 +17010,7 @@ fn bindgen_test_layout___darwin_i386_avx512_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_k2 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_k2) as usize - ptr as usize }, 732usize, concat!( "Offset of field: ", @@ -17009,9 +17020,7 @@ fn bindgen_test_layout___darwin_i386_avx512_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_k3 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_k3) as usize - ptr as usize }, 740usize, concat!( "Offset of field: ", @@ -17021,9 +17030,7 @@ fn bindgen_test_layout___darwin_i386_avx512_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_k4 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_k4) as usize - ptr as usize }, 748usize, concat!( "Offset of field: ", @@ -17033,9 +17040,7 @@ fn bindgen_test_layout___darwin_i386_avx512_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_k5 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_k5) as usize - ptr as usize }, 756usize, concat!( "Offset of field: ", @@ -17045,9 +17050,7 @@ fn bindgen_test_layout___darwin_i386_avx512_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_k6 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_k6) as usize - ptr as usize }, 764usize, concat!( "Offset of field: ", @@ -17057,9 +17060,7 @@ fn bindgen_test_layout___darwin_i386_avx512_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_k7 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_k7) as usize - ptr as usize }, 772usize, concat!( "Offset of field: ", @@ -17069,9 +17070,7 @@ fn bindgen_test_layout___darwin_i386_avx512_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_zmmh0 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_zmmh0) as usize - ptr as usize }, 780usize, concat!( "Offset of field: ", @@ -17081,9 +17080,7 @@ fn bindgen_test_layout___darwin_i386_avx512_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_zmmh1 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_zmmh1) as usize - ptr as usize }, 812usize, concat!( "Offset of field: ", @@ -17093,9 +17090,7 @@ fn bindgen_test_layout___darwin_i386_avx512_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_zmmh2 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_zmmh2) as usize - ptr as usize }, 844usize, concat!( "Offset of field: ", @@ -17105,9 +17100,7 @@ fn bindgen_test_layout___darwin_i386_avx512_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_zmmh3 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_zmmh3) as usize - ptr as usize }, 876usize, concat!( "Offset of field: ", @@ -17117,9 +17110,7 @@ fn bindgen_test_layout___darwin_i386_avx512_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_zmmh4 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_zmmh4) as usize - ptr as usize }, 908usize, concat!( "Offset of field: ", @@ -17129,9 +17120,7 @@ fn bindgen_test_layout___darwin_i386_avx512_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_zmmh5 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_zmmh5) as usize - ptr as usize }, 940usize, concat!( "Offset of field: ", @@ -17141,9 +17130,7 @@ fn bindgen_test_layout___darwin_i386_avx512_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_zmmh6 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_zmmh6) as usize - ptr as usize }, 972usize, concat!( "Offset of field: ", @@ -17153,9 +17140,7 @@ fn bindgen_test_layout___darwin_i386_avx512_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_zmmh7 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_zmmh7) as usize - ptr as usize }, 1004usize, concat!( "Offset of field: ", @@ -17184,6 +17169,9 @@ pub struct __darwin_i386_exception_state { } #[test] fn bindgen_test_layout___darwin_i386_exception_state() { + const UNINIT: ::std::mem::MaybeUninit<__darwin_i386_exception_state> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<__darwin_i386_exception_state>(), 12usize, @@ -17195,9 +17183,7 @@ fn bindgen_test_layout___darwin_i386_exception_state() { concat!("Alignment of ", stringify!(__darwin_i386_exception_state)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_exception_state>())).__trapno as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__trapno) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -17207,9 +17193,7 @@ fn bindgen_test_layout___darwin_i386_exception_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_exception_state>())).__cpu as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__cpu) as usize - ptr as usize }, 2usize, concat!( "Offset of field: ", @@ -17219,9 +17203,7 @@ fn bindgen_test_layout___darwin_i386_exception_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_exception_state>())).__err as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__err) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -17231,10 +17213,7 @@ fn bindgen_test_layout___darwin_i386_exception_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_exception_state>())).__faultvaddr as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__faultvaddr) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -17258,6 +17237,9 @@ pub struct __darwin_x86_debug_state32 { } #[test] fn bindgen_test_layout___darwin_x86_debug_state32() { + const UNINIT: ::std::mem::MaybeUninit<__darwin_x86_debug_state32> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<__darwin_x86_debug_state32>(), 32usize, @@ -17269,9 +17251,7 @@ fn bindgen_test_layout___darwin_x86_debug_state32() { concat!("Alignment of ", stringify!(__darwin_x86_debug_state32)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_debug_state32>())).__dr0 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__dr0) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -17281,9 +17261,7 @@ fn bindgen_test_layout___darwin_x86_debug_state32() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_debug_state32>())).__dr1 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__dr1) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -17293,9 +17271,7 @@ fn bindgen_test_layout___darwin_x86_debug_state32() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_debug_state32>())).__dr2 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__dr2) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -17305,9 +17281,7 @@ fn bindgen_test_layout___darwin_x86_debug_state32() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_debug_state32>())).__dr3 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__dr3) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -17317,9 +17291,7 @@ fn bindgen_test_layout___darwin_x86_debug_state32() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_debug_state32>())).__dr4 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__dr4) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -17329,9 +17301,7 @@ fn bindgen_test_layout___darwin_x86_debug_state32() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_debug_state32>())).__dr5 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__dr5) as usize - ptr as usize }, 20usize, concat!( "Offset of field: ", @@ -17341,9 +17311,7 @@ fn bindgen_test_layout___darwin_x86_debug_state32() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_debug_state32>())).__dr6 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__dr6) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -17353,9 +17321,7 @@ fn bindgen_test_layout___darwin_x86_debug_state32() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_debug_state32>())).__dr7 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__dr7) as usize - ptr as usize }, 28usize, concat!( "Offset of field: ", @@ -17376,6 +17342,9 @@ pub struct __x86_instruction_state { } #[test] fn bindgen_test_layout___x86_instruction_state() { + const UNINIT: ::std::mem::MaybeUninit<__x86_instruction_state> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<__x86_instruction_state>(), 2456usize, @@ -17387,10 +17356,7 @@ fn bindgen_test_layout___x86_instruction_state() { concat!("Alignment of ", stringify!(__x86_instruction_state)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__x86_instruction_state>())).__insn_stream_valid_bytes - as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__insn_stream_valid_bytes) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -17400,9 +17366,7 @@ fn bindgen_test_layout___x86_instruction_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__x86_instruction_state>())).__insn_offset as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__insn_offset) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -17412,9 +17376,7 @@ fn bindgen_test_layout___x86_instruction_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__x86_instruction_state>())).__out_of_synch as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__out_of_synch) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -17424,9 +17386,7 @@ fn bindgen_test_layout___x86_instruction_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__x86_instruction_state>())).__insn_bytes as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__insn_bytes) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -17436,10 +17396,7 @@ fn bindgen_test_layout___x86_instruction_state() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__x86_instruction_state>())).__insn_cacheline as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__insn_cacheline) as usize - ptr as usize }, 2392usize, concat!( "Offset of field: ", @@ -17469,6 +17426,8 @@ pub struct __last_branch_record { } #[test] fn bindgen_test_layout___last_branch_record() { + const UNINIT: ::std::mem::MaybeUninit<__last_branch_record> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<__last_branch_record>(), 24usize, @@ -17480,7 +17439,7 @@ fn bindgen_test_layout___last_branch_record() { concat!("Alignment of ", stringify!(__last_branch_record)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__last_branch_record>())).__from_ip as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).__from_ip) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -17490,7 +17449,7 @@ fn bindgen_test_layout___last_branch_record() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__last_branch_record>())).__to_ip as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).__to_ip) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -17598,6 +17557,8 @@ pub struct __last_branch_state { } #[test] fn bindgen_test_layout___last_branch_state() { + const UNINIT: ::std::mem::MaybeUninit<__last_branch_state> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<__last_branch_state>(), 776usize, @@ -17609,7 +17570,7 @@ fn bindgen_test_layout___last_branch_state() { concat!("Alignment of ", stringify!(__last_branch_state)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__last_branch_state>())).__lbr_count as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).__lbr_count) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -17619,7 +17580,7 @@ fn bindgen_test_layout___last_branch_state() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__last_branch_state>())).__lbrs as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).__lbrs) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -17693,6 +17654,8 @@ pub struct __x86_pagein_state { } #[test] fn bindgen_test_layout___x86_pagein_state() { + const UNINIT: ::std::mem::MaybeUninit<__x86_pagein_state> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<__x86_pagein_state>(), 4usize, @@ -17704,9 +17667,7 @@ fn bindgen_test_layout___x86_pagein_state() { concat!("Alignment of ", stringify!(__x86_pagein_state)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__x86_pagein_state>())).__pagein_error as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__pagein_error) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -17743,6 +17704,9 @@ pub struct __darwin_x86_thread_state64 { } #[test] fn bindgen_test_layout___darwin_x86_thread_state64() { + const UNINIT: ::std::mem::MaybeUninit<__darwin_x86_thread_state64> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<__darwin_x86_thread_state64>(), 168usize, @@ -17754,9 +17718,7 @@ fn bindgen_test_layout___darwin_x86_thread_state64() { concat!("Alignment of ", stringify!(__darwin_x86_thread_state64)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__rax as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__rax) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -17766,9 +17728,7 @@ fn bindgen_test_layout___darwin_x86_thread_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__rbx as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__rbx) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -17778,9 +17738,7 @@ fn bindgen_test_layout___darwin_x86_thread_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__rcx as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__rcx) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -17790,9 +17748,7 @@ fn bindgen_test_layout___darwin_x86_thread_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__rdx as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__rdx) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -17802,9 +17758,7 @@ fn bindgen_test_layout___darwin_x86_thread_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__rdi as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__rdi) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -17814,9 +17768,7 @@ fn bindgen_test_layout___darwin_x86_thread_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__rsi as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__rsi) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -17826,9 +17778,7 @@ fn bindgen_test_layout___darwin_x86_thread_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__rbp as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__rbp) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", @@ -17838,9 +17788,7 @@ fn bindgen_test_layout___darwin_x86_thread_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__rsp as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__rsp) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", @@ -17850,9 +17798,7 @@ fn bindgen_test_layout___darwin_x86_thread_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__r8 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__r8) as usize - ptr as usize }, 64usize, concat!( "Offset of field: ", @@ -17862,9 +17808,7 @@ fn bindgen_test_layout___darwin_x86_thread_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__r9 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__r9) as usize - ptr as usize }, 72usize, concat!( "Offset of field: ", @@ -17874,9 +17818,7 @@ fn bindgen_test_layout___darwin_x86_thread_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__r10 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__r10) as usize - ptr as usize }, 80usize, concat!( "Offset of field: ", @@ -17886,9 +17828,7 @@ fn bindgen_test_layout___darwin_x86_thread_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__r11 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__r11) as usize - ptr as usize }, 88usize, concat!( "Offset of field: ", @@ -17898,9 +17838,7 @@ fn bindgen_test_layout___darwin_x86_thread_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__r12 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__r12) as usize - ptr as usize }, 96usize, concat!( "Offset of field: ", @@ -17910,9 +17848,7 @@ fn bindgen_test_layout___darwin_x86_thread_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__r13 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__r13) as usize - ptr as usize }, 104usize, concat!( "Offset of field: ", @@ -17922,9 +17858,7 @@ fn bindgen_test_layout___darwin_x86_thread_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__r14 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__r14) as usize - ptr as usize }, 112usize, concat!( "Offset of field: ", @@ -17934,9 +17868,7 @@ fn bindgen_test_layout___darwin_x86_thread_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__r15 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__r15) as usize - ptr as usize }, 120usize, concat!( "Offset of field: ", @@ -17946,9 +17878,7 @@ fn bindgen_test_layout___darwin_x86_thread_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__rip as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__rip) as usize - ptr as usize }, 128usize, concat!( "Offset of field: ", @@ -17958,9 +17888,7 @@ fn bindgen_test_layout___darwin_x86_thread_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__rflags as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__rflags) as usize - ptr as usize }, 136usize, concat!( "Offset of field: ", @@ -17970,9 +17898,7 @@ fn bindgen_test_layout___darwin_x86_thread_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__cs as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__cs) as usize - ptr as usize }, 144usize, concat!( "Offset of field: ", @@ -17982,9 +17908,7 @@ fn bindgen_test_layout___darwin_x86_thread_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__fs as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fs) as usize - ptr as usize }, 152usize, concat!( "Offset of field: ", @@ -17994,9 +17918,7 @@ fn bindgen_test_layout___darwin_x86_thread_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__gs as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__gs) as usize - ptr as usize }, 160usize, concat!( "Offset of field: ", @@ -18017,6 +17939,9 @@ pub struct __darwin_x86_thread_full_state64 { } #[test] fn bindgen_test_layout___darwin_x86_thread_full_state64() { + const UNINIT: ::std::mem::MaybeUninit<__darwin_x86_thread_full_state64> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<__darwin_x86_thread_full_state64>(), 200usize, @@ -18031,9 +17956,7 @@ fn bindgen_test_layout___darwin_x86_thread_full_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_full_state64>())).__ss64 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__ss64) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -18043,9 +17966,7 @@ fn bindgen_test_layout___darwin_x86_thread_full_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_full_state64>())).__ds as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__ds) as usize - ptr as usize }, 168usize, concat!( "Offset of field: ", @@ -18055,9 +17976,7 @@ fn bindgen_test_layout___darwin_x86_thread_full_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_full_state64>())).__es as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__es) as usize - ptr as usize }, 176usize, concat!( "Offset of field: ", @@ -18067,9 +17986,7 @@ fn bindgen_test_layout___darwin_x86_thread_full_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_full_state64>())).__ss as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__ss) as usize - ptr as usize }, 184usize, concat!( "Offset of field: ", @@ -18079,10 +17996,7 @@ fn bindgen_test_layout___darwin_x86_thread_full_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_full_state64>())).__gsbase as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__gsbase) as usize - ptr as usize }, 192usize, concat!( "Offset of field: ", @@ -18138,6 +18052,9 @@ pub struct __darwin_x86_float_state64 { } #[test] fn bindgen_test_layout___darwin_x86_float_state64() { + const UNINIT: ::std::mem::MaybeUninit<__darwin_x86_float_state64> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<__darwin_x86_float_state64>(), 524usize, @@ -18149,10 +18066,7 @@ fn bindgen_test_layout___darwin_x86_float_state64() { concat!("Alignment of ", stringify!(__darwin_x86_float_state64)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_reserved as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_reserved) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -18162,9 +18076,7 @@ fn bindgen_test_layout___darwin_x86_float_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_fcw as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_fcw) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -18174,9 +18086,7 @@ fn bindgen_test_layout___darwin_x86_float_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_fsw as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_fsw) as usize - ptr as usize }, 10usize, concat!( "Offset of field: ", @@ -18186,9 +18096,7 @@ fn bindgen_test_layout___darwin_x86_float_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_ftw as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_ftw) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -18198,9 +18106,7 @@ fn bindgen_test_layout___darwin_x86_float_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_rsrv1 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_rsrv1) as usize - ptr as usize }, 13usize, concat!( "Offset of field: ", @@ -18210,9 +18116,7 @@ fn bindgen_test_layout___darwin_x86_float_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_fop as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_fop) as usize - ptr as usize }, 14usize, concat!( "Offset of field: ", @@ -18222,9 +18126,7 @@ fn bindgen_test_layout___darwin_x86_float_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_ip as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_ip) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -18234,9 +18136,7 @@ fn bindgen_test_layout___darwin_x86_float_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_cs as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_cs) as usize - ptr as usize }, 20usize, concat!( "Offset of field: ", @@ -18246,9 +18146,7 @@ fn bindgen_test_layout___darwin_x86_float_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_rsrv2 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_rsrv2) as usize - ptr as usize }, 22usize, concat!( "Offset of field: ", @@ -18258,9 +18156,7 @@ fn bindgen_test_layout___darwin_x86_float_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_dp as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_dp) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -18270,9 +18166,7 @@ fn bindgen_test_layout___darwin_x86_float_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_ds as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_ds) as usize - ptr as usize }, 28usize, concat!( "Offset of field: ", @@ -18282,9 +18176,7 @@ fn bindgen_test_layout___darwin_x86_float_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_rsrv3 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_rsrv3) as usize - ptr as usize }, 30usize, concat!( "Offset of field: ", @@ -18294,9 +18186,7 @@ fn bindgen_test_layout___darwin_x86_float_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_mxcsr as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_mxcsr) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -18306,10 +18196,7 @@ fn bindgen_test_layout___darwin_x86_float_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_mxcsrmask as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_mxcsrmask) as usize - ptr as usize }, 36usize, concat!( "Offset of field: ", @@ -18319,9 +18206,7 @@ fn bindgen_test_layout___darwin_x86_float_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_stmm0 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_stmm0) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -18331,9 +18216,7 @@ fn bindgen_test_layout___darwin_x86_float_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_stmm1 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_stmm1) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", @@ -18343,9 +18226,7 @@ fn bindgen_test_layout___darwin_x86_float_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_stmm2 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_stmm2) as usize - ptr as usize }, 72usize, concat!( "Offset of field: ", @@ -18355,9 +18236,7 @@ fn bindgen_test_layout___darwin_x86_float_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_stmm3 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_stmm3) as usize - ptr as usize }, 88usize, concat!( "Offset of field: ", @@ -18367,9 +18246,7 @@ fn bindgen_test_layout___darwin_x86_float_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_stmm4 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_stmm4) as usize - ptr as usize }, 104usize, concat!( "Offset of field: ", @@ -18379,9 +18256,7 @@ fn bindgen_test_layout___darwin_x86_float_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_stmm5 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_stmm5) as usize - ptr as usize }, 120usize, concat!( "Offset of field: ", @@ -18391,9 +18266,7 @@ fn bindgen_test_layout___darwin_x86_float_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_stmm6 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_stmm6) as usize - ptr as usize }, 136usize, concat!( "Offset of field: ", @@ -18403,9 +18276,7 @@ fn bindgen_test_layout___darwin_x86_float_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_stmm7 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_stmm7) as usize - ptr as usize }, 152usize, concat!( "Offset of field: ", @@ -18415,9 +18286,7 @@ fn bindgen_test_layout___darwin_x86_float_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm0 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm0) as usize - ptr as usize }, 168usize, concat!( "Offset of field: ", @@ -18427,9 +18296,7 @@ fn bindgen_test_layout___darwin_x86_float_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm1 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm1) as usize - ptr as usize }, 184usize, concat!( "Offset of field: ", @@ -18439,9 +18306,7 @@ fn bindgen_test_layout___darwin_x86_float_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm2 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm2) as usize - ptr as usize }, 200usize, concat!( "Offset of field: ", @@ -18451,9 +18316,7 @@ fn bindgen_test_layout___darwin_x86_float_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm3 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm3) as usize - ptr as usize }, 216usize, concat!( "Offset of field: ", @@ -18463,9 +18326,7 @@ fn bindgen_test_layout___darwin_x86_float_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm4 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm4) as usize - ptr as usize }, 232usize, concat!( "Offset of field: ", @@ -18475,9 +18336,7 @@ fn bindgen_test_layout___darwin_x86_float_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm5 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm5) as usize - ptr as usize }, 248usize, concat!( "Offset of field: ", @@ -18487,9 +18346,7 @@ fn bindgen_test_layout___darwin_x86_float_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm6 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm6) as usize - ptr as usize }, 264usize, concat!( "Offset of field: ", @@ -18499,9 +18356,7 @@ fn bindgen_test_layout___darwin_x86_float_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm7 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm7) as usize - ptr as usize }, 280usize, concat!( "Offset of field: ", @@ -18511,9 +18366,7 @@ fn bindgen_test_layout___darwin_x86_float_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm8 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm8) as usize - ptr as usize }, 296usize, concat!( "Offset of field: ", @@ -18523,9 +18376,7 @@ fn bindgen_test_layout___darwin_x86_float_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm9 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm9) as usize - ptr as usize }, 312usize, concat!( "Offset of field: ", @@ -18535,9 +18386,7 @@ fn bindgen_test_layout___darwin_x86_float_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm10 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm10) as usize - ptr as usize }, 328usize, concat!( "Offset of field: ", @@ -18547,9 +18396,7 @@ fn bindgen_test_layout___darwin_x86_float_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm11 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm11) as usize - ptr as usize }, 344usize, concat!( "Offset of field: ", @@ -18559,9 +18406,7 @@ fn bindgen_test_layout___darwin_x86_float_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm12 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm12) as usize - ptr as usize }, 360usize, concat!( "Offset of field: ", @@ -18571,9 +18416,7 @@ fn bindgen_test_layout___darwin_x86_float_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm13 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm13) as usize - ptr as usize }, 376usize, concat!( "Offset of field: ", @@ -18583,9 +18426,7 @@ fn bindgen_test_layout___darwin_x86_float_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm14 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm14) as usize - ptr as usize }, 392usize, concat!( "Offset of field: ", @@ -18595,9 +18436,7 @@ fn bindgen_test_layout___darwin_x86_float_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm15 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm15) as usize - ptr as usize }, 408usize, concat!( "Offset of field: ", @@ -18607,9 +18446,7 @@ fn bindgen_test_layout___darwin_x86_float_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_rsrv4 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_rsrv4) as usize - ptr as usize }, 424usize, concat!( "Offset of field: ", @@ -18619,10 +18456,7 @@ fn bindgen_test_layout___darwin_x86_float_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_reserved1 as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_reserved1) as usize - ptr as usize }, 520usize, concat!( "Offset of field: ", @@ -18704,6 +18538,9 @@ pub struct __darwin_x86_avx_state64 { } #[test] fn bindgen_test_layout___darwin_x86_avx_state64() { + const UNINIT: ::std::mem::MaybeUninit<__darwin_x86_avx_state64> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<__darwin_x86_avx_state64>(), 844usize, @@ -18715,9 +18552,7 @@ fn bindgen_test_layout___darwin_x86_avx_state64() { concat!("Alignment of ", stringify!(__darwin_x86_avx_state64)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_reserved as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_reserved) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -18727,9 +18562,7 @@ fn bindgen_test_layout___darwin_x86_avx_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_fcw as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_fcw) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -18739,9 +18572,7 @@ fn bindgen_test_layout___darwin_x86_avx_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_fsw as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_fsw) as usize - ptr as usize }, 10usize, concat!( "Offset of field: ", @@ -18751,9 +18582,7 @@ fn bindgen_test_layout___darwin_x86_avx_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ftw as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_ftw) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -18763,9 +18592,7 @@ fn bindgen_test_layout___darwin_x86_avx_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_rsrv1 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_rsrv1) as usize - ptr as usize }, 13usize, concat!( "Offset of field: ", @@ -18775,9 +18602,7 @@ fn bindgen_test_layout___darwin_x86_avx_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_fop as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_fop) as usize - ptr as usize }, 14usize, concat!( "Offset of field: ", @@ -18787,9 +18612,7 @@ fn bindgen_test_layout___darwin_x86_avx_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ip as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_ip) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -18799,9 +18622,7 @@ fn bindgen_test_layout___darwin_x86_avx_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_cs as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_cs) as usize - ptr as usize }, 20usize, concat!( "Offset of field: ", @@ -18811,9 +18632,7 @@ fn bindgen_test_layout___darwin_x86_avx_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_rsrv2 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_rsrv2) as usize - ptr as usize }, 22usize, concat!( "Offset of field: ", @@ -18823,9 +18642,7 @@ fn bindgen_test_layout___darwin_x86_avx_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_dp as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_dp) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -18835,9 +18652,7 @@ fn bindgen_test_layout___darwin_x86_avx_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ds as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_ds) as usize - ptr as usize }, 28usize, concat!( "Offset of field: ", @@ -18847,9 +18662,7 @@ fn bindgen_test_layout___darwin_x86_avx_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_rsrv3 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_rsrv3) as usize - ptr as usize }, 30usize, concat!( "Offset of field: ", @@ -18859,9 +18672,7 @@ fn bindgen_test_layout___darwin_x86_avx_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_mxcsr as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_mxcsr) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -18871,10 +18682,7 @@ fn bindgen_test_layout___darwin_x86_avx_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_mxcsrmask as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_mxcsrmask) as usize - ptr as usize }, 36usize, concat!( "Offset of field: ", @@ -18884,9 +18692,7 @@ fn bindgen_test_layout___darwin_x86_avx_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_stmm0 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_stmm0) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -18896,9 +18702,7 @@ fn bindgen_test_layout___darwin_x86_avx_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_stmm1 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_stmm1) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", @@ -18908,9 +18712,7 @@ fn bindgen_test_layout___darwin_x86_avx_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_stmm2 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_stmm2) as usize - ptr as usize }, 72usize, concat!( "Offset of field: ", @@ -18920,9 +18722,7 @@ fn bindgen_test_layout___darwin_x86_avx_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_stmm3 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_stmm3) as usize - ptr as usize }, 88usize, concat!( "Offset of field: ", @@ -18932,9 +18732,7 @@ fn bindgen_test_layout___darwin_x86_avx_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_stmm4 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_stmm4) as usize - ptr as usize }, 104usize, concat!( "Offset of field: ", @@ -18944,9 +18742,7 @@ fn bindgen_test_layout___darwin_x86_avx_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_stmm5 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_stmm5) as usize - ptr as usize }, 120usize, concat!( "Offset of field: ", @@ -18956,9 +18752,7 @@ fn bindgen_test_layout___darwin_x86_avx_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_stmm6 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_stmm6) as usize - ptr as usize }, 136usize, concat!( "Offset of field: ", @@ -18968,9 +18762,7 @@ fn bindgen_test_layout___darwin_x86_avx_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_stmm7 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_stmm7) as usize - ptr as usize }, 152usize, concat!( "Offset of field: ", @@ -18980,9 +18772,7 @@ fn bindgen_test_layout___darwin_x86_avx_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm0 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm0) as usize - ptr as usize }, 168usize, concat!( "Offset of field: ", @@ -18992,9 +18782,7 @@ fn bindgen_test_layout___darwin_x86_avx_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm1 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm1) as usize - ptr as usize }, 184usize, concat!( "Offset of field: ", @@ -19004,9 +18792,7 @@ fn bindgen_test_layout___darwin_x86_avx_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm2 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm2) as usize - ptr as usize }, 200usize, concat!( "Offset of field: ", @@ -19016,9 +18802,7 @@ fn bindgen_test_layout___darwin_x86_avx_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm3 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm3) as usize - ptr as usize }, 216usize, concat!( "Offset of field: ", @@ -19028,9 +18812,7 @@ fn bindgen_test_layout___darwin_x86_avx_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm4 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm4) as usize - ptr as usize }, 232usize, concat!( "Offset of field: ", @@ -19040,9 +18822,7 @@ fn bindgen_test_layout___darwin_x86_avx_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm5 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm5) as usize - ptr as usize }, 248usize, concat!( "Offset of field: ", @@ -19052,9 +18832,7 @@ fn bindgen_test_layout___darwin_x86_avx_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm6 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm6) as usize - ptr as usize }, 264usize, concat!( "Offset of field: ", @@ -19064,9 +18842,7 @@ fn bindgen_test_layout___darwin_x86_avx_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm7 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm7) as usize - ptr as usize }, 280usize, concat!( "Offset of field: ", @@ -19076,9 +18852,7 @@ fn bindgen_test_layout___darwin_x86_avx_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm8 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm8) as usize - ptr as usize }, 296usize, concat!( "Offset of field: ", @@ -19088,9 +18862,7 @@ fn bindgen_test_layout___darwin_x86_avx_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm9 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm9) as usize - ptr as usize }, 312usize, concat!( "Offset of field: ", @@ -19100,9 +18872,7 @@ fn bindgen_test_layout___darwin_x86_avx_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm10 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm10) as usize - ptr as usize }, 328usize, concat!( "Offset of field: ", @@ -19112,9 +18882,7 @@ fn bindgen_test_layout___darwin_x86_avx_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm11 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm11) as usize - ptr as usize }, 344usize, concat!( "Offset of field: ", @@ -19124,9 +18892,7 @@ fn bindgen_test_layout___darwin_x86_avx_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm12 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm12) as usize - ptr as usize }, 360usize, concat!( "Offset of field: ", @@ -19136,9 +18902,7 @@ fn bindgen_test_layout___darwin_x86_avx_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm13 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm13) as usize - ptr as usize }, 376usize, concat!( "Offset of field: ", @@ -19148,9 +18912,7 @@ fn bindgen_test_layout___darwin_x86_avx_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm14 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm14) as usize - ptr as usize }, 392usize, concat!( "Offset of field: ", @@ -19160,9 +18922,7 @@ fn bindgen_test_layout___darwin_x86_avx_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm15 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm15) as usize - ptr as usize }, 408usize, concat!( "Offset of field: ", @@ -19172,9 +18932,7 @@ fn bindgen_test_layout___darwin_x86_avx_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_rsrv4 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_rsrv4) as usize - ptr as usize }, 424usize, concat!( "Offset of field: ", @@ -19184,10 +18942,7 @@ fn bindgen_test_layout___darwin_x86_avx_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_reserved1 as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_reserved1) as usize - ptr as usize }, 520usize, concat!( "Offset of field: ", @@ -19197,10 +18952,7 @@ fn bindgen_test_layout___darwin_x86_avx_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__avx_reserved1 as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__avx_reserved1) as usize - ptr as usize }, 524usize, concat!( "Offset of field: ", @@ -19210,9 +18962,7 @@ fn bindgen_test_layout___darwin_x86_avx_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh0 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_ymmh0) as usize - ptr as usize }, 588usize, concat!( "Offset of field: ", @@ -19222,9 +18972,7 @@ fn bindgen_test_layout___darwin_x86_avx_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh1 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_ymmh1) as usize - ptr as usize }, 604usize, concat!( "Offset of field: ", @@ -19234,9 +18982,7 @@ fn bindgen_test_layout___darwin_x86_avx_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh2 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_ymmh2) as usize - ptr as usize }, 620usize, concat!( "Offset of field: ", @@ -19246,9 +18992,7 @@ fn bindgen_test_layout___darwin_x86_avx_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh3 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_ymmh3) as usize - ptr as usize }, 636usize, concat!( "Offset of field: ", @@ -19258,9 +19002,7 @@ fn bindgen_test_layout___darwin_x86_avx_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh4 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_ymmh4) as usize - ptr as usize }, 652usize, concat!( "Offset of field: ", @@ -19270,9 +19012,7 @@ fn bindgen_test_layout___darwin_x86_avx_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh5 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_ymmh5) as usize - ptr as usize }, 668usize, concat!( "Offset of field: ", @@ -19282,9 +19022,7 @@ fn bindgen_test_layout___darwin_x86_avx_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh6 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_ymmh6) as usize - ptr as usize }, 684usize, concat!( "Offset of field: ", @@ -19294,9 +19032,7 @@ fn bindgen_test_layout___darwin_x86_avx_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh7 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_ymmh7) as usize - ptr as usize }, 700usize, concat!( "Offset of field: ", @@ -19306,9 +19042,7 @@ fn bindgen_test_layout___darwin_x86_avx_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh8 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_ymmh8) as usize - ptr as usize }, 716usize, concat!( "Offset of field: ", @@ -19318,9 +19052,7 @@ fn bindgen_test_layout___darwin_x86_avx_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh9 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_ymmh9) as usize - ptr as usize }, 732usize, concat!( "Offset of field: ", @@ -19330,9 +19062,7 @@ fn bindgen_test_layout___darwin_x86_avx_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh10 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_ymmh10) as usize - ptr as usize }, 748usize, concat!( "Offset of field: ", @@ -19342,9 +19072,7 @@ fn bindgen_test_layout___darwin_x86_avx_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh11 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_ymmh11) as usize - ptr as usize }, 764usize, concat!( "Offset of field: ", @@ -19354,9 +19082,7 @@ fn bindgen_test_layout___darwin_x86_avx_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh12 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_ymmh12) as usize - ptr as usize }, 780usize, concat!( "Offset of field: ", @@ -19366,9 +19092,7 @@ fn bindgen_test_layout___darwin_x86_avx_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh13 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_ymmh13) as usize - ptr as usize }, 796usize, concat!( "Offset of field: ", @@ -19378,9 +19102,7 @@ fn bindgen_test_layout___darwin_x86_avx_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh14 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_ymmh14) as usize - ptr as usize }, 812usize, concat!( "Offset of field: ", @@ -19390,9 +19112,7 @@ fn bindgen_test_layout___darwin_x86_avx_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh15 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_ymmh15) as usize - ptr as usize }, 828usize, concat!( "Offset of field: ", @@ -19514,6 +19234,9 @@ pub struct __darwin_x86_avx512_state64 { } #[test] fn bindgen_test_layout___darwin_x86_avx512_state64() { + const UNINIT: ::std::mem::MaybeUninit<__darwin_x86_avx512_state64> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<__darwin_x86_avx512_state64>(), 2444usize, @@ -19525,10 +19248,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { concat!("Alignment of ", stringify!(__darwin_x86_avx512_state64)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_reserved as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_reserved) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -19538,9 +19258,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_fcw as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_fcw) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -19550,9 +19268,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_fsw as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_fsw) as usize - ptr as usize }, 10usize, concat!( "Offset of field: ", @@ -19562,9 +19278,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ftw as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_ftw) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -19574,9 +19288,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_rsrv1 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_rsrv1) as usize - ptr as usize }, 13usize, concat!( "Offset of field: ", @@ -19586,9 +19298,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_fop as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_fop) as usize - ptr as usize }, 14usize, concat!( "Offset of field: ", @@ -19598,9 +19308,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ip as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_ip) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -19610,9 +19318,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_cs as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_cs) as usize - ptr as usize }, 20usize, concat!( "Offset of field: ", @@ -19622,9 +19328,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_rsrv2 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_rsrv2) as usize - ptr as usize }, 22usize, concat!( "Offset of field: ", @@ -19634,9 +19338,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_dp as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_dp) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -19646,9 +19348,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ds as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_ds) as usize - ptr as usize }, 28usize, concat!( "Offset of field: ", @@ -19658,9 +19358,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_rsrv3 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_rsrv3) as usize - ptr as usize }, 30usize, concat!( "Offset of field: ", @@ -19670,9 +19368,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_mxcsr as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_mxcsr) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -19682,10 +19378,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_mxcsrmask as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_mxcsrmask) as usize - ptr as usize }, 36usize, concat!( "Offset of field: ", @@ -19695,9 +19388,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_stmm0 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_stmm0) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -19707,9 +19398,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_stmm1 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_stmm1) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", @@ -19719,9 +19408,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_stmm2 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_stmm2) as usize - ptr as usize }, 72usize, concat!( "Offset of field: ", @@ -19731,9 +19418,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_stmm3 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_stmm3) as usize - ptr as usize }, 88usize, concat!( "Offset of field: ", @@ -19743,9 +19428,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_stmm4 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_stmm4) as usize - ptr as usize }, 104usize, concat!( "Offset of field: ", @@ -19755,9 +19438,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_stmm5 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_stmm5) as usize - ptr as usize }, 120usize, concat!( "Offset of field: ", @@ -19767,9 +19448,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_stmm6 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_stmm6) as usize - ptr as usize }, 136usize, concat!( "Offset of field: ", @@ -19779,9 +19458,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_stmm7 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_stmm7) as usize - ptr as usize }, 152usize, concat!( "Offset of field: ", @@ -19791,9 +19468,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm0 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm0) as usize - ptr as usize }, 168usize, concat!( "Offset of field: ", @@ -19803,9 +19478,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm1 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm1) as usize - ptr as usize }, 184usize, concat!( "Offset of field: ", @@ -19815,9 +19488,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm2 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm2) as usize - ptr as usize }, 200usize, concat!( "Offset of field: ", @@ -19827,9 +19498,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm3 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm3) as usize - ptr as usize }, 216usize, concat!( "Offset of field: ", @@ -19839,9 +19508,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm4 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm4) as usize - ptr as usize }, 232usize, concat!( "Offset of field: ", @@ -19851,9 +19518,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm5 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm5) as usize - ptr as usize }, 248usize, concat!( "Offset of field: ", @@ -19863,9 +19528,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm6 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm6) as usize - ptr as usize }, 264usize, concat!( "Offset of field: ", @@ -19875,9 +19538,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm7 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm7) as usize - ptr as usize }, 280usize, concat!( "Offset of field: ", @@ -19887,9 +19548,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm8 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm8) as usize - ptr as usize }, 296usize, concat!( "Offset of field: ", @@ -19899,9 +19558,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm9 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm9) as usize - ptr as usize }, 312usize, concat!( "Offset of field: ", @@ -19911,9 +19568,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm10 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm10) as usize - ptr as usize }, 328usize, concat!( "Offset of field: ", @@ -19923,9 +19578,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm11 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm11) as usize - ptr as usize }, 344usize, concat!( "Offset of field: ", @@ -19935,9 +19588,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm12 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm12) as usize - ptr as usize }, 360usize, concat!( "Offset of field: ", @@ -19947,9 +19598,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm13 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm13) as usize - ptr as usize }, 376usize, concat!( "Offset of field: ", @@ -19959,9 +19608,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm14 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm14) as usize - ptr as usize }, 392usize, concat!( "Offset of field: ", @@ -19971,9 +19618,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm15 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_xmm15) as usize - ptr as usize }, 408usize, concat!( "Offset of field: ", @@ -19983,9 +19628,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_rsrv4 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_rsrv4) as usize - ptr as usize }, 424usize, concat!( "Offset of field: ", @@ -19995,10 +19638,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_reserved1 as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_reserved1) as usize - ptr as usize }, 520usize, concat!( "Offset of field: ", @@ -20008,10 +19648,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__avx_reserved1 as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__avx_reserved1) as usize - ptr as usize }, 524usize, concat!( "Offset of field: ", @@ -20021,9 +19658,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh0 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_ymmh0) as usize - ptr as usize }, 588usize, concat!( "Offset of field: ", @@ -20033,9 +19668,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh1 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_ymmh1) as usize - ptr as usize }, 604usize, concat!( "Offset of field: ", @@ -20045,9 +19678,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh2 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_ymmh2) as usize - ptr as usize }, 620usize, concat!( "Offset of field: ", @@ -20057,9 +19688,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh3 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_ymmh3) as usize - ptr as usize }, 636usize, concat!( "Offset of field: ", @@ -20069,9 +19698,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh4 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_ymmh4) as usize - ptr as usize }, 652usize, concat!( "Offset of field: ", @@ -20081,9 +19708,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh5 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_ymmh5) as usize - ptr as usize }, 668usize, concat!( "Offset of field: ", @@ -20093,9 +19718,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh6 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_ymmh6) as usize - ptr as usize }, 684usize, concat!( "Offset of field: ", @@ -20105,9 +19728,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh7 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_ymmh7) as usize - ptr as usize }, 700usize, concat!( "Offset of field: ", @@ -20117,9 +19738,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh8 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_ymmh8) as usize - ptr as usize }, 716usize, concat!( "Offset of field: ", @@ -20129,9 +19748,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh9 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_ymmh9) as usize - ptr as usize }, 732usize, concat!( "Offset of field: ", @@ -20141,10 +19758,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh10 as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_ymmh10) as usize - ptr as usize }, 748usize, concat!( "Offset of field: ", @@ -20154,10 +19768,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh11 as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_ymmh11) as usize - ptr as usize }, 764usize, concat!( "Offset of field: ", @@ -20167,10 +19778,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh12 as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_ymmh12) as usize - ptr as usize }, 780usize, concat!( "Offset of field: ", @@ -20180,10 +19788,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh13 as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_ymmh13) as usize - ptr as usize }, 796usize, concat!( "Offset of field: ", @@ -20193,10 +19798,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh14 as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_ymmh14) as usize - ptr as usize }, 812usize, concat!( "Offset of field: ", @@ -20206,10 +19808,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh15 as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_ymmh15) as usize - ptr as usize }, 828usize, concat!( "Offset of field: ", @@ -20219,9 +19818,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_k0 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_k0) as usize - ptr as usize }, 844usize, concat!( "Offset of field: ", @@ -20231,9 +19828,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_k1 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_k1) as usize - ptr as usize }, 852usize, concat!( "Offset of field: ", @@ -20243,9 +19838,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_k2 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_k2) as usize - ptr as usize }, 860usize, concat!( "Offset of field: ", @@ -20255,9 +19848,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_k3 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_k3) as usize - ptr as usize }, 868usize, concat!( "Offset of field: ", @@ -20267,9 +19858,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_k4 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_k4) as usize - ptr as usize }, 876usize, concat!( "Offset of field: ", @@ -20279,9 +19868,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_k5 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_k5) as usize - ptr as usize }, 884usize, concat!( "Offset of field: ", @@ -20291,9 +19878,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_k6 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_k6) as usize - ptr as usize }, 892usize, concat!( "Offset of field: ", @@ -20303,9 +19888,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_k7 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_k7) as usize - ptr as usize }, 900usize, concat!( "Offset of field: ", @@ -20315,9 +19898,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh0 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_zmmh0) as usize - ptr as usize }, 908usize, concat!( "Offset of field: ", @@ -20327,9 +19908,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh1 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_zmmh1) as usize - ptr as usize }, 940usize, concat!( "Offset of field: ", @@ -20339,9 +19918,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh2 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_zmmh2) as usize - ptr as usize }, 972usize, concat!( "Offset of field: ", @@ -20351,9 +19928,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh3 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_zmmh3) as usize - ptr as usize }, 1004usize, concat!( "Offset of field: ", @@ -20363,9 +19938,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh4 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_zmmh4) as usize - ptr as usize }, 1036usize, concat!( "Offset of field: ", @@ -20375,9 +19948,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh5 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_zmmh5) as usize - ptr as usize }, 1068usize, concat!( "Offset of field: ", @@ -20387,9 +19958,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh6 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_zmmh6) as usize - ptr as usize }, 1100usize, concat!( "Offset of field: ", @@ -20399,9 +19968,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh7 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_zmmh7) as usize - ptr as usize }, 1132usize, concat!( "Offset of field: ", @@ -20411,9 +19978,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh8 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_zmmh8) as usize - ptr as usize }, 1164usize, concat!( "Offset of field: ", @@ -20423,9 +19988,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh9 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_zmmh9) as usize - ptr as usize }, 1196usize, concat!( "Offset of field: ", @@ -20435,10 +19998,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh10 as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_zmmh10) as usize - ptr as usize }, 1228usize, concat!( "Offset of field: ", @@ -20448,10 +20008,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh11 as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_zmmh11) as usize - ptr as usize }, 1260usize, concat!( "Offset of field: ", @@ -20461,10 +20018,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh12 as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_zmmh12) as usize - ptr as usize }, 1292usize, concat!( "Offset of field: ", @@ -20474,10 +20028,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh13 as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_zmmh13) as usize - ptr as usize }, 1324usize, concat!( "Offset of field: ", @@ -20487,10 +20038,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh14 as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_zmmh14) as usize - ptr as usize }, 1356usize, concat!( "Offset of field: ", @@ -20500,10 +20048,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh15 as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_zmmh15) as usize - ptr as usize }, 1388usize, concat!( "Offset of field: ", @@ -20513,9 +20058,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm16 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_zmm16) as usize - ptr as usize }, 1420usize, concat!( "Offset of field: ", @@ -20525,9 +20068,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm17 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_zmm17) as usize - ptr as usize }, 1484usize, concat!( "Offset of field: ", @@ -20537,9 +20078,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm18 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_zmm18) as usize - ptr as usize }, 1548usize, concat!( "Offset of field: ", @@ -20549,9 +20088,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm19 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_zmm19) as usize - ptr as usize }, 1612usize, concat!( "Offset of field: ", @@ -20561,9 +20098,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm20 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_zmm20) as usize - ptr as usize }, 1676usize, concat!( "Offset of field: ", @@ -20573,9 +20108,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm21 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_zmm21) as usize - ptr as usize }, 1740usize, concat!( "Offset of field: ", @@ -20585,9 +20118,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm22 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_zmm22) as usize - ptr as usize }, 1804usize, concat!( "Offset of field: ", @@ -20597,9 +20128,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm23 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_zmm23) as usize - ptr as usize }, 1868usize, concat!( "Offset of field: ", @@ -20609,9 +20138,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm24 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_zmm24) as usize - ptr as usize }, 1932usize, concat!( "Offset of field: ", @@ -20621,9 +20148,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm25 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_zmm25) as usize - ptr as usize }, 1996usize, concat!( "Offset of field: ", @@ -20633,9 +20158,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm26 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_zmm26) as usize - ptr as usize }, 2060usize, concat!( "Offset of field: ", @@ -20645,9 +20168,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm27 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_zmm27) as usize - ptr as usize }, 2124usize, concat!( "Offset of field: ", @@ -20657,9 +20178,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm28 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_zmm28) as usize - ptr as usize }, 2188usize, concat!( "Offset of field: ", @@ -20669,9 +20188,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm29 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_zmm29) as usize - ptr as usize }, 2252usize, concat!( "Offset of field: ", @@ -20681,9 +20198,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm30 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_zmm30) as usize - ptr as usize }, 2316usize, concat!( "Offset of field: ", @@ -20693,9 +20208,7 @@ fn bindgen_test_layout___darwin_x86_avx512_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm31 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fpu_zmm31) as usize - ptr as usize }, 2380usize, concat!( "Offset of field: ", @@ -20724,6 +20237,9 @@ pub struct __darwin_x86_exception_state64 { } #[test] fn bindgen_test_layout___darwin_x86_exception_state64() { + const UNINIT: ::std::mem::MaybeUninit<__darwin_x86_exception_state64> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<__darwin_x86_exception_state64>(), 16usize, @@ -20735,9 +20251,7 @@ fn bindgen_test_layout___darwin_x86_exception_state64() { concat!("Alignment of ", stringify!(__darwin_x86_exception_state64)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_exception_state64>())).__trapno as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__trapno) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -20747,9 +20261,7 @@ fn bindgen_test_layout___darwin_x86_exception_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_exception_state64>())).__cpu as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__cpu) as usize - ptr as usize }, 2usize, concat!( "Offset of field: ", @@ -20759,9 +20271,7 @@ fn bindgen_test_layout___darwin_x86_exception_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_exception_state64>())).__err as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__err) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -20771,10 +20281,7 @@ fn bindgen_test_layout___darwin_x86_exception_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_exception_state64>())).__faultvaddr as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__faultvaddr) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -20798,6 +20305,9 @@ pub struct __darwin_x86_debug_state64 { } #[test] fn bindgen_test_layout___darwin_x86_debug_state64() { + const UNINIT: ::std::mem::MaybeUninit<__darwin_x86_debug_state64> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<__darwin_x86_debug_state64>(), 64usize, @@ -20809,9 +20319,7 @@ fn bindgen_test_layout___darwin_x86_debug_state64() { concat!("Alignment of ", stringify!(__darwin_x86_debug_state64)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_debug_state64>())).__dr0 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__dr0) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -20821,9 +20329,7 @@ fn bindgen_test_layout___darwin_x86_debug_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_debug_state64>())).__dr1 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__dr1) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -20833,9 +20339,7 @@ fn bindgen_test_layout___darwin_x86_debug_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_debug_state64>())).__dr2 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__dr2) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -20845,9 +20349,7 @@ fn bindgen_test_layout___darwin_x86_debug_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_debug_state64>())).__dr3 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__dr3) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -20857,9 +20359,7 @@ fn bindgen_test_layout___darwin_x86_debug_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_debug_state64>())).__dr4 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__dr4) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -20869,9 +20369,7 @@ fn bindgen_test_layout___darwin_x86_debug_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_debug_state64>())).__dr5 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__dr5) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -20881,9 +20379,7 @@ fn bindgen_test_layout___darwin_x86_debug_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_debug_state64>())).__dr6 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__dr6) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", @@ -20893,9 +20389,7 @@ fn bindgen_test_layout___darwin_x86_debug_state64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_debug_state64>())).__dr7 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__dr7) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", @@ -20912,6 +20406,9 @@ pub struct __darwin_x86_cpmu_state64 { } #[test] fn bindgen_test_layout___darwin_x86_cpmu_state64() { + const UNINIT: ::std::mem::MaybeUninit<__darwin_x86_cpmu_state64> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<__darwin_x86_cpmu_state64>(), 128usize, @@ -20923,9 +20420,7 @@ fn bindgen_test_layout___darwin_x86_cpmu_state64() { concat!("Alignment of ", stringify!(__darwin_x86_cpmu_state64)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_cpmu_state64>())).__ctrs as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__ctrs) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -20944,6 +20439,8 @@ pub struct __darwin_mcontext32 { } #[test] fn bindgen_test_layout___darwin_mcontext32() { + const UNINIT: ::std::mem::MaybeUninit<__darwin_mcontext32> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<__darwin_mcontext32>(), 600usize, @@ -20955,7 +20452,7 @@ fn bindgen_test_layout___darwin_mcontext32() { concat!("Alignment of ", stringify!(__darwin_mcontext32)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_mcontext32>())).__es as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).__es) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -20965,7 +20462,7 @@ fn bindgen_test_layout___darwin_mcontext32() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_mcontext32>())).__ss as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).__ss) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -20975,7 +20472,7 @@ fn bindgen_test_layout___darwin_mcontext32() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_mcontext32>())).__fs as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).__fs) as usize - ptr as usize }, 76usize, concat!( "Offset of field: ", @@ -21003,6 +20500,9 @@ pub struct __darwin_mcontext_avx32 { } #[test] fn bindgen_test_layout___darwin_mcontext_avx32() { + const UNINIT: ::std::mem::MaybeUninit<__darwin_mcontext_avx32> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<__darwin_mcontext_avx32>(), 792usize, @@ -21014,7 +20514,7 @@ fn bindgen_test_layout___darwin_mcontext_avx32() { concat!("Alignment of ", stringify!(__darwin_mcontext_avx32)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_mcontext_avx32>())).__es as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).__es) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -21024,7 +20524,7 @@ fn bindgen_test_layout___darwin_mcontext_avx32() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_mcontext_avx32>())).__ss as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).__ss) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -21034,7 +20534,7 @@ fn bindgen_test_layout___darwin_mcontext_avx32() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_mcontext_avx32>())).__fs as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).__fs) as usize - ptr as usize }, 76usize, concat!( "Offset of field: ", @@ -21062,6 +20562,9 @@ pub struct __darwin_mcontext_avx512_32 { } #[test] fn bindgen_test_layout___darwin_mcontext_avx512_32() { + const UNINIT: ::std::mem::MaybeUninit<__darwin_mcontext_avx512_32> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<__darwin_mcontext_avx512_32>(), 1112usize, @@ -21073,9 +20576,7 @@ fn bindgen_test_layout___darwin_mcontext_avx512_32() { concat!("Alignment of ", stringify!(__darwin_mcontext_avx512_32)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_mcontext_avx512_32>())).__es as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__es) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -21085,9 +20586,7 @@ fn bindgen_test_layout___darwin_mcontext_avx512_32() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_mcontext_avx512_32>())).__ss as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__ss) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -21097,9 +20596,7 @@ fn bindgen_test_layout___darwin_mcontext_avx512_32() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_mcontext_avx512_32>())).__fs as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fs) as usize - ptr as usize }, 76usize, concat!( "Offset of field: ", @@ -21127,6 +20624,8 @@ pub struct __darwin_mcontext64 { } #[test] fn bindgen_test_layout___darwin_mcontext64() { + const UNINIT: ::std::mem::MaybeUninit<__darwin_mcontext64> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<__darwin_mcontext64>(), 712usize, @@ -21138,7 +20637,7 @@ fn bindgen_test_layout___darwin_mcontext64() { concat!("Alignment of ", stringify!(__darwin_mcontext64)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_mcontext64>())).__es as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).__es) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -21148,7 +20647,7 @@ fn bindgen_test_layout___darwin_mcontext64() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_mcontext64>())).__ss as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).__ss) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -21158,7 +20657,7 @@ fn bindgen_test_layout___darwin_mcontext64() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_mcontext64>())).__fs as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).__fs) as usize - ptr as usize }, 184usize, concat!( "Offset of field: ", @@ -21186,6 +20685,9 @@ pub struct __darwin_mcontext64_full { } #[test] fn bindgen_test_layout___darwin_mcontext64_full() { + const UNINIT: ::std::mem::MaybeUninit<__darwin_mcontext64_full> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<__darwin_mcontext64_full>(), 744usize, @@ -21197,7 +20699,7 @@ fn bindgen_test_layout___darwin_mcontext64_full() { concat!("Alignment of ", stringify!(__darwin_mcontext64_full)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_mcontext64_full>())).__es as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).__es) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -21207,7 +20709,7 @@ fn bindgen_test_layout___darwin_mcontext64_full() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_mcontext64_full>())).__ss as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).__ss) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -21217,7 +20719,7 @@ fn bindgen_test_layout___darwin_mcontext64_full() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_mcontext64_full>())).__fs as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).__fs) as usize - ptr as usize }, 216usize, concat!( "Offset of field: ", @@ -21245,6 +20747,9 @@ pub struct __darwin_mcontext_avx64 { } #[test] fn bindgen_test_layout___darwin_mcontext_avx64() { + const UNINIT: ::std::mem::MaybeUninit<__darwin_mcontext_avx64> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<__darwin_mcontext_avx64>(), 1032usize, @@ -21256,7 +20761,7 @@ fn bindgen_test_layout___darwin_mcontext_avx64() { concat!("Alignment of ", stringify!(__darwin_mcontext_avx64)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_mcontext_avx64>())).__es as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).__es) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -21266,7 +20771,7 @@ fn bindgen_test_layout___darwin_mcontext_avx64() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_mcontext_avx64>())).__ss as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).__ss) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -21276,7 +20781,7 @@ fn bindgen_test_layout___darwin_mcontext_avx64() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_mcontext_avx64>())).__fs as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).__fs) as usize - ptr as usize }, 184usize, concat!( "Offset of field: ", @@ -21304,6 +20809,9 @@ pub struct __darwin_mcontext_avx64_full { } #[test] fn bindgen_test_layout___darwin_mcontext_avx64_full() { + const UNINIT: ::std::mem::MaybeUninit<__darwin_mcontext_avx64_full> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<__darwin_mcontext_avx64_full>(), 1064usize, @@ -21315,9 +20823,7 @@ fn bindgen_test_layout___darwin_mcontext_avx64_full() { concat!("Alignment of ", stringify!(__darwin_mcontext_avx64_full)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_mcontext_avx64_full>())).__es as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__es) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -21327,9 +20833,7 @@ fn bindgen_test_layout___darwin_mcontext_avx64_full() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_mcontext_avx64_full>())).__ss as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__ss) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -21339,9 +20843,7 @@ fn bindgen_test_layout___darwin_mcontext_avx64_full() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_mcontext_avx64_full>())).__fs as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fs) as usize - ptr as usize }, 216usize, concat!( "Offset of field: ", @@ -21369,6 +20871,9 @@ pub struct __darwin_mcontext_avx512_64 { } #[test] fn bindgen_test_layout___darwin_mcontext_avx512_64() { + const UNINIT: ::std::mem::MaybeUninit<__darwin_mcontext_avx512_64> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<__darwin_mcontext_avx512_64>(), 2632usize, @@ -21380,9 +20885,7 @@ fn bindgen_test_layout___darwin_mcontext_avx512_64() { concat!("Alignment of ", stringify!(__darwin_mcontext_avx512_64)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_mcontext_avx512_64>())).__es as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__es) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -21392,9 +20895,7 @@ fn bindgen_test_layout___darwin_mcontext_avx512_64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_mcontext_avx512_64>())).__ss as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__ss) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -21404,9 +20905,7 @@ fn bindgen_test_layout___darwin_mcontext_avx512_64() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_mcontext_avx512_64>())).__fs as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fs) as usize - ptr as usize }, 184usize, concat!( "Offset of field: ", @@ -21434,6 +20933,9 @@ pub struct __darwin_mcontext_avx512_64_full { } #[test] fn bindgen_test_layout___darwin_mcontext_avx512_64_full() { + const UNINIT: ::std::mem::MaybeUninit<__darwin_mcontext_avx512_64_full> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<__darwin_mcontext_avx512_64_full>(), 2664usize, @@ -21448,9 +20950,7 @@ fn bindgen_test_layout___darwin_mcontext_avx512_64_full() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_mcontext_avx512_64_full>())).__es as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__es) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -21460,9 +20960,7 @@ fn bindgen_test_layout___darwin_mcontext_avx512_64_full() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_mcontext_avx512_64_full>())).__ss as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__ss) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -21472,9 +20970,7 @@ fn bindgen_test_layout___darwin_mcontext_avx512_64_full() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_mcontext_avx512_64_full>())).__fs as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__fs) as usize - ptr as usize }, 216usize, concat!( "Offset of field: ", @@ -21504,6 +21000,8 @@ pub struct __darwin_sigaltstack { } #[test] fn bindgen_test_layout___darwin_sigaltstack() { + const UNINIT: ::std::mem::MaybeUninit<__darwin_sigaltstack> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<__darwin_sigaltstack>(), 24usize, @@ -21515,7 +21013,7 @@ fn bindgen_test_layout___darwin_sigaltstack() { concat!("Alignment of ", stringify!(__darwin_sigaltstack)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_sigaltstack>())).ss_sp as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ss_sp) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -21525,7 +21023,7 @@ fn bindgen_test_layout___darwin_sigaltstack() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_sigaltstack>())).ss_size as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ss_size) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -21535,7 +21033,7 @@ fn bindgen_test_layout___darwin_sigaltstack() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_sigaltstack>())).ss_flags as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ss_flags) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -21567,6 +21065,8 @@ pub struct __darwin_ucontext { } #[test] fn bindgen_test_layout___darwin_ucontext() { + const UNINIT: ::std::mem::MaybeUninit<__darwin_ucontext> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<__darwin_ucontext>(), 56usize, @@ -21578,7 +21078,7 @@ fn bindgen_test_layout___darwin_ucontext() { concat!("Alignment of ", stringify!(__darwin_ucontext)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_ucontext>())).uc_onstack as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).uc_onstack) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -21588,7 +21088,7 @@ fn bindgen_test_layout___darwin_ucontext() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_ucontext>())).uc_sigmask as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).uc_sigmask) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -21598,7 +21098,7 @@ fn bindgen_test_layout___darwin_ucontext() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_ucontext>())).uc_stack as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).uc_stack) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -21608,7 +21108,7 @@ fn bindgen_test_layout___darwin_ucontext() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_ucontext>())).uc_link as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).uc_link) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -21618,7 +21118,7 @@ fn bindgen_test_layout___darwin_ucontext() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_ucontext>())).uc_mcsize as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).uc_mcsize) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -21628,7 +21128,7 @@ fn bindgen_test_layout___darwin_ucontext() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_ucontext>())).uc_mcontext as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).uc_mcontext) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", @@ -21658,6 +21158,8 @@ pub union sigval { } #[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, @@ -21669,7 +21171,7 @@ fn bindgen_test_layout_sigval() { concat!("Alignment of ", stringify!(sigval)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).sival_int as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).sival_int) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -21679,7 +21181,7 @@ fn bindgen_test_layout_sigval() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).sival_ptr as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).sival_ptr) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -21709,6 +21211,8 @@ pub struct sigevent { } #[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::(), 32usize, @@ -21720,7 +21224,7 @@ fn bindgen_test_layout_sigevent() { concat!("Alignment of ", stringify!(sigevent)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).sigev_notify as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).sigev_notify) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -21730,7 +21234,7 @@ fn bindgen_test_layout_sigevent() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).sigev_signo as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).sigev_signo) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -21740,7 +21244,7 @@ fn bindgen_test_layout_sigevent() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).sigev_value as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).sigev_value) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -21750,7 +21254,7 @@ fn bindgen_test_layout_sigevent() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).sigev_notify_function as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).sigev_notify_function) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -21760,9 +21264,7 @@ fn bindgen_test_layout_sigevent() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).sigev_notify_attributes as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).sigev_notify_attributes) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -21797,6 +21299,8 @@ pub struct __siginfo { } #[test] fn bindgen_test_layout___siginfo() { + const UNINIT: ::std::mem::MaybeUninit<__siginfo> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<__siginfo>(), 104usize, @@ -21808,7 +21312,7 @@ fn bindgen_test_layout___siginfo() { concat!("Alignment of ", stringify!(__siginfo)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__siginfo>())).si_signo as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).si_signo) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -21818,7 +21322,7 @@ fn bindgen_test_layout___siginfo() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__siginfo>())).si_errno as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).si_errno) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -21828,7 +21332,7 @@ fn bindgen_test_layout___siginfo() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__siginfo>())).si_code as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).si_code) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -21838,7 +21342,7 @@ fn bindgen_test_layout___siginfo() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__siginfo>())).si_pid as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).si_pid) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -21848,7 +21352,7 @@ fn bindgen_test_layout___siginfo() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__siginfo>())).si_uid as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).si_uid) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -21858,7 +21362,7 @@ fn bindgen_test_layout___siginfo() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__siginfo>())).si_status as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).si_status) as usize - ptr as usize }, 20usize, concat!( "Offset of field: ", @@ -21868,7 +21372,7 @@ fn bindgen_test_layout___siginfo() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__siginfo>())).si_addr as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).si_addr) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -21878,7 +21382,7 @@ fn bindgen_test_layout___siginfo() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__siginfo>())).si_value as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).si_value) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -21888,7 +21392,7 @@ fn bindgen_test_layout___siginfo() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__siginfo>())).si_band as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).si_band) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -21898,7 +21402,7 @@ fn bindgen_test_layout___siginfo() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__siginfo>())).__pad as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).__pad) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", @@ -21932,6 +21436,8 @@ pub union __sigaction_u { } #[test] fn bindgen_test_layout___sigaction_u() { + const UNINIT: ::std::mem::MaybeUninit<__sigaction_u> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<__sigaction_u>(), 8usize, @@ -21943,7 +21449,7 @@ fn bindgen_test_layout___sigaction_u() { concat!("Alignment of ", stringify!(__sigaction_u)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__sigaction_u>())).__sa_handler as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).__sa_handler) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -21953,7 +21459,7 @@ fn bindgen_test_layout___sigaction_u() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__sigaction_u>())).__sa_sigaction as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).__sa_sigaction) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -21990,6 +21496,8 @@ pub struct __sigaction { } #[test] fn bindgen_test_layout___sigaction() { + const UNINIT: ::std::mem::MaybeUninit<__sigaction> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<__sigaction>(), 24usize, @@ -22001,7 +21509,7 @@ fn bindgen_test_layout___sigaction() { concat!("Alignment of ", stringify!(__sigaction)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__sigaction>())).__sigaction_u as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).__sigaction_u) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -22011,7 +21519,7 @@ fn bindgen_test_layout___sigaction() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__sigaction>())).sa_tramp as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).sa_tramp) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -22021,7 +21529,7 @@ fn bindgen_test_layout___sigaction() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__sigaction>())).sa_mask as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).sa_mask) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -22031,7 +21539,7 @@ fn bindgen_test_layout___sigaction() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__sigaction>())).sa_flags as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).sa_flags) as usize - ptr as usize }, 20usize, concat!( "Offset of field: ", @@ -22059,6 +21567,8 @@ pub struct 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, @@ -22070,7 +21580,7 @@ fn bindgen_test_layout_sigaction() { concat!("Alignment of ", stringify!(sigaction)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).__sigaction_u as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).__sigaction_u) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -22080,7 +21590,7 @@ fn bindgen_test_layout_sigaction() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).sa_mask as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).sa_mask) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -22090,7 +21600,7 @@ fn bindgen_test_layout_sigaction() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).sa_flags as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).sa_flags) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -22119,6 +21629,8 @@ pub struct sigvec { } #[test] fn bindgen_test_layout_sigvec() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 16usize, @@ -22130,7 +21642,7 @@ fn bindgen_test_layout_sigvec() { concat!("Alignment of ", stringify!(sigvec)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).sv_handler as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).sv_handler) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -22140,7 +21652,7 @@ fn bindgen_test_layout_sigvec() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).sv_mask as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).sv_mask) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -22150,7 +21662,7 @@ fn bindgen_test_layout_sigvec() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).sv_flags as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).sv_flags) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -22168,6 +21680,8 @@ pub struct sigstack { } #[test] fn bindgen_test_layout_sigstack() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 16usize, @@ -22179,7 +21693,7 @@ fn bindgen_test_layout_sigstack() { concat!("Alignment of ", stringify!(sigstack)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ss_sp as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ss_sp) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -22189,7 +21703,7 @@ fn bindgen_test_layout_sigstack() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ss_onstack as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ss_onstack) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -22227,6 +21741,8 @@ pub struct timeval { } #[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, @@ -22238,7 +21754,7 @@ fn bindgen_test_layout_timeval() { concat!("Alignment of ", stringify!(timeval)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).tv_sec as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).tv_sec) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -22248,7 +21764,7 @@ fn bindgen_test_layout_timeval() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).tv_usec as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).tv_usec) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -22281,6 +21797,8 @@ pub struct rusage { } #[test] fn bindgen_test_layout_rusage() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 144usize, @@ -22292,7 +21810,7 @@ fn bindgen_test_layout_rusage() { concat!("Alignment of ", stringify!(rusage)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ru_utime as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ru_utime) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -22302,7 +21820,7 @@ fn bindgen_test_layout_rusage() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ru_stime as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ru_stime) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -22312,7 +21830,7 @@ fn bindgen_test_layout_rusage() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ru_maxrss as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ru_maxrss) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -22322,7 +21840,7 @@ fn bindgen_test_layout_rusage() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ru_ixrss as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ru_ixrss) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -22332,7 +21850,7 @@ fn bindgen_test_layout_rusage() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ru_idrss as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ru_idrss) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", @@ -22342,7 +21860,7 @@ fn bindgen_test_layout_rusage() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ru_isrss as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ru_isrss) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", @@ -22352,7 +21870,7 @@ fn bindgen_test_layout_rusage() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ru_minflt as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ru_minflt) as usize - ptr as usize }, 64usize, concat!( "Offset of field: ", @@ -22362,7 +21880,7 @@ fn bindgen_test_layout_rusage() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ru_majflt as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ru_majflt) as usize - ptr as usize }, 72usize, concat!( "Offset of field: ", @@ -22372,7 +21890,7 @@ fn bindgen_test_layout_rusage() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ru_nswap as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ru_nswap) as usize - ptr as usize }, 80usize, concat!( "Offset of field: ", @@ -22382,7 +21900,7 @@ fn bindgen_test_layout_rusage() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ru_inblock as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ru_inblock) as usize - ptr as usize }, 88usize, concat!( "Offset of field: ", @@ -22392,7 +21910,7 @@ fn bindgen_test_layout_rusage() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ru_oublock as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ru_oublock) as usize - ptr as usize }, 96usize, concat!( "Offset of field: ", @@ -22402,7 +21920,7 @@ fn bindgen_test_layout_rusage() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ru_msgsnd as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ru_msgsnd) as usize - ptr as usize }, 104usize, concat!( "Offset of field: ", @@ -22412,7 +21930,7 @@ fn bindgen_test_layout_rusage() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ru_msgrcv as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ru_msgrcv) as usize - ptr as usize }, 112usize, concat!( "Offset of field: ", @@ -22422,7 +21940,7 @@ fn bindgen_test_layout_rusage() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ru_nsignals as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ru_nsignals) as usize - ptr as usize }, 120usize, concat!( "Offset of field: ", @@ -22432,7 +21950,7 @@ fn bindgen_test_layout_rusage() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ru_nvcsw as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ru_nvcsw) as usize - ptr as usize }, 128usize, concat!( "Offset of field: ", @@ -22442,7 +21960,7 @@ fn bindgen_test_layout_rusage() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ru_nivcsw as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ru_nivcsw) as usize - ptr as usize }, 136usize, concat!( "Offset of field: ", @@ -22470,6 +21988,8 @@ pub struct rusage_info_v0 { } #[test] fn bindgen_test_layout_rusage_info_v0() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 96usize, @@ -22481,7 +22001,7 @@ fn bindgen_test_layout_rusage_info_v0() { concat!("Alignment of ", stringify!(rusage_info_v0)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_uuid as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_uuid) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -22491,7 +22011,7 @@ fn bindgen_test_layout_rusage_info_v0() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_user_time as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_user_time) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -22501,7 +22021,7 @@ fn bindgen_test_layout_rusage_info_v0() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_system_time as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_system_time) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -22511,9 +22031,7 @@ fn bindgen_test_layout_rusage_info_v0() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_pkg_idle_wkups as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_pkg_idle_wkups) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -22523,9 +22041,7 @@ fn bindgen_test_layout_rusage_info_v0() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_interrupt_wkups as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_interrupt_wkups) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -22535,7 +22051,7 @@ fn bindgen_test_layout_rusage_info_v0() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_pageins as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_pageins) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", @@ -22545,7 +22061,7 @@ fn bindgen_test_layout_rusage_info_v0() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_wired_size as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_wired_size) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", @@ -22555,7 +22071,7 @@ fn bindgen_test_layout_rusage_info_v0() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_resident_size as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_resident_size) as usize - ptr as usize }, 64usize, concat!( "Offset of field: ", @@ -22565,9 +22081,7 @@ fn bindgen_test_layout_rusage_info_v0() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_phys_footprint as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_phys_footprint) as usize - ptr as usize }, 72usize, concat!( "Offset of field: ", @@ -22577,9 +22091,7 @@ fn bindgen_test_layout_rusage_info_v0() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_proc_start_abstime as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_proc_start_abstime) as usize - ptr as usize }, 80usize, concat!( "Offset of field: ", @@ -22589,9 +22101,7 @@ fn bindgen_test_layout_rusage_info_v0() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_proc_exit_abstime as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_proc_exit_abstime) as usize - ptr as usize }, 88usize, concat!( "Offset of field: ", @@ -22624,6 +22134,8 @@ pub struct rusage_info_v1 { } #[test] fn bindgen_test_layout_rusage_info_v1() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 144usize, @@ -22635,7 +22147,7 @@ fn bindgen_test_layout_rusage_info_v1() { concat!("Alignment of ", stringify!(rusage_info_v1)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_uuid as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_uuid) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -22645,7 +22157,7 @@ fn bindgen_test_layout_rusage_info_v1() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_user_time as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_user_time) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -22655,7 +22167,7 @@ fn bindgen_test_layout_rusage_info_v1() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_system_time as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_system_time) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -22665,9 +22177,7 @@ fn bindgen_test_layout_rusage_info_v1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_pkg_idle_wkups as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_pkg_idle_wkups) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -22677,9 +22187,7 @@ fn bindgen_test_layout_rusage_info_v1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_interrupt_wkups as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_interrupt_wkups) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -22689,7 +22197,7 @@ fn bindgen_test_layout_rusage_info_v1() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_pageins as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_pageins) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", @@ -22699,7 +22207,7 @@ fn bindgen_test_layout_rusage_info_v1() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_wired_size as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_wired_size) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", @@ -22709,7 +22217,7 @@ fn bindgen_test_layout_rusage_info_v1() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_resident_size as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_resident_size) as usize - ptr as usize }, 64usize, concat!( "Offset of field: ", @@ -22719,9 +22227,7 @@ fn bindgen_test_layout_rusage_info_v1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_phys_footprint as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_phys_footprint) as usize - ptr as usize }, 72usize, concat!( "Offset of field: ", @@ -22731,9 +22237,7 @@ fn bindgen_test_layout_rusage_info_v1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_proc_start_abstime as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_proc_start_abstime) as usize - ptr as usize }, 80usize, concat!( "Offset of field: ", @@ -22743,9 +22247,7 @@ fn bindgen_test_layout_rusage_info_v1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_proc_exit_abstime as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_proc_exit_abstime) as usize - ptr as usize }, 88usize, concat!( "Offset of field: ", @@ -22755,9 +22257,7 @@ fn bindgen_test_layout_rusage_info_v1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_user_time as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_child_user_time) as usize - ptr as usize }, 96usize, concat!( "Offset of field: ", @@ -22767,9 +22267,7 @@ fn bindgen_test_layout_rusage_info_v1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_system_time as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_child_system_time) as usize - ptr as usize }, 104usize, concat!( "Offset of field: ", @@ -22779,9 +22277,7 @@ fn bindgen_test_layout_rusage_info_v1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_pkg_idle_wkups as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_child_pkg_idle_wkups) as usize - ptr as usize }, 112usize, concat!( "Offset of field: ", @@ -22791,9 +22287,7 @@ fn bindgen_test_layout_rusage_info_v1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_interrupt_wkups as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_child_interrupt_wkups) as usize - ptr as usize }, 120usize, concat!( "Offset of field: ", @@ -22803,7 +22297,7 @@ fn bindgen_test_layout_rusage_info_v1() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_child_pageins as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_child_pageins) as usize - ptr as usize }, 128usize, concat!( "Offset of field: ", @@ -22813,9 +22307,7 @@ fn bindgen_test_layout_rusage_info_v1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_elapsed_abstime as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_child_elapsed_abstime) as usize - ptr as usize }, 136usize, concat!( "Offset of field: ", @@ -22850,6 +22342,8 @@ pub struct rusage_info_v2 { } #[test] fn bindgen_test_layout_rusage_info_v2() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 160usize, @@ -22861,7 +22355,7 @@ fn bindgen_test_layout_rusage_info_v2() { concat!("Alignment of ", stringify!(rusage_info_v2)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_uuid as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_uuid) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -22871,7 +22365,7 @@ fn bindgen_test_layout_rusage_info_v2() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_user_time as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_user_time) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -22881,7 +22375,7 @@ fn bindgen_test_layout_rusage_info_v2() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_system_time as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_system_time) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -22891,9 +22385,7 @@ fn bindgen_test_layout_rusage_info_v2() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_pkg_idle_wkups as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_pkg_idle_wkups) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -22903,9 +22395,7 @@ fn bindgen_test_layout_rusage_info_v2() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_interrupt_wkups as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_interrupt_wkups) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -22915,7 +22405,7 @@ fn bindgen_test_layout_rusage_info_v2() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_pageins as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_pageins) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", @@ -22925,7 +22415,7 @@ fn bindgen_test_layout_rusage_info_v2() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_wired_size as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_wired_size) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", @@ -22935,7 +22425,7 @@ fn bindgen_test_layout_rusage_info_v2() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_resident_size as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_resident_size) as usize - ptr as usize }, 64usize, concat!( "Offset of field: ", @@ -22945,9 +22435,7 @@ fn bindgen_test_layout_rusage_info_v2() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_phys_footprint as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_phys_footprint) as usize - ptr as usize }, 72usize, concat!( "Offset of field: ", @@ -22957,9 +22445,7 @@ fn bindgen_test_layout_rusage_info_v2() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_proc_start_abstime as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_proc_start_abstime) as usize - ptr as usize }, 80usize, concat!( "Offset of field: ", @@ -22969,9 +22455,7 @@ fn bindgen_test_layout_rusage_info_v2() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_proc_exit_abstime as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_proc_exit_abstime) as usize - ptr as usize }, 88usize, concat!( "Offset of field: ", @@ -22981,9 +22465,7 @@ fn bindgen_test_layout_rusage_info_v2() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_user_time as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_child_user_time) as usize - ptr as usize }, 96usize, concat!( "Offset of field: ", @@ -22993,9 +22475,7 @@ fn bindgen_test_layout_rusage_info_v2() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_system_time as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_child_system_time) as usize - ptr as usize }, 104usize, concat!( "Offset of field: ", @@ -23005,9 +22485,7 @@ fn bindgen_test_layout_rusage_info_v2() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_pkg_idle_wkups as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_child_pkg_idle_wkups) as usize - ptr as usize }, 112usize, concat!( "Offset of field: ", @@ -23017,9 +22495,7 @@ fn bindgen_test_layout_rusage_info_v2() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_interrupt_wkups as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_child_interrupt_wkups) as usize - ptr as usize }, 120usize, concat!( "Offset of field: ", @@ -23029,7 +22505,7 @@ fn bindgen_test_layout_rusage_info_v2() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_child_pageins as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_child_pageins) as usize - ptr as usize }, 128usize, concat!( "Offset of field: ", @@ -23039,9 +22515,7 @@ fn bindgen_test_layout_rusage_info_v2() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_elapsed_abstime as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_child_elapsed_abstime) as usize - ptr as usize }, 136usize, concat!( "Offset of field: ", @@ -23051,9 +22525,7 @@ fn bindgen_test_layout_rusage_info_v2() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_diskio_bytesread as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_diskio_bytesread) as usize - ptr as usize }, 144usize, concat!( "Offset of field: ", @@ -23063,9 +22535,7 @@ fn bindgen_test_layout_rusage_info_v2() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_diskio_byteswritten as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_diskio_byteswritten) as usize - ptr as usize }, 152usize, concat!( "Offset of field: ", @@ -23109,6 +22579,8 @@ pub struct rusage_info_v3 { } #[test] fn bindgen_test_layout_rusage_info_v3() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 232usize, @@ -23120,7 +22592,7 @@ fn bindgen_test_layout_rusage_info_v3() { concat!("Alignment of ", stringify!(rusage_info_v3)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_uuid as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_uuid) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -23130,7 +22602,7 @@ fn bindgen_test_layout_rusage_info_v3() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_user_time as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_user_time) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -23140,7 +22612,7 @@ fn bindgen_test_layout_rusage_info_v3() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_system_time as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_system_time) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -23150,9 +22622,7 @@ fn bindgen_test_layout_rusage_info_v3() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_pkg_idle_wkups as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_pkg_idle_wkups) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -23162,9 +22632,7 @@ fn bindgen_test_layout_rusage_info_v3() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_interrupt_wkups as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_interrupt_wkups) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -23174,7 +22642,7 @@ fn bindgen_test_layout_rusage_info_v3() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_pageins as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_pageins) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", @@ -23184,7 +22652,7 @@ fn bindgen_test_layout_rusage_info_v3() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_wired_size as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_wired_size) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", @@ -23194,7 +22662,7 @@ fn bindgen_test_layout_rusage_info_v3() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_resident_size as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_resident_size) as usize - ptr as usize }, 64usize, concat!( "Offset of field: ", @@ -23204,9 +22672,7 @@ fn bindgen_test_layout_rusage_info_v3() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_phys_footprint as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_phys_footprint) as usize - ptr as usize }, 72usize, concat!( "Offset of field: ", @@ -23216,9 +22682,7 @@ fn bindgen_test_layout_rusage_info_v3() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_proc_start_abstime as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_proc_start_abstime) as usize - ptr as usize }, 80usize, concat!( "Offset of field: ", @@ -23228,9 +22692,7 @@ fn bindgen_test_layout_rusage_info_v3() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_proc_exit_abstime as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_proc_exit_abstime) as usize - ptr as usize }, 88usize, concat!( "Offset of field: ", @@ -23240,9 +22702,7 @@ fn bindgen_test_layout_rusage_info_v3() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_user_time as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_child_user_time) as usize - ptr as usize }, 96usize, concat!( "Offset of field: ", @@ -23252,9 +22712,7 @@ fn bindgen_test_layout_rusage_info_v3() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_system_time as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_child_system_time) as usize - ptr as usize }, 104usize, concat!( "Offset of field: ", @@ -23264,9 +22722,7 @@ fn bindgen_test_layout_rusage_info_v3() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_pkg_idle_wkups as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_child_pkg_idle_wkups) as usize - ptr as usize }, 112usize, concat!( "Offset of field: ", @@ -23276,9 +22732,7 @@ fn bindgen_test_layout_rusage_info_v3() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_interrupt_wkups as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_child_interrupt_wkups) as usize - ptr as usize }, 120usize, concat!( "Offset of field: ", @@ -23288,7 +22742,7 @@ fn bindgen_test_layout_rusage_info_v3() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_child_pageins as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_child_pageins) as usize - ptr as usize }, 128usize, concat!( "Offset of field: ", @@ -23298,9 +22752,7 @@ fn bindgen_test_layout_rusage_info_v3() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_elapsed_abstime as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_child_elapsed_abstime) as usize - ptr as usize }, 136usize, concat!( "Offset of field: ", @@ -23310,9 +22762,7 @@ fn bindgen_test_layout_rusage_info_v3() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_diskio_bytesread as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_diskio_bytesread) as usize - ptr as usize }, 144usize, concat!( "Offset of field: ", @@ -23322,9 +22772,7 @@ fn bindgen_test_layout_rusage_info_v3() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_diskio_byteswritten as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_diskio_byteswritten) as usize - ptr as usize }, 152usize, concat!( "Offset of field: ", @@ -23334,9 +22782,7 @@ fn bindgen_test_layout_rusage_info_v3() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_default as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_default) as usize - ptr as usize }, 160usize, concat!( "Offset of field: ", @@ -23346,10 +22792,7 @@ fn bindgen_test_layout_rusage_info_v3() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_maintenance as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_maintenance) as usize - ptr as usize }, 168usize, concat!( "Offset of field: ", @@ -23359,10 +22802,7 @@ fn bindgen_test_layout_rusage_info_v3() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_background as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_background) as usize - ptr as usize }, 176usize, concat!( "Offset of field: ", @@ -23372,9 +22812,7 @@ fn bindgen_test_layout_rusage_info_v3() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_utility as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_utility) as usize - ptr as usize }, 184usize, concat!( "Offset of field: ", @@ -23384,9 +22822,7 @@ fn bindgen_test_layout_rusage_info_v3() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_legacy as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_legacy) as usize - ptr as usize }, 192usize, concat!( "Offset of field: ", @@ -23397,8 +22833,7 @@ fn bindgen_test_layout_rusage_info_v3() { ); assert_eq!( unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_user_initiated as *const _ - as usize + ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_user_initiated) as usize - ptr as usize }, 200usize, concat!( @@ -23410,8 +22845,7 @@ fn bindgen_test_layout_rusage_info_v3() { ); assert_eq!( unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_user_interactive as *const _ - as usize + ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_user_interactive) as usize - ptr as usize }, 208usize, concat!( @@ -23422,9 +22856,7 @@ fn bindgen_test_layout_rusage_info_v3() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_billed_system_time as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_billed_system_time) as usize - ptr as usize }, 216usize, concat!( "Offset of field: ", @@ -23434,9 +22866,7 @@ fn bindgen_test_layout_rusage_info_v3() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_serviced_system_time as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_serviced_system_time) as usize - ptr as usize }, 224usize, concat!( "Offset of field: ", @@ -23488,6 +22918,8 @@ pub struct rusage_info_v4 { } #[test] fn bindgen_test_layout_rusage_info_v4() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 296usize, @@ -23499,7 +22931,7 @@ fn bindgen_test_layout_rusage_info_v4() { concat!("Alignment of ", stringify!(rusage_info_v4)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_uuid as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_uuid) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -23509,7 +22941,7 @@ fn bindgen_test_layout_rusage_info_v4() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_user_time as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_user_time) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -23519,7 +22951,7 @@ fn bindgen_test_layout_rusage_info_v4() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_system_time as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_system_time) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -23529,9 +22961,7 @@ fn bindgen_test_layout_rusage_info_v4() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_pkg_idle_wkups as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_pkg_idle_wkups) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -23541,9 +22971,7 @@ fn bindgen_test_layout_rusage_info_v4() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_interrupt_wkups as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_interrupt_wkups) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -23553,7 +22981,7 @@ fn bindgen_test_layout_rusage_info_v4() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_pageins as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_pageins) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", @@ -23563,7 +22991,7 @@ fn bindgen_test_layout_rusage_info_v4() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_wired_size as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_wired_size) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", @@ -23573,7 +23001,7 @@ fn bindgen_test_layout_rusage_info_v4() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_resident_size as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_resident_size) as usize - ptr as usize }, 64usize, concat!( "Offset of field: ", @@ -23583,9 +23011,7 @@ fn bindgen_test_layout_rusage_info_v4() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_phys_footprint as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_phys_footprint) as usize - ptr as usize }, 72usize, concat!( "Offset of field: ", @@ -23595,9 +23021,7 @@ fn bindgen_test_layout_rusage_info_v4() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_proc_start_abstime as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_proc_start_abstime) as usize - ptr as usize }, 80usize, concat!( "Offset of field: ", @@ -23607,9 +23031,7 @@ fn bindgen_test_layout_rusage_info_v4() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_proc_exit_abstime as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_proc_exit_abstime) as usize - ptr as usize }, 88usize, concat!( "Offset of field: ", @@ -23619,9 +23041,7 @@ fn bindgen_test_layout_rusage_info_v4() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_user_time as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_child_user_time) as usize - ptr as usize }, 96usize, concat!( "Offset of field: ", @@ -23631,9 +23051,7 @@ fn bindgen_test_layout_rusage_info_v4() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_system_time as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_child_system_time) as usize - ptr as usize }, 104usize, concat!( "Offset of field: ", @@ -23643,9 +23061,7 @@ fn bindgen_test_layout_rusage_info_v4() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_pkg_idle_wkups as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_child_pkg_idle_wkups) as usize - ptr as usize }, 112usize, concat!( "Offset of field: ", @@ -23655,9 +23071,7 @@ fn bindgen_test_layout_rusage_info_v4() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_interrupt_wkups as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_child_interrupt_wkups) as usize - ptr as usize }, 120usize, concat!( "Offset of field: ", @@ -23667,7 +23081,7 @@ fn bindgen_test_layout_rusage_info_v4() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_child_pageins as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_child_pageins) as usize - ptr as usize }, 128usize, concat!( "Offset of field: ", @@ -23677,9 +23091,7 @@ fn bindgen_test_layout_rusage_info_v4() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_elapsed_abstime as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_child_elapsed_abstime) as usize - ptr as usize }, 136usize, concat!( "Offset of field: ", @@ -23689,9 +23101,7 @@ fn bindgen_test_layout_rusage_info_v4() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_diskio_bytesread as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_diskio_bytesread) as usize - ptr as usize }, 144usize, concat!( "Offset of field: ", @@ -23701,9 +23111,7 @@ fn bindgen_test_layout_rusage_info_v4() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_diskio_byteswritten as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_diskio_byteswritten) as usize - ptr as usize }, 152usize, concat!( "Offset of field: ", @@ -23713,9 +23121,7 @@ fn bindgen_test_layout_rusage_info_v4() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_default as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_default) as usize - ptr as usize }, 160usize, concat!( "Offset of field: ", @@ -23725,10 +23131,7 @@ fn bindgen_test_layout_rusage_info_v4() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_maintenance as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_maintenance) as usize - ptr as usize }, 168usize, concat!( "Offset of field: ", @@ -23738,10 +23141,7 @@ fn bindgen_test_layout_rusage_info_v4() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_background as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_background) as usize - ptr as usize }, 176usize, concat!( "Offset of field: ", @@ -23751,9 +23151,7 @@ fn bindgen_test_layout_rusage_info_v4() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_utility as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_utility) as usize - ptr as usize }, 184usize, concat!( "Offset of field: ", @@ -23763,9 +23161,7 @@ fn bindgen_test_layout_rusage_info_v4() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_legacy as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_legacy) as usize - ptr as usize }, 192usize, concat!( "Offset of field: ", @@ -23776,8 +23172,7 @@ fn bindgen_test_layout_rusage_info_v4() { ); assert_eq!( unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_user_initiated as *const _ - as usize + ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_user_initiated) as usize - ptr as usize }, 200usize, concat!( @@ -23789,8 +23184,7 @@ fn bindgen_test_layout_rusage_info_v4() { ); assert_eq!( unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_user_interactive as *const _ - as usize + ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_user_interactive) as usize - ptr as usize }, 208usize, concat!( @@ -23801,9 +23195,7 @@ fn bindgen_test_layout_rusage_info_v4() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_billed_system_time as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_billed_system_time) as usize - ptr as usize }, 216usize, concat!( "Offset of field: ", @@ -23813,9 +23205,7 @@ fn bindgen_test_layout_rusage_info_v4() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_serviced_system_time as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_serviced_system_time) as usize - ptr as usize }, 224usize, concat!( "Offset of field: ", @@ -23825,9 +23215,7 @@ fn bindgen_test_layout_rusage_info_v4() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_logical_writes as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_logical_writes) as usize - ptr as usize }, 232usize, concat!( "Offset of field: ", @@ -23838,8 +23226,7 @@ fn bindgen_test_layout_rusage_info_v4() { ); assert_eq!( unsafe { - &(*(::std::ptr::null::())).ri_lifetime_max_phys_footprint as *const _ - as usize + ::std::ptr::addr_of!((*ptr).ri_lifetime_max_phys_footprint) as usize - ptr as usize }, 240usize, concat!( @@ -23850,7 +23237,7 @@ fn bindgen_test_layout_rusage_info_v4() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_instructions as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_instructions) as usize - ptr as usize }, 248usize, concat!( "Offset of field: ", @@ -23860,7 +23247,7 @@ fn bindgen_test_layout_rusage_info_v4() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_cycles as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_cycles) as usize - ptr as usize }, 256usize, concat!( "Offset of field: ", @@ -23870,7 +23257,7 @@ fn bindgen_test_layout_rusage_info_v4() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_billed_energy as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_billed_energy) as usize - ptr as usize }, 264usize, concat!( "Offset of field: ", @@ -23880,9 +23267,7 @@ fn bindgen_test_layout_rusage_info_v4() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_serviced_energy as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_serviced_energy) as usize - ptr as usize }, 272usize, concat!( "Offset of field: ", @@ -23893,8 +23278,7 @@ fn bindgen_test_layout_rusage_info_v4() { ); assert_eq!( unsafe { - &(*(::std::ptr::null::())).ri_interval_max_phys_footprint as *const _ - as usize + ::std::ptr::addr_of!((*ptr).ri_interval_max_phys_footprint) as usize - ptr as usize }, 280usize, concat!( @@ -23905,7 +23289,7 @@ fn bindgen_test_layout_rusage_info_v4() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_runnable_time as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_runnable_time) as usize - ptr as usize }, 288usize, concat!( "Offset of field: ", @@ -23958,6 +23342,8 @@ pub struct rusage_info_v5 { } #[test] fn bindgen_test_layout_rusage_info_v5() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 304usize, @@ -23969,7 +23355,7 @@ fn bindgen_test_layout_rusage_info_v5() { concat!("Alignment of ", stringify!(rusage_info_v5)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_uuid as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_uuid) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -23979,7 +23365,7 @@ fn bindgen_test_layout_rusage_info_v5() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_user_time as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_user_time) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -23989,7 +23375,7 @@ fn bindgen_test_layout_rusage_info_v5() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_system_time as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_system_time) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -23999,9 +23385,7 @@ fn bindgen_test_layout_rusage_info_v5() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_pkg_idle_wkups as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_pkg_idle_wkups) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -24011,9 +23395,7 @@ fn bindgen_test_layout_rusage_info_v5() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_interrupt_wkups as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_interrupt_wkups) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -24023,7 +23405,7 @@ fn bindgen_test_layout_rusage_info_v5() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_pageins as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_pageins) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", @@ -24033,7 +23415,7 @@ fn bindgen_test_layout_rusage_info_v5() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_wired_size as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_wired_size) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", @@ -24043,7 +23425,7 @@ fn bindgen_test_layout_rusage_info_v5() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_resident_size as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_resident_size) as usize - ptr as usize }, 64usize, concat!( "Offset of field: ", @@ -24053,9 +23435,7 @@ fn bindgen_test_layout_rusage_info_v5() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_phys_footprint as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_phys_footprint) as usize - ptr as usize }, 72usize, concat!( "Offset of field: ", @@ -24065,9 +23445,7 @@ fn bindgen_test_layout_rusage_info_v5() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_proc_start_abstime as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_proc_start_abstime) as usize - ptr as usize }, 80usize, concat!( "Offset of field: ", @@ -24077,9 +23455,7 @@ fn bindgen_test_layout_rusage_info_v5() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_proc_exit_abstime as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_proc_exit_abstime) as usize - ptr as usize }, 88usize, concat!( "Offset of field: ", @@ -24089,9 +23465,7 @@ fn bindgen_test_layout_rusage_info_v5() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_user_time as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_child_user_time) as usize - ptr as usize }, 96usize, concat!( "Offset of field: ", @@ -24101,9 +23475,7 @@ fn bindgen_test_layout_rusage_info_v5() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_system_time as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_child_system_time) as usize - ptr as usize }, 104usize, concat!( "Offset of field: ", @@ -24113,9 +23485,7 @@ fn bindgen_test_layout_rusage_info_v5() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_pkg_idle_wkups as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_child_pkg_idle_wkups) as usize - ptr as usize }, 112usize, concat!( "Offset of field: ", @@ -24125,9 +23495,7 @@ fn bindgen_test_layout_rusage_info_v5() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_interrupt_wkups as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_child_interrupt_wkups) as usize - ptr as usize }, 120usize, concat!( "Offset of field: ", @@ -24137,7 +23505,7 @@ fn bindgen_test_layout_rusage_info_v5() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_child_pageins as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_child_pageins) as usize - ptr as usize }, 128usize, concat!( "Offset of field: ", @@ -24147,9 +23515,7 @@ fn bindgen_test_layout_rusage_info_v5() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_elapsed_abstime as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_child_elapsed_abstime) as usize - ptr as usize }, 136usize, concat!( "Offset of field: ", @@ -24159,9 +23525,7 @@ fn bindgen_test_layout_rusage_info_v5() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_diskio_bytesread as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_diskio_bytesread) as usize - ptr as usize }, 144usize, concat!( "Offset of field: ", @@ -24171,9 +23535,7 @@ fn bindgen_test_layout_rusage_info_v5() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_diskio_byteswritten as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_diskio_byteswritten) as usize - ptr as usize }, 152usize, concat!( "Offset of field: ", @@ -24183,9 +23545,7 @@ fn bindgen_test_layout_rusage_info_v5() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_default as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_default) as usize - ptr as usize }, 160usize, concat!( "Offset of field: ", @@ -24195,10 +23555,7 @@ fn bindgen_test_layout_rusage_info_v5() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_maintenance as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_maintenance) as usize - ptr as usize }, 168usize, concat!( "Offset of field: ", @@ -24208,10 +23565,7 @@ fn bindgen_test_layout_rusage_info_v5() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_background as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_background) as usize - ptr as usize }, 176usize, concat!( "Offset of field: ", @@ -24221,9 +23575,7 @@ fn bindgen_test_layout_rusage_info_v5() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_utility as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_utility) as usize - ptr as usize }, 184usize, concat!( "Offset of field: ", @@ -24233,9 +23585,7 @@ fn bindgen_test_layout_rusage_info_v5() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_legacy as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_legacy) as usize - ptr as usize }, 192usize, concat!( "Offset of field: ", @@ -24246,8 +23596,7 @@ fn bindgen_test_layout_rusage_info_v5() { ); assert_eq!( unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_user_initiated as *const _ - as usize + ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_user_initiated) as usize - ptr as usize }, 200usize, concat!( @@ -24259,8 +23608,7 @@ fn bindgen_test_layout_rusage_info_v5() { ); assert_eq!( unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_user_interactive as *const _ - as usize + ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_user_interactive) as usize - ptr as usize }, 208usize, concat!( @@ -24271,9 +23619,7 @@ fn bindgen_test_layout_rusage_info_v5() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_billed_system_time as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_billed_system_time) as usize - ptr as usize }, 216usize, concat!( "Offset of field: ", @@ -24283,9 +23629,7 @@ fn bindgen_test_layout_rusage_info_v5() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_serviced_system_time as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_serviced_system_time) as usize - ptr as usize }, 224usize, concat!( "Offset of field: ", @@ -24295,9 +23639,7 @@ fn bindgen_test_layout_rusage_info_v5() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_logical_writes as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_logical_writes) as usize - ptr as usize }, 232usize, concat!( "Offset of field: ", @@ -24308,8 +23650,7 @@ fn bindgen_test_layout_rusage_info_v5() { ); assert_eq!( unsafe { - &(*(::std::ptr::null::())).ri_lifetime_max_phys_footprint as *const _ - as usize + ::std::ptr::addr_of!((*ptr).ri_lifetime_max_phys_footprint) as usize - ptr as usize }, 240usize, concat!( @@ -24320,7 +23661,7 @@ fn bindgen_test_layout_rusage_info_v5() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_instructions as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_instructions) as usize - ptr as usize }, 248usize, concat!( "Offset of field: ", @@ -24330,7 +23671,7 @@ fn bindgen_test_layout_rusage_info_v5() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_cycles as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_cycles) as usize - ptr as usize }, 256usize, concat!( "Offset of field: ", @@ -24340,7 +23681,7 @@ fn bindgen_test_layout_rusage_info_v5() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_billed_energy as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_billed_energy) as usize - ptr as usize }, 264usize, concat!( "Offset of field: ", @@ -24350,9 +23691,7 @@ fn bindgen_test_layout_rusage_info_v5() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_serviced_energy as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_serviced_energy) as usize - ptr as usize }, 272usize, concat!( "Offset of field: ", @@ -24363,8 +23702,7 @@ fn bindgen_test_layout_rusage_info_v5() { ); assert_eq!( unsafe { - &(*(::std::ptr::null::())).ri_interval_max_phys_footprint as *const _ - as usize + ::std::ptr::addr_of!((*ptr).ri_interval_max_phys_footprint) as usize - ptr as usize }, 280usize, concat!( @@ -24375,7 +23713,7 @@ fn bindgen_test_layout_rusage_info_v5() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_runnable_time as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_runnable_time) as usize - ptr as usize }, 288usize, concat!( "Offset of field: ", @@ -24385,7 +23723,7 @@ fn bindgen_test_layout_rusage_info_v5() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_flags as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ri_flags) as usize - ptr as usize }, 296usize, concat!( "Offset of field: ", @@ -24395,7 +23733,518 @@ fn bindgen_test_layout_rusage_info_v5() { ) ); } -pub type rusage_info_current = rusage_info_v5; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct rusage_info_v6 { + pub ri_uuid: [u8; 16usize], + pub ri_user_time: u64, + pub ri_system_time: u64, + pub ri_pkg_idle_wkups: u64, + pub ri_interrupt_wkups: u64, + pub ri_pageins: u64, + pub ri_wired_size: u64, + pub ri_resident_size: u64, + pub ri_phys_footprint: u64, + pub ri_proc_start_abstime: u64, + pub ri_proc_exit_abstime: u64, + pub ri_child_user_time: u64, + pub ri_child_system_time: u64, + pub ri_child_pkg_idle_wkups: u64, + pub ri_child_interrupt_wkups: u64, + pub ri_child_pageins: u64, + pub ri_child_elapsed_abstime: u64, + pub ri_diskio_bytesread: u64, + pub ri_diskio_byteswritten: u64, + pub ri_cpu_time_qos_default: u64, + pub ri_cpu_time_qos_maintenance: u64, + pub ri_cpu_time_qos_background: u64, + pub ri_cpu_time_qos_utility: u64, + pub ri_cpu_time_qos_legacy: u64, + pub ri_cpu_time_qos_user_initiated: u64, + pub ri_cpu_time_qos_user_interactive: u64, + pub ri_billed_system_time: u64, + pub ri_serviced_system_time: u64, + pub ri_logical_writes: u64, + pub ri_lifetime_max_phys_footprint: u64, + pub ri_instructions: u64, + pub ri_cycles: u64, + pub ri_billed_energy: u64, + pub ri_serviced_energy: u64, + pub ri_interval_max_phys_footprint: u64, + pub ri_runnable_time: u64, + pub ri_flags: u64, + pub ri_user_ptime: u64, + pub ri_system_ptime: u64, + pub ri_pinstructions: u64, + pub ri_pcycles: u64, + pub ri_energy_nj: u64, + pub ri_penergy_nj: u64, + pub ri_reserved: [u64; 14usize], +} +#[test] +fn bindgen_test_layout_rusage_info_v6() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 464usize, + concat!("Size of: ", stringify!(rusage_info_v6)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(rusage_info_v6)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ri_uuid) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(rusage_info_v6), + "::", + stringify!(ri_uuid) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ri_user_time) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(rusage_info_v6), + "::", + stringify!(ri_user_time) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ri_system_time) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(rusage_info_v6), + "::", + stringify!(ri_system_time) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ri_pkg_idle_wkups) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(rusage_info_v6), + "::", + stringify!(ri_pkg_idle_wkups) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ri_interrupt_wkups) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(rusage_info_v6), + "::", + stringify!(ri_interrupt_wkups) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ri_pageins) as usize - ptr as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(rusage_info_v6), + "::", + stringify!(ri_pageins) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ri_wired_size) as usize - ptr as usize }, + 56usize, + concat!( + "Offset of field: ", + stringify!(rusage_info_v6), + "::", + stringify!(ri_wired_size) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ri_resident_size) as usize - ptr as usize }, + 64usize, + concat!( + "Offset of field: ", + stringify!(rusage_info_v6), + "::", + stringify!(ri_resident_size) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ri_phys_footprint) as usize - ptr as usize }, + 72usize, + concat!( + "Offset of field: ", + stringify!(rusage_info_v6), + "::", + stringify!(ri_phys_footprint) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ri_proc_start_abstime) as usize - ptr as usize }, + 80usize, + concat!( + "Offset of field: ", + stringify!(rusage_info_v6), + "::", + stringify!(ri_proc_start_abstime) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ri_proc_exit_abstime) as usize - ptr as usize }, + 88usize, + concat!( + "Offset of field: ", + stringify!(rusage_info_v6), + "::", + stringify!(ri_proc_exit_abstime) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ri_child_user_time) as usize - ptr as usize }, + 96usize, + concat!( + "Offset of field: ", + stringify!(rusage_info_v6), + "::", + stringify!(ri_child_user_time) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ri_child_system_time) as usize - ptr as usize }, + 104usize, + concat!( + "Offset of field: ", + stringify!(rusage_info_v6), + "::", + stringify!(ri_child_system_time) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ri_child_pkg_idle_wkups) as usize - ptr as usize }, + 112usize, + concat!( + "Offset of field: ", + stringify!(rusage_info_v6), + "::", + stringify!(ri_child_pkg_idle_wkups) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ri_child_interrupt_wkups) as usize - ptr as usize }, + 120usize, + concat!( + "Offset of field: ", + stringify!(rusage_info_v6), + "::", + stringify!(ri_child_interrupt_wkups) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ri_child_pageins) as usize - ptr as usize }, + 128usize, + concat!( + "Offset of field: ", + stringify!(rusage_info_v6), + "::", + stringify!(ri_child_pageins) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ri_child_elapsed_abstime) as usize - ptr as usize }, + 136usize, + concat!( + "Offset of field: ", + stringify!(rusage_info_v6), + "::", + stringify!(ri_child_elapsed_abstime) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ri_diskio_bytesread) as usize - ptr as usize }, + 144usize, + concat!( + "Offset of field: ", + stringify!(rusage_info_v6), + "::", + stringify!(ri_diskio_bytesread) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ri_diskio_byteswritten) as usize - ptr as usize }, + 152usize, + concat!( + "Offset of field: ", + stringify!(rusage_info_v6), + "::", + stringify!(ri_diskio_byteswritten) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_default) as usize - ptr as usize }, + 160usize, + concat!( + "Offset of field: ", + stringify!(rusage_info_v6), + "::", + stringify!(ri_cpu_time_qos_default) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_maintenance) as usize - ptr as usize }, + 168usize, + concat!( + "Offset of field: ", + stringify!(rusage_info_v6), + "::", + stringify!(ri_cpu_time_qos_maintenance) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_background) as usize - ptr as usize }, + 176usize, + concat!( + "Offset of field: ", + stringify!(rusage_info_v6), + "::", + stringify!(ri_cpu_time_qos_background) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_utility) as usize - ptr as usize }, + 184usize, + concat!( + "Offset of field: ", + stringify!(rusage_info_v6), + "::", + stringify!(ri_cpu_time_qos_utility) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_legacy) as usize - ptr as usize }, + 192usize, + concat!( + "Offset of field: ", + stringify!(rusage_info_v6), + "::", + stringify!(ri_cpu_time_qos_legacy) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_user_initiated) as usize - ptr as usize + }, + 200usize, + concat!( + "Offset of field: ", + stringify!(rusage_info_v6), + "::", + stringify!(ri_cpu_time_qos_user_initiated) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_user_interactive) as usize - ptr as usize + }, + 208usize, + concat!( + "Offset of field: ", + stringify!(rusage_info_v6), + "::", + stringify!(ri_cpu_time_qos_user_interactive) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ri_billed_system_time) as usize - ptr as usize }, + 216usize, + concat!( + "Offset of field: ", + stringify!(rusage_info_v6), + "::", + stringify!(ri_billed_system_time) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ri_serviced_system_time) as usize - ptr as usize }, + 224usize, + concat!( + "Offset of field: ", + stringify!(rusage_info_v6), + "::", + stringify!(ri_serviced_system_time) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ri_logical_writes) as usize - ptr as usize }, + 232usize, + concat!( + "Offset of field: ", + stringify!(rusage_info_v6), + "::", + stringify!(ri_logical_writes) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).ri_lifetime_max_phys_footprint) as usize - ptr as usize + }, + 240usize, + concat!( + "Offset of field: ", + stringify!(rusage_info_v6), + "::", + stringify!(ri_lifetime_max_phys_footprint) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ri_instructions) as usize - ptr as usize }, + 248usize, + concat!( + "Offset of field: ", + stringify!(rusage_info_v6), + "::", + stringify!(ri_instructions) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ri_cycles) as usize - ptr as usize }, + 256usize, + concat!( + "Offset of field: ", + stringify!(rusage_info_v6), + "::", + stringify!(ri_cycles) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ri_billed_energy) as usize - ptr as usize }, + 264usize, + concat!( + "Offset of field: ", + stringify!(rusage_info_v6), + "::", + stringify!(ri_billed_energy) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ri_serviced_energy) as usize - ptr as usize }, + 272usize, + concat!( + "Offset of field: ", + stringify!(rusage_info_v6), + "::", + stringify!(ri_serviced_energy) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).ri_interval_max_phys_footprint) as usize - ptr as usize + }, + 280usize, + concat!( + "Offset of field: ", + stringify!(rusage_info_v6), + "::", + stringify!(ri_interval_max_phys_footprint) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ri_runnable_time) as usize - ptr as usize }, + 288usize, + concat!( + "Offset of field: ", + stringify!(rusage_info_v6), + "::", + stringify!(ri_runnable_time) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ri_flags) as usize - ptr as usize }, + 296usize, + concat!( + "Offset of field: ", + stringify!(rusage_info_v6), + "::", + stringify!(ri_flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ri_user_ptime) as usize - ptr as usize }, + 304usize, + concat!( + "Offset of field: ", + stringify!(rusage_info_v6), + "::", + stringify!(ri_user_ptime) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ri_system_ptime) as usize - ptr as usize }, + 312usize, + concat!( + "Offset of field: ", + stringify!(rusage_info_v6), + "::", + stringify!(ri_system_ptime) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ri_pinstructions) as usize - ptr as usize }, + 320usize, + concat!( + "Offset of field: ", + stringify!(rusage_info_v6), + "::", + stringify!(ri_pinstructions) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ri_pcycles) as usize - ptr as usize }, + 328usize, + concat!( + "Offset of field: ", + stringify!(rusage_info_v6), + "::", + stringify!(ri_pcycles) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ri_energy_nj) as usize - ptr as usize }, + 336usize, + concat!( + "Offset of field: ", + stringify!(rusage_info_v6), + "::", + stringify!(ri_energy_nj) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ri_penergy_nj) as usize - ptr as usize }, + 344usize, + concat!( + "Offset of field: ", + stringify!(rusage_info_v6), + "::", + stringify!(ri_penergy_nj) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ri_reserved) as usize - ptr as usize }, + 352usize, + concat!( + "Offset of field: ", + stringify!(rusage_info_v6), + "::", + stringify!(ri_reserved) + ) + ); +} +pub type rusage_info_current = rusage_info_v6; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct rlimit { @@ -24404,6 +24253,8 @@ pub struct rlimit { } #[test] fn bindgen_test_layout_rlimit() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 16usize, @@ -24415,7 +24266,7 @@ fn bindgen_test_layout_rlimit() { concat!("Alignment of ", stringify!(rlimit)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).rlim_cur as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).rlim_cur) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -24425,7 +24276,7 @@ fn bindgen_test_layout_rlimit() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).rlim_max as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).rlim_max) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -24443,6 +24294,9 @@ pub struct proc_rlimit_control_wakeupmon { } #[test] fn bindgen_test_layout_proc_rlimit_control_wakeupmon() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, @@ -24454,9 +24308,7 @@ fn bindgen_test_layout_proc_rlimit_control_wakeupmon() { concat!("Alignment of ", stringify!(proc_rlimit_control_wakeupmon)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).wm_flags as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).wm_flags) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -24466,9 +24318,7 @@ fn bindgen_test_layout_proc_rlimit_control_wakeupmon() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).wm_rate as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).wm_rate) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -24687,6 +24537,8 @@ impl wait__bindgen_ty_2 { } #[test] fn bindgen_test_layout_wait() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 4usize, @@ -24698,7 +24550,7 @@ fn bindgen_test_layout_wait() { concat!("Alignment of ", stringify!(wait)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).w_status as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).w_status) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -24708,12 +24560,12 @@ fn bindgen_test_layout_wait() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).w_T as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).w_T) as usize - ptr as usize }, 0usize, concat!("Offset of field: ", stringify!(wait), "::", stringify!(w_T)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).w_S as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).w_S) as usize - ptr as usize }, 0usize, concat!("Offset of field: ", stringify!(wait), "::", stringify!(w_S)) ); @@ -24773,6 +24625,8 @@ pub struct div_t { } #[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, @@ -24784,7 +24638,7 @@ fn bindgen_test_layout_div_t() { concat!("Alignment of ", stringify!(div_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).quot as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).quot) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -24794,7 +24648,7 @@ fn bindgen_test_layout_div_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).rem as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).rem) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -24812,6 +24666,8 @@ pub struct ldiv_t { } #[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, @@ -24823,7 +24679,7 @@ fn bindgen_test_layout_ldiv_t() { concat!("Alignment of ", stringify!(ldiv_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).quot as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).quot) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -24833,7 +24689,7 @@ fn bindgen_test_layout_ldiv_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).rem as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).rem) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -24851,6 +24707,8 @@ pub struct lldiv_t { } #[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, @@ -24862,7 +24720,7 @@ fn bindgen_test_layout_lldiv_t() { concat!("Alignment of ", stringify!(lldiv_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).quot as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).quot) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -24872,7 +24730,7 @@ fn bindgen_test_layout_lldiv_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).rem as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).rem) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -24907,7 +24765,10 @@ extern "C" { pub fn valloc(arg1: size_t) -> *mut ::std::os::raw::c_void; } extern "C" { - pub fn aligned_alloc(__alignment: size_t, __size: size_t) -> *mut ::std::os::raw::c_void; + pub fn aligned_alloc( + __alignment: ::std::os::raw::c_ulong, + __size: ::std::os::raw::c_ulong, + ) -> *mut ::std::os::raw::c_void; } extern "C" { pub fn posix_memalign( @@ -24917,7 +24778,7 @@ extern "C" { ) -> ::std::os::raw::c_int; } extern "C" { - pub fn abort(); + pub fn abort() -> !; } extern "C" { pub fn abs(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; @@ -24955,7 +24816,7 @@ extern "C" { pub fn div(arg1: ::std::os::raw::c_int, arg2: ::std::os::raw::c_int) -> div_t; } extern "C" { - pub fn exit(arg1: ::std::os::raw::c_int); + pub fn exit(arg1: ::std::os::raw::c_int) -> !; } extern "C" { pub fn getenv(arg1: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; @@ -25068,7 +24929,7 @@ extern "C" { pub fn wctomb(arg1: *mut ::std::os::raw::c_char, arg2: wchar_t) -> ::std::os::raw::c_int; } extern "C" { - pub fn _Exit(arg1: ::std::os::raw::c_int); + pub fn _Exit(arg1: ::std::os::raw::c_int) -> !; } extern "C" { pub fn a64l(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_long; @@ -27752,6 +27613,8 @@ pub struct __va_list_tag { } #[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, @@ -27763,7 +27626,7 @@ fn bindgen_test_layout___va_list_tag() { concat!("Alignment of ", stringify!(__va_list_tag)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__va_list_tag>())).gp_offset as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).gp_offset) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -27773,7 +27636,7 @@ fn bindgen_test_layout___va_list_tag() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__va_list_tag>())).fp_offset as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).fp_offset) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -27783,7 +27646,7 @@ fn bindgen_test_layout___va_list_tag() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__va_list_tag>())).overflow_arg_area as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).overflow_arg_area) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -27793,7 +27656,7 @@ fn bindgen_test_layout___va_list_tag() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__va_list_tag>())).reg_save_area as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reg_save_area) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ",