summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/codegen/mod.rs2
-rw-r--r--tests/expectations/tests/16-byte-alignment.rs32
-rw-r--r--tests/expectations/tests/16-byte-alignment_1_0.rs32
-rw-r--r--tests/expectations/tests/accessors.rs42
-rw-r--r--tests/expectations/tests/annotation_hide.rs2
-rw-r--r--tests/expectations/tests/anon_enum.rs4
-rw-r--r--tests/expectations/tests/anon_struct_in_union.rs6
-rw-r--r--tests/expectations/tests/anon_struct_in_union_1_0.rs6
-rw-r--r--tests/expectations/tests/array-of-zero-sized-types.rs2
-rw-r--r--tests/expectations/tests/bitfield_align.rs10
-rw-r--r--tests/expectations/tests/blacklist-and-impl-debug.rs2
-rw-r--r--tests/expectations/tests/char.rs24
-rw-r--r--tests/expectations/tests/class.rs26
-rw-r--r--tests/expectations/tests/class_1_0.rs26
-rw-r--r--tests/expectations/tests/class_nested.rs8
-rw-r--r--tests/expectations/tests/class_no_members.rs4
-rw-r--r--tests/expectations/tests/class_use_as.rs4
-rw-r--r--tests/expectations/tests/class_with_dtor.rs2
-rw-r--r--tests/expectations/tests/class_with_inner_struct.rs51
-rw-r--r--tests/expectations/tests/class_with_inner_struct_1_0.rs51
-rw-r--r--tests/expectations/tests/class_with_typedef.rs12
-rw-r--r--tests/expectations/tests/comment-indent.rs2
-rw-r--r--tests/expectations/tests/complex.rs8
-rw-r--r--tests/expectations/tests/constify-all-enums.rs2
-rw-r--r--tests/expectations/tests/constify-module-enums-basic.rs2
-rw-r--r--tests/expectations/tests/constify-module-enums-namespace.rs4
-rw-r--r--tests/expectations/tests/constify-module-enums-shadow-name.rs2
-rw-r--r--tests/expectations/tests/constify-module-enums-simple-alias.rs16
-rw-r--r--tests/expectations/tests/constify-module-enums-simple-nonamespace.rs4
-rw-r--r--tests/expectations/tests/constify-module-enums-types.rs24
-rw-r--r--tests/expectations/tests/contains-vs-inherits-zero-sized.rs6
-rw-r--r--tests/expectations/tests/convert-cpp-comment-to-rust.rs6
-rw-r--r--tests/expectations/tests/convert-floats.rs12
-rw-r--r--tests/expectations/tests/derive-bitfield-method-same-name.rs2
-rw-r--r--tests/expectations/tests/derive-clone.rs2
-rw-r--r--tests/expectations/tests/derive-clone_1_0.rs2
-rw-r--r--tests/expectations/tests/derive-debug-bitfield.rs2
-rw-r--r--tests/expectations/tests/derive-debug-function-pointer.rs4
-rw-r--r--tests/expectations/tests/derive-debug-mangle-name.rs8
-rw-r--r--tests/expectations/tests/derive-debug-opaque-template-instantiation.rs2
-rw-r--r--tests/expectations/tests/derive-debug-opaque.rs2
-rw-r--r--tests/expectations/tests/derive-default-and-blacklist.rs2
-rw-r--r--tests/expectations/tests/derive-fn-ptr.rs4
-rw-r--r--tests/expectations/tests/derive-hash-and-blacklist.rs2
-rw-r--r--tests/expectations/tests/derive-hash-blacklisting.rs4
-rw-r--r--tests/expectations/tests/derive-hash-struct-with-anon-struct-float.rs6
-rw-r--r--tests/expectations/tests/derive-hash-struct-with-float-array.rs2
-rw-r--r--tests/expectations/tests/derive-hash-struct-with-incomplete-array.rs4
-rw-r--r--tests/expectations/tests/derive-hash-struct-with-pointer.rs8
-rw-r--r--tests/expectations/tests/derive-hash-template-inst-float.rs4
-rw-r--r--tests/expectations/tests/derive-partialeq-and-blacklist.rs2
-rw-r--r--tests/expectations/tests/derive-partialeq-base.rs2
-rw-r--r--tests/expectations/tests/derive-partialeq-bitfield.rs2
-rw-r--r--tests/expectations/tests/derive-partialeq-core.rs2
-rw-r--r--tests/expectations/tests/derive-partialeq-pointer.rs4
-rw-r--r--tests/expectations/tests/derive-partialeq-union.rs4
-rw-r--r--tests/expectations/tests/derive-partialeq-union_1_0.rs4
-rw-r--r--tests/expectations/tests/do-not-derive-copy.rs4
-rw-r--r--tests/expectations/tests/doggo-or-null.rs2
-rw-r--r--tests/expectations/tests/duplicated-namespaces-definitions.rs6
-rw-r--r--tests/expectations/tests/enum_and_vtable_mangling.rs2
-rw-r--r--tests/expectations/tests/forward-declaration-autoptr.rs2
-rw-r--r--tests/expectations/tests/forward_declared_complex_types.rs2
-rw-r--r--tests/expectations/tests/forward_declared_complex_types_1_0.rs2
-rw-r--r--tests/expectations/tests/forward_declared_struct.rs4
-rw-r--r--tests/expectations/tests/func_ptr_in_struct.rs2
-rw-r--r--tests/expectations/tests/gen-destructors-neg.rs2
-rw-r--r--tests/expectations/tests/gen-destructors.rs2
-rw-r--r--tests/expectations/tests/inline_namespace.rs2
-rw-r--r--tests/expectations/tests/inline_namespace_conservative.rs2
-rw-r--r--tests/expectations/tests/inner_const.rs2
-rw-r--r--tests/expectations/tests/inner_template_self.rs2
-rw-r--r--tests/expectations/tests/issue-1118-using-forward-decl.rs4
-rw-r--r--tests/expectations/tests/issue-372.rs10
-rw-r--r--tests/expectations/tests/issue-537.rs6
-rw-r--r--tests/expectations/tests/issue-573-layout-test-failures.rs2
-rw-r--r--tests/expectations/tests/issue-574-assertion-failure-in-codegen.rs2
-rw-r--r--tests/expectations/tests/issue-584-stylo-template-analysis-panic.rs2
-rw-r--r--tests/expectations/tests/issue-639-typedef-anon-field.rs6
-rw-r--r--tests/expectations/tests/issue-643-inner-struct.rs4
-rw-r--r--tests/expectations/tests/issue-648-derive-debug-with-padding.rs6
-rw-r--r--tests/expectations/tests/issue-674-1.rs2
-rw-r--r--tests/expectations/tests/issue-674-2.rs4
-rw-r--r--tests/expectations/tests/issue-674-3.rs4
-rw-r--r--tests/expectations/tests/issue-801-opaque-sloppiness.rs2
-rw-r--r--tests/expectations/tests/issue-807-opaque-types-methods-being-generated.rs2
-rw-r--r--tests/expectations/tests/issue-944-derive-copy-and-blacklisting.rs2
-rw-r--r--tests/expectations/tests/jsval_layout_opaque.rs29
-rw-r--r--tests/expectations/tests/jsval_layout_opaque_1_0.rs29
-rw-r--r--tests/expectations/tests/layout_align.rs2
-rw-r--r--tests/expectations/tests/layout_arp.rs22
-rw-r--r--tests/expectations/tests/layout_array.rs32
-rw-r--r--tests/expectations/tests/layout_array_too_long.rs34
-rw-r--r--tests/expectations/tests/layout_cmdline_token.rs22
-rw-r--r--tests/expectations/tests/layout_eth_conf.rs232
-rw-r--r--tests/expectations/tests/layout_eth_conf_1_0.rs232
-rw-r--r--tests/expectations/tests/layout_kni_mbuf.rs28
-rw-r--r--tests/expectations/tests/layout_large_align_field.rs72
-rw-r--r--tests/expectations/tests/layout_mbuf.rs98
-rw-r--r--tests/expectations/tests/layout_mbuf_1_0.rs98
-rw-r--r--tests/expectations/tests/libclang-3.8/call-conv-field.rs4
-rw-r--r--tests/expectations/tests/libclang-3.8/type_alias_template_specialized.rs2
-rw-r--r--tests/expectations/tests/libclang-3.9/call-conv-field.rs4
-rw-r--r--tests/expectations/tests/libclang-3.9/type_alias_template_specialized.rs2
-rw-r--r--tests/expectations/tests/libclang-4/call-conv-field.rs4
-rw-r--r--tests/expectations/tests/libclang-4/type_alias_template_specialized.rs2
-rw-r--r--tests/expectations/tests/msvc-no-usr.rs2
-rw-r--r--tests/expectations/tests/mutable.rs9
-rw-r--r--tests/expectations/tests/namespace.rs2
-rw-r--r--tests/expectations/tests/nested.rs6
-rw-r--r--tests/expectations/tests/nested_within_namespace.rs6
-rw-r--r--tests/expectations/tests/no-comments.rs2
-rw-r--r--tests/expectations/tests/no-derive-debug.rs4
-rw-r--r--tests/expectations/tests/no-derive-default.rs4
-rw-r--r--tests/expectations/tests/no-hash-whitelisted.rs2
-rw-r--r--tests/expectations/tests/no-partialeq-whitelisted.rs2
-rw-r--r--tests/expectations/tests/no-recursive-whitelisting.rs2
-rw-r--r--tests/expectations/tests/no-std.rs6
-rw-r--r--tests/expectations/tests/no_copy_whitelisted.rs2
-rw-r--r--tests/expectations/tests/non-type-params.rs6
-rw-r--r--tests/expectations/tests/objc_interface_type.rs2
-rw-r--r--tests/expectations/tests/opaque-template-inst-member-2.rs6
-rw-r--r--tests/expectations/tests/opaque-template-inst-member.rs6
-rw-r--r--tests/expectations/tests/opaque-template-instantiation-namespaced.rs12
-rw-r--r--tests/expectations/tests/opaque-template-instantiation.rs8
-rw-r--r--tests/expectations/tests/opaque_in_struct.rs2
-rw-r--r--tests/expectations/tests/opaque_pointer.rs6
-rw-r--r--tests/expectations/tests/private.rs12
-rw-r--r--tests/expectations/tests/reparented_replacement.rs2
-rw-r--r--tests/expectations/tests/replace_use.rs2
-rw-r--r--tests/expectations/tests/same_struct_name_in_different_namespaces.rs4
-rw-r--r--tests/expectations/tests/sentry-defined-multiple-times.rs21
-rw-r--r--tests/expectations/tests/size_t_template.rs2
-rw-r--r--tests/expectations/tests/struct_containing_forward_declared_struct.rs4
-rw-r--r--tests/expectations/tests/struct_typedef.rs4
-rw-r--r--tests/expectations/tests/struct_typedef_ns.rs4
-rw-r--r--tests/expectations/tests/struct_with_anon_struct.rs6
-rw-r--r--tests/expectations/tests/struct_with_anon_struct_array.rs12
-rw-r--r--tests/expectations/tests/struct_with_anon_struct_pointer.rs6
-rw-r--r--tests/expectations/tests/struct_with_anon_union.rs6
-rw-r--r--tests/expectations/tests/struct_with_anon_union_1_0.rs6
-rw-r--r--tests/expectations/tests/struct_with_anon_unnamed_struct.rs4
-rw-r--r--tests/expectations/tests/struct_with_anon_unnamed_union.rs4
-rw-r--r--tests/expectations/tests/struct_with_anon_unnamed_union_1_0.rs4
-rw-r--r--tests/expectations/tests/struct_with_bitfields.rs2
-rw-r--r--tests/expectations/tests/struct_with_derive_debug.rs8
-rw-r--r--tests/expectations/tests/struct_with_large_array.rs2
-rw-r--r--tests/expectations/tests/struct_with_nesting.rs28
-rw-r--r--tests/expectations/tests/struct_with_nesting_1_0.rs28
-rw-r--r--tests/expectations/tests/struct_with_packing.rs4
-rw-r--r--tests/expectations/tests/struct_with_struct.rs6
-rw-r--r--tests/expectations/tests/template.rs36
-rw-r--r--tests/expectations/tests/test_multiple_header_calls_in_builder.rs24
-rw-r--r--tests/expectations/tests/type-referenced-by-whitelisted-function.rs2
-rw-r--r--tests/expectations/tests/typeref.rs8
-rw-r--r--tests/expectations/tests/typeref_1_0.rs8
-rw-r--r--tests/expectations/tests/underscore.rs2
-rw-r--r--tests/expectations/tests/union-in-ns.rs2
-rw-r--r--tests/expectations/tests/union-in-ns_1_0.rs2
-rw-r--r--tests/expectations/tests/union_dtor.rs4
-rw-r--r--tests/expectations/tests/union_dtor_1_0.rs4
-rw-r--r--tests/expectations/tests/union_fields.rs6
-rw-r--r--tests/expectations/tests/union_fields_1_0.rs6
-rw-r--r--tests/expectations/tests/union_with_anon_struct.rs6
-rw-r--r--tests/expectations/tests/union_with_anon_struct_1_0.rs6
-rw-r--r--tests/expectations/tests/union_with_anon_struct_bitfield.rs2
-rw-r--r--tests/expectations/tests/union_with_anon_struct_bitfield_1_0.rs2
-rw-r--r--tests/expectations/tests/union_with_anon_union.rs6
-rw-r--r--tests/expectations/tests/union_with_anon_union_1_0.rs6
-rw-r--r--tests/expectations/tests/union_with_anon_unnamed_struct.rs10
-rw-r--r--tests/expectations/tests/union_with_anon_unnamed_struct_1_0.rs10
-rw-r--r--tests/expectations/tests/union_with_anon_unnamed_union.rs6
-rw-r--r--tests/expectations/tests/union_with_anon_unnamed_union_1_0.rs6
-rw-r--r--tests/expectations/tests/union_with_big_member.rs12
-rw-r--r--tests/expectations/tests/union_with_big_member_1_0.rs12
-rw-r--r--tests/expectations/tests/union_with_nesting.rs18
-rw-r--r--tests/expectations/tests/union_with_nesting_1_0.rs18
-rw-r--r--tests/expectations/tests/unknown_attr.rs8
-rw-r--r--tests/expectations/tests/use-core.rs10
-rw-r--r--tests/expectations/tests/use-core_1_0.rs10
-rw-r--r--tests/expectations/tests/var-tracing.rs2
-rw-r--r--tests/expectations/tests/vector.rs2
-rw-r--r--tests/expectations/tests/virtual_inheritance.rs6
-rw-r--r--tests/expectations/tests/weird_bitfields.rs26
-rw-r--r--tests/expectations/tests/whitelist-namespaces.rs2
-rw-r--r--tests/expectations/tests/whitelisted-item-references-no-hash.rs2
-rw-r--r--tests/expectations/tests/whitelisted-item-references-no-partialeq.rs2
-rw-r--r--tests/expectations/tests/whitelisted_item_references_no_copy.rs2
-rw-r--r--tests/expectations/tests/zero-sized-array.rs4
189 files changed, 1233 insertions, 905 deletions
diff --git a/src/codegen/mod.rs b/src/codegen/mod.rs
index f0a7e0be..7b700d2d 100644
--- a/src/codegen/mod.rs
+++ b/src/codegen/mod.rs
@@ -1791,7 +1791,7 @@ impl CodeGenerator for CompInfo {
Some(quote! {
assert_eq!(
unsafe {
- &(*(0 as *const #canonical_ident)).#field_name as *const _ as usize
+ &(*(::#prefix::ptr::null::<#canonical_ident>())).#field_name as *const _ as usize
},
#field_offset,
concat!("Offset of field: ", stringify!(#canonical_ident), "::", stringify!(#field_name))
diff --git a/tests/expectations/tests/16-byte-alignment.rs b/tests/expectations/tests/16-byte-alignment.rs
index 653366ec..84383c35 100644
--- a/tests/expectations/tests/16-byte-alignment.rs
+++ b/tests/expectations/tests/16-byte-alignment.rs
@@ -44,7 +44,8 @@ fn bindgen_test_layout_rte_ipv4_tuple__bindgen_ty_1__bindgen_ty_1() {
);
assert_eq!(
unsafe {
- &(*(0 as *const rte_ipv4_tuple__bindgen_ty_1__bindgen_ty_1)).dport as *const _ as usize
+ &(*(::std::ptr::null::<rte_ipv4_tuple__bindgen_ty_1__bindgen_ty_1>())).dport as *const _
+ as usize
},
0usize,
concat!(
@@ -56,7 +57,8 @@ fn bindgen_test_layout_rte_ipv4_tuple__bindgen_ty_1__bindgen_ty_1() {
);
assert_eq!(
unsafe {
- &(*(0 as *const rte_ipv4_tuple__bindgen_ty_1__bindgen_ty_1)).sport as *const _ as usize
+ &(*(::std::ptr::null::<rte_ipv4_tuple__bindgen_ty_1__bindgen_ty_1>())).sport as *const _
+ as usize
},
2usize,
concat!(
@@ -80,7 +82,9 @@ fn bindgen_test_layout_rte_ipv4_tuple__bindgen_ty_1() {
concat!("Alignment of ", stringify!(rte_ipv4_tuple__bindgen_ty_1))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_ipv4_tuple__bindgen_ty_1)).sctp_tag as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_ipv4_tuple__bindgen_ty_1>())).sctp_tag as *const _ as usize
+ },
0usize,
concat!(
"Offset of field: ",
@@ -108,7 +112,7 @@ fn bindgen_test_layout_rte_ipv4_tuple() {
concat!("Alignment of ", stringify!(rte_ipv4_tuple))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_ipv4_tuple)).src_addr as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_ipv4_tuple>())).src_addr as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -118,7 +122,7 @@ fn bindgen_test_layout_rte_ipv4_tuple() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_ipv4_tuple)).dst_addr as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_ipv4_tuple>())).dst_addr as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
@@ -173,7 +177,8 @@ fn bindgen_test_layout_rte_ipv6_tuple__bindgen_ty_1__bindgen_ty_1() {
);
assert_eq!(
unsafe {
- &(*(0 as *const rte_ipv6_tuple__bindgen_ty_1__bindgen_ty_1)).dport as *const _ as usize
+ &(*(::std::ptr::null::<rte_ipv6_tuple__bindgen_ty_1__bindgen_ty_1>())).dport as *const _
+ as usize
},
0usize,
concat!(
@@ -185,7 +190,8 @@ fn bindgen_test_layout_rte_ipv6_tuple__bindgen_ty_1__bindgen_ty_1() {
);
assert_eq!(
unsafe {
- &(*(0 as *const rte_ipv6_tuple__bindgen_ty_1__bindgen_ty_1)).sport as *const _ as usize
+ &(*(::std::ptr::null::<rte_ipv6_tuple__bindgen_ty_1__bindgen_ty_1>())).sport as *const _
+ as usize
},
2usize,
concat!(
@@ -209,7 +215,9 @@ fn bindgen_test_layout_rte_ipv6_tuple__bindgen_ty_1() {
concat!("Alignment of ", stringify!(rte_ipv6_tuple__bindgen_ty_1))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_ipv6_tuple__bindgen_ty_1)).sctp_tag as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_ipv6_tuple__bindgen_ty_1>())).sctp_tag as *const _ as usize
+ },
0usize,
concat!(
"Offset of field: ",
@@ -237,7 +245,7 @@ fn bindgen_test_layout_rte_ipv6_tuple() {
concat!("Alignment of ", stringify!(rte_ipv6_tuple))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_ipv6_tuple)).src_addr as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_ipv6_tuple>())).src_addr as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -247,7 +255,7 @@ fn bindgen_test_layout_rte_ipv6_tuple() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_ipv6_tuple)).dst_addr as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_ipv6_tuple>())).dst_addr as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
@@ -277,7 +285,7 @@ fn bindgen_test_layout_rte_thash_tuple() {
concat!("Size of: ", stringify!(rte_thash_tuple))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_thash_tuple)).v4 as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_thash_tuple>())).v4 as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -287,7 +295,7 @@ fn bindgen_test_layout_rte_thash_tuple() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_thash_tuple)).v6 as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_thash_tuple>())).v6 as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/16-byte-alignment_1_0.rs b/tests/expectations/tests/16-byte-alignment_1_0.rs
index 32572dde..f37721a4 100644
--- a/tests/expectations/tests/16-byte-alignment_1_0.rs
+++ b/tests/expectations/tests/16-byte-alignment_1_0.rs
@@ -87,7 +87,8 @@ fn bindgen_test_layout_rte_ipv4_tuple__bindgen_ty_1__bindgen_ty_1() {
);
assert_eq!(
unsafe {
- &(*(0 as *const rte_ipv4_tuple__bindgen_ty_1__bindgen_ty_1)).dport as *const _ as usize
+ &(*(::std::ptr::null::<rte_ipv4_tuple__bindgen_ty_1__bindgen_ty_1>())).dport as *const _
+ as usize
},
0usize,
concat!(
@@ -99,7 +100,8 @@ fn bindgen_test_layout_rte_ipv4_tuple__bindgen_ty_1__bindgen_ty_1() {
);
assert_eq!(
unsafe {
- &(*(0 as *const rte_ipv4_tuple__bindgen_ty_1__bindgen_ty_1)).sport as *const _ as usize
+ &(*(::std::ptr::null::<rte_ipv4_tuple__bindgen_ty_1__bindgen_ty_1>())).sport as *const _
+ as usize
},
2usize,
concat!(
@@ -128,7 +130,9 @@ fn bindgen_test_layout_rte_ipv4_tuple__bindgen_ty_1() {
concat!("Alignment of ", stringify!(rte_ipv4_tuple__bindgen_ty_1))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_ipv4_tuple__bindgen_ty_1)).sctp_tag as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_ipv4_tuple__bindgen_ty_1>())).sctp_tag as *const _ as usize
+ },
0usize,
concat!(
"Offset of field: ",
@@ -156,7 +160,7 @@ fn bindgen_test_layout_rte_ipv4_tuple() {
concat!("Alignment of ", stringify!(rte_ipv4_tuple))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_ipv4_tuple)).src_addr as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_ipv4_tuple>())).src_addr as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -166,7 +170,7 @@ fn bindgen_test_layout_rte_ipv4_tuple() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_ipv4_tuple)).dst_addr as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_ipv4_tuple>())).dst_addr as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
@@ -221,7 +225,8 @@ fn bindgen_test_layout_rte_ipv6_tuple__bindgen_ty_1__bindgen_ty_1() {
);
assert_eq!(
unsafe {
- &(*(0 as *const rte_ipv6_tuple__bindgen_ty_1__bindgen_ty_1)).dport as *const _ as usize
+ &(*(::std::ptr::null::<rte_ipv6_tuple__bindgen_ty_1__bindgen_ty_1>())).dport as *const _
+ as usize
},
0usize,
concat!(
@@ -233,7 +238,8 @@ fn bindgen_test_layout_rte_ipv6_tuple__bindgen_ty_1__bindgen_ty_1() {
);
assert_eq!(
unsafe {
- &(*(0 as *const rte_ipv6_tuple__bindgen_ty_1__bindgen_ty_1)).sport as *const _ as usize
+ &(*(::std::ptr::null::<rte_ipv6_tuple__bindgen_ty_1__bindgen_ty_1>())).sport as *const _
+ as usize
},
2usize,
concat!(
@@ -262,7 +268,9 @@ fn bindgen_test_layout_rte_ipv6_tuple__bindgen_ty_1() {
concat!("Alignment of ", stringify!(rte_ipv6_tuple__bindgen_ty_1))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_ipv6_tuple__bindgen_ty_1)).sctp_tag as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_ipv6_tuple__bindgen_ty_1>())).sctp_tag as *const _ as usize
+ },
0usize,
concat!(
"Offset of field: ",
@@ -290,7 +298,7 @@ fn bindgen_test_layout_rte_ipv6_tuple() {
concat!("Alignment of ", stringify!(rte_ipv6_tuple))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_ipv6_tuple)).src_addr as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_ipv6_tuple>())).src_addr as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -300,7 +308,7 @@ fn bindgen_test_layout_rte_ipv6_tuple() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_ipv6_tuple)).dst_addr as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_ipv6_tuple>())).dst_addr as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
@@ -330,7 +338,7 @@ fn bindgen_test_layout_rte_thash_tuple() {
concat!("Size of: ", stringify!(rte_thash_tuple))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_thash_tuple)).v4 as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_thash_tuple>())).v4 as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -340,7 +348,7 @@ fn bindgen_test_layout_rte_thash_tuple() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_thash_tuple)).v6 as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_thash_tuple>())).v6 as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/accessors.rs b/tests/expectations/tests/accessors.rs
index a9c2888a..43422ac5 100644
--- a/tests/expectations/tests/accessors.rs
+++ b/tests/expectations/tests/accessors.rs
@@ -28,7 +28,7 @@ fn bindgen_test_layout_SomeAccessors() {
concat!("Alignment of ", stringify!(SomeAccessors))
);
assert_eq!(
- unsafe { &(*(0 as *const SomeAccessors)).mNoAccessor as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<SomeAccessors>())).mNoAccessor as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -38,7 +38,7 @@ fn bindgen_test_layout_SomeAccessors() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const SomeAccessors)).mBothAccessors as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<SomeAccessors>())).mBothAccessors as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
@@ -48,7 +48,7 @@ fn bindgen_test_layout_SomeAccessors() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const SomeAccessors)).mUnsafeAccessors as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<SomeAccessors>())).mUnsafeAccessors as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
@@ -58,7 +58,9 @@ fn bindgen_test_layout_SomeAccessors() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const SomeAccessors)).mImmutableAccessor as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<SomeAccessors>())).mImmutableAccessor as *const _ as usize
+ },
12usize,
concat!(
"Offset of field: ",
@@ -110,7 +112,7 @@ fn bindgen_test_layout_AllAccessors() {
concat!("Alignment of ", stringify!(AllAccessors))
);
assert_eq!(
- unsafe { &(*(0 as *const AllAccessors)).mBothAccessors as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<AllAccessors>())).mBothAccessors as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -120,7 +122,7 @@ fn bindgen_test_layout_AllAccessors() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const AllAccessors)).mAlsoBothAccessors as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<AllAccessors>())).mAlsoBothAccessors as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
@@ -168,7 +170,9 @@ fn bindgen_test_layout_AllUnsafeAccessors() {
concat!("Alignment of ", stringify!(AllUnsafeAccessors))
);
assert_eq!(
- unsafe { &(*(0 as *const AllUnsafeAccessors)).mBothAccessors as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<AllUnsafeAccessors>())).mBothAccessors as *const _ as usize
+ },
0usize,
concat!(
"Offset of field: ",
@@ -178,7 +182,9 @@ fn bindgen_test_layout_AllUnsafeAccessors() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const AllUnsafeAccessors)).mAlsoBothAccessors as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<AllUnsafeAccessors>())).mAlsoBothAccessors as *const _ as usize
+ },
4usize,
concat!(
"Offset of field: ",
@@ -231,7 +237,9 @@ fn bindgen_test_layout_ContradictAccessors() {
concat!("Alignment of ", stringify!(ContradictAccessors))
);
assert_eq!(
- unsafe { &(*(0 as *const ContradictAccessors)).mBothAccessors as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<ContradictAccessors>())).mBothAccessors as *const _ as usize
+ },
0usize,
concat!(
"Offset of field: ",
@@ -241,7 +249,9 @@ fn bindgen_test_layout_ContradictAccessors() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const ContradictAccessors)).mNoAccessors as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<ContradictAccessors>())).mNoAccessors as *const _ as usize
+ },
4usize,
concat!(
"Offset of field: ",
@@ -251,7 +261,9 @@ fn bindgen_test_layout_ContradictAccessors() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const ContradictAccessors)).mUnsafeAccessors as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<ContradictAccessors>())).mUnsafeAccessors as *const _ as usize
+ },
8usize,
concat!(
"Offset of field: ",
@@ -261,7 +273,9 @@ fn bindgen_test_layout_ContradictAccessors() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const ContradictAccessors)).mImmutableAccessor as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<ContradictAccessors>())).mImmutableAccessor as *const _ as usize
+ },
12usize,
concat!(
"Offset of field: ",
@@ -312,7 +326,7 @@ fn bindgen_test_layout_Replaced() {
concat!("Alignment of ", stringify!(Replaced))
);
assert_eq!(
- unsafe { &(*(0 as *const Replaced)).mAccessor as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Replaced>())).mAccessor as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -351,7 +365,7 @@ fn bindgen_test_layout_Wrapper() {
concat!("Alignment of ", stringify!(Wrapper))
);
assert_eq!(
- unsafe { &(*(0 as *const Wrapper)).mReplaced as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Wrapper>())).mReplaced as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/annotation_hide.rs b/tests/expectations/tests/annotation_hide.rs
index de38b1ee..6657a950 100644
--- a/tests/expectations/tests/annotation_hide.rs
+++ b/tests/expectations/tests/annotation_hide.rs
@@ -42,7 +42,7 @@ fn bindgen_test_layout_NotAnnotated() {
concat!("Alignment of ", stringify!(NotAnnotated))
);
assert_eq!(
- unsafe { &(*(0 as *const NotAnnotated)).f as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<NotAnnotated>())).f as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/anon_enum.rs b/tests/expectations/tests/anon_enum.rs
index 505c692e..718905d9 100644
--- a/tests/expectations/tests/anon_enum.rs
+++ b/tests/expectations/tests/anon_enum.rs
@@ -29,12 +29,12 @@ fn bindgen_test_layout_Test() {
concat!("Alignment of ", stringify!(Test))
);
assert_eq!(
- unsafe { &(*(0 as *const Test)).foo as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Test>())).foo as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(Test), "::", stringify!(foo))
);
assert_eq!(
- unsafe { &(*(0 as *const Test)).bar as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Test>())).bar as *const _ as usize },
4usize,
concat!("Offset of field: ", stringify!(Test), "::", stringify!(bar))
);
diff --git a/tests/expectations/tests/anon_struct_in_union.rs b/tests/expectations/tests/anon_struct_in_union.rs
index 4123fb21..6916d5af 100644
--- a/tests/expectations/tests/anon_struct_in_union.rs
+++ b/tests/expectations/tests/anon_struct_in_union.rs
@@ -33,7 +33,7 @@ fn bindgen_test_layout_s__bindgen_ty_1_inner() {
concat!("Alignment of ", stringify!(s__bindgen_ty_1_inner))
);
assert_eq!(
- unsafe { &(*(0 as *const s__bindgen_ty_1_inner)).b as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<s__bindgen_ty_1_inner>())).b as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -56,7 +56,7 @@ fn bindgen_test_layout_s__bindgen_ty_1() {
concat!("Alignment of ", stringify!(s__bindgen_ty_1))
);
assert_eq!(
- unsafe { &(*(0 as *const s__bindgen_ty_1)).field as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<s__bindgen_ty_1>())).field as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -84,7 +84,7 @@ fn bindgen_test_layout_s() {
concat!("Alignment of ", stringify!(s))
);
assert_eq!(
- unsafe { &(*(0 as *const s)).u as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<s>())).u as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(s), "::", stringify!(u))
);
diff --git a/tests/expectations/tests/anon_struct_in_union_1_0.rs b/tests/expectations/tests/anon_struct_in_union_1_0.rs
index 60904743..63e2e45a 100644
--- a/tests/expectations/tests/anon_struct_in_union_1_0.rs
+++ b/tests/expectations/tests/anon_struct_in_union_1_0.rs
@@ -76,7 +76,7 @@ fn bindgen_test_layout_s__bindgen_ty_1_inner() {
concat!("Alignment of ", stringify!(s__bindgen_ty_1_inner))
);
assert_eq!(
- unsafe { &(*(0 as *const s__bindgen_ty_1_inner)).b as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<s__bindgen_ty_1_inner>())).b as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -104,7 +104,7 @@ fn bindgen_test_layout_s__bindgen_ty_1() {
concat!("Alignment of ", stringify!(s__bindgen_ty_1))
);
assert_eq!(
- unsafe { &(*(0 as *const s__bindgen_ty_1)).field as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<s__bindgen_ty_1>())).field as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -132,7 +132,7 @@ fn bindgen_test_layout_s() {
concat!("Alignment of ", stringify!(s))
);
assert_eq!(
- unsafe { &(*(0 as *const s)).u as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<s>())).u as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(s), "::", stringify!(u))
);
diff --git a/tests/expectations/tests/array-of-zero-sized-types.rs b/tests/expectations/tests/array-of-zero-sized-types.rs
index 304733da..6e6193c9 100644
--- a/tests/expectations/tests/array-of-zero-sized-types.rs
+++ b/tests/expectations/tests/array-of-zero-sized-types.rs
@@ -44,7 +44,7 @@ fn bindgen_test_layout_HasArrayOfEmpty() {
concat!("Alignment of ", stringify!(HasArrayOfEmpty))
);
assert_eq!(
- unsafe { &(*(0 as *const HasArrayOfEmpty)).empties as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<HasArrayOfEmpty>())).empties as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/bitfield_align.rs b/tests/expectations/tests/bitfield_align.rs
index cc433aa9..73dfcef4 100644
--- a/tests/expectations/tests/bitfield_align.rs
+++ b/tests/expectations/tests/bitfield_align.rs
@@ -25,12 +25,12 @@ fn bindgen_test_layout_A() {
concat!("Alignment of ", stringify!(A))
);
assert_eq!(
- unsafe { &(*(0 as *const A)).x as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<A>())).x as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(A), "::", stringify!(x))
);
assert_eq!(
- unsafe { &(*(0 as *const A)).y as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<A>())).y as *const _ as usize },
3usize,
concat!("Offset of field: ", stringify!(A), "::", stringify!(y))
);
@@ -539,12 +539,12 @@ fn bindgen_test_layout_C() {
concat!("Alignment of ", stringify!(C))
);
assert_eq!(
- unsafe { &(*(0 as *const C)).x as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<C>())).x as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(C), "::", stringify!(x))
);
assert_eq!(
- unsafe { &(*(0 as *const C)).baz as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<C>())).baz as *const _ as usize },
4usize,
concat!("Offset of field: ", stringify!(C), "::", stringify!(baz))
);
@@ -1041,7 +1041,7 @@ fn bindgen_test_layout_Date3() {
concat!("Alignment of ", stringify!(Date3))
);
assert_eq!(
- unsafe { &(*(0 as *const Date3)).byte as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Date3>())).byte as *const _ as usize },
3usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/blacklist-and-impl-debug.rs b/tests/expectations/tests/blacklist-and-impl-debug.rs
index 9cfab7c4..a5528af1 100644
--- a/tests/expectations/tests/blacklist-and-impl-debug.rs
+++ b/tests/expectations/tests/blacklist-and-impl-debug.rs
@@ -24,7 +24,7 @@ fn bindgen_test_layout_ShouldManuallyImplDebug() {
concat!("Alignment of ", stringify!(ShouldManuallyImplDebug))
);
assert_eq!(
- unsafe { &(*(0 as *const ShouldManuallyImplDebug)).a as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<ShouldManuallyImplDebug>())).a as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/char.rs b/tests/expectations/tests/char.rs
index f92331bb..ffaae3d1 100644
--- a/tests/expectations/tests/char.rs
+++ b/tests/expectations/tests/char.rs
@@ -36,52 +36,52 @@ fn bindgen_test_layout_Test() {
concat!("Alignment of ", stringify!(Test))
);
assert_eq!(
- unsafe { &(*(0 as *const Test)).ch as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Test>())).ch as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(Test), "::", stringify!(ch))
);
assert_eq!(
- unsafe { &(*(0 as *const Test)).u as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Test>())).u as *const _ as usize },
1usize,
concat!("Offset of field: ", stringify!(Test), "::", stringify!(u))
);
assert_eq!(
- unsafe { &(*(0 as *const Test)).d as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Test>())).d as *const _ as usize },
2usize,
concat!("Offset of field: ", stringify!(Test), "::", stringify!(d))
);
assert_eq!(
- unsafe { &(*(0 as *const Test)).cch as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Test>())).cch as *const _ as usize },
3usize,
concat!("Offset of field: ", stringify!(Test), "::", stringify!(cch))
);
assert_eq!(
- unsafe { &(*(0 as *const Test)).cu as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Test>())).cu as *const _ as usize },
4usize,
concat!("Offset of field: ", stringify!(Test), "::", stringify!(cu))
);
assert_eq!(
- unsafe { &(*(0 as *const Test)).cd as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Test>())).cd as *const _ as usize },
5usize,
concat!("Offset of field: ", stringify!(Test), "::", stringify!(cd))
);
assert_eq!(
- unsafe { &(*(0 as *const Test)).Cch as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Test>())).Cch as *const _ as usize },
6usize,
concat!("Offset of field: ", stringify!(Test), "::", stringify!(Cch))
);
assert_eq!(
- unsafe { &(*(0 as *const Test)).Cu as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Test>())).Cu as *const _ as usize },
7usize,
concat!("Offset of field: ", stringify!(Test), "::", stringify!(Cu))
);
assert_eq!(
- unsafe { &(*(0 as *const Test)).Cd as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Test>())).Cd as *const _ as usize },
8usize,
concat!("Offset of field: ", stringify!(Test), "::", stringify!(Cd))
);
assert_eq!(
- unsafe { &(*(0 as *const Test)).Ccch as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Test>())).Ccch as *const _ as usize },
9usize,
concat!(
"Offset of field: ",
@@ -91,12 +91,12 @@ fn bindgen_test_layout_Test() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const Test)).Ccu as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Test>())).Ccu as *const _ as usize },
10usize,
concat!("Offset of field: ", stringify!(Test), "::", stringify!(Ccu))
);
assert_eq!(
- unsafe { &(*(0 as *const Test)).Ccd as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Test>())).Ccd as *const _ as usize },
11usize,
concat!("Offset of field: ", stringify!(Test), "::", stringify!(Ccd))
);
diff --git a/tests/expectations/tests/class.rs b/tests/expectations/tests/class.rs
index 847a10c4..b5083957 100644
--- a/tests/expectations/tests/class.rs
+++ b/tests/expectations/tests/class.rs
@@ -60,12 +60,12 @@ fn bindgen_test_layout_C() {
concat!("Alignment of ", stringify!(C))
);
assert_eq!(
- unsafe { &(*(0 as *const C)).a as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<C>())).a as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(C), "::", stringify!(a))
);
assert_eq!(
- unsafe { &(*(0 as *const C)).big_array as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<C>())).big_array as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
@@ -99,7 +99,7 @@ fn bindgen_test_layout_C_with_zero_length_array() {
concat!("Alignment of ", stringify!(C_with_zero_length_array))
);
assert_eq!(
- unsafe { &(*(0 as *const C_with_zero_length_array)).a as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<C_with_zero_length_array>())).a as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -109,7 +109,9 @@ fn bindgen_test_layout_C_with_zero_length_array() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const C_with_zero_length_array)).big_array as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<C_with_zero_length_array>())).big_array as *const _ as usize
+ },
4usize,
concat!(
"Offset of field: ",
@@ -120,7 +122,8 @@ fn bindgen_test_layout_C_with_zero_length_array() {
);
assert_eq!(
unsafe {
- &(*(0 as *const C_with_zero_length_array)).zero_length_array as *const _ as usize
+ &(*(::std::ptr::null::<C_with_zero_length_array>())).zero_length_array as *const _
+ as usize
},
37usize,
concat!(
@@ -155,7 +158,7 @@ fn bindgen_test_layout_C_with_zero_length_array_2() {
concat!("Alignment of ", stringify!(C_with_zero_length_array_2))
);
assert_eq!(
- unsafe { &(*(0 as *const C_with_zero_length_array_2)).a as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<C_with_zero_length_array_2>())).a as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -166,7 +169,8 @@ fn bindgen_test_layout_C_with_zero_length_array_2() {
);
assert_eq!(
unsafe {
- &(*(0 as *const C_with_zero_length_array_2)).zero_length_array as *const _ as usize
+ &(*(::std::ptr::null::<C_with_zero_length_array_2>())).zero_length_array as *const _
+ as usize
},
4usize,
concat!(
@@ -295,7 +299,7 @@ fn bindgen_test_layout_WithDtor() {
concat!("Alignment of ", stringify!(WithDtor))
);
assert_eq!(
- unsafe { &(*(0 as *const WithDtor)).b as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<WithDtor>())).b as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -348,12 +352,12 @@ fn bindgen_test_layout_Union() {
concat!("Alignment of ", stringify!(Union))
);
assert_eq!(
- unsafe { &(*(0 as *const Union)).d as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Union>())).d as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(Union), "::", stringify!(d))
);
assert_eq!(
- unsafe { &(*(0 as *const Union)).i as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Union>())).i as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(Union), "::", stringify!(i))
);
@@ -381,7 +385,7 @@ fn bindgen_test_layout_WithUnion() {
concat!("Alignment of ", stringify!(WithUnion))
);
assert_eq!(
- unsafe { &(*(0 as *const WithUnion)).data as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<WithUnion>())).data as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/class_1_0.rs b/tests/expectations/tests/class_1_0.rs
index c20866df..333a6eb4 100644
--- a/tests/expectations/tests/class_1_0.rs
+++ b/tests/expectations/tests/class_1_0.rs
@@ -103,12 +103,12 @@ fn bindgen_test_layout_C() {
concat!("Alignment of ", stringify!(C))
);
assert_eq!(
- unsafe { &(*(0 as *const C)).a as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<C>())).a as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(C), "::", stringify!(a))
);
assert_eq!(
- unsafe { &(*(0 as *const C)).big_array as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<C>())).big_array as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
@@ -152,7 +152,7 @@ fn bindgen_test_layout_C_with_zero_length_array() {
concat!("Alignment of ", stringify!(C_with_zero_length_array))
);
assert_eq!(
- unsafe { &(*(0 as *const C_with_zero_length_array)).a as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<C_with_zero_length_array>())).a as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -162,7 +162,9 @@ fn bindgen_test_layout_C_with_zero_length_array() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const C_with_zero_length_array)).big_array as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<C_with_zero_length_array>())).big_array as *const _ as usize
+ },
4usize,
concat!(
"Offset of field: ",
@@ -173,7 +175,8 @@ fn bindgen_test_layout_C_with_zero_length_array() {
);
assert_eq!(
unsafe {
- &(*(0 as *const C_with_zero_length_array)).zero_length_array as *const _ as usize
+ &(*(::std::ptr::null::<C_with_zero_length_array>())).zero_length_array as *const _
+ as usize
},
37usize,
concat!(
@@ -208,7 +211,7 @@ fn bindgen_test_layout_C_with_zero_length_array_2() {
concat!("Alignment of ", stringify!(C_with_zero_length_array_2))
);
assert_eq!(
- unsafe { &(*(0 as *const C_with_zero_length_array_2)).a as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<C_with_zero_length_array_2>())).a as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -219,7 +222,8 @@ fn bindgen_test_layout_C_with_zero_length_array_2() {
);
assert_eq!(
unsafe {
- &(*(0 as *const C_with_zero_length_array_2)).zero_length_array as *const _ as usize
+ &(*(::std::ptr::null::<C_with_zero_length_array_2>())).zero_length_array as *const _
+ as usize
},
4usize,
concat!(
@@ -348,7 +352,7 @@ fn bindgen_test_layout_WithDtor() {
concat!("Alignment of ", stringify!(WithDtor))
);
assert_eq!(
- unsafe { &(*(0 as *const WithDtor)).b as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<WithDtor>())).b as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -401,12 +405,12 @@ fn bindgen_test_layout_Union() {
concat!("Alignment of ", stringify!(Union))
);
assert_eq!(
- unsafe { &(*(0 as *const Union)).d as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Union>())).d as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(Union), "::", stringify!(d))
);
assert_eq!(
- unsafe { &(*(0 as *const Union)).i as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Union>())).i as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(Union), "::", stringify!(i))
);
@@ -434,7 +438,7 @@ fn bindgen_test_layout_WithUnion() {
concat!("Alignment of ", stringify!(WithUnion))
);
assert_eq!(
- unsafe { &(*(0 as *const WithUnion)).data as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<WithUnion>())).data as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/class_nested.rs b/tests/expectations/tests/class_nested.rs
index 8d3ac228..7fee662a 100644
--- a/tests/expectations/tests/class_nested.rs
+++ b/tests/expectations/tests/class_nested.rs
@@ -27,7 +27,7 @@ fn bindgen_test_layout_A_B() {
concat!("Alignment of ", stringify!(A_B))
);
assert_eq!(
- unsafe { &(*(0 as *const A_B)).member_b as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<A_B>())).member_b as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -61,7 +61,7 @@ fn bindgen_test_layout_A() {
concat!("Alignment of ", stringify!(A))
);
assert_eq!(
- unsafe { &(*(0 as *const A)).member_a as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<A>())).member_a as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -89,7 +89,7 @@ fn bindgen_test_layout_A_C() {
concat!("Alignment of ", stringify!(A_C))
);
assert_eq!(
- unsafe { &(*(0 as *const A_C)).baz as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<A_C>())).baz as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(A_C), "::", stringify!(baz))
);
@@ -139,7 +139,7 @@ fn bindgen_test_layout_D() {
concat!("Alignment of ", stringify!(D))
);
assert_eq!(
- unsafe { &(*(0 as *const D)).member as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<D>())).member as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(D), "::", stringify!(member))
);
diff --git a/tests/expectations/tests/class_no_members.rs b/tests/expectations/tests/class_no_members.rs
index f6558b56..7da77892 100644
--- a/tests/expectations/tests/class_no_members.rs
+++ b/tests/expectations/tests/class_no_members.rs
@@ -58,7 +58,9 @@ fn bindgen_test_layout_whatever_child_with_member() {
concat!("Alignment of ", stringify!(whatever_child_with_member))
);
assert_eq!(
- unsafe { &(*(0 as *const whatever_child_with_member)).m_member as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<whatever_child_with_member>())).m_member as *const _ as usize
+ },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/class_use_as.rs b/tests/expectations/tests/class_use_as.rs
index fe5d1e6c..5882328d 100644
--- a/tests/expectations/tests/class_use_as.rs
+++ b/tests/expectations/tests/class_use_as.rs
@@ -24,7 +24,7 @@ fn bindgen_test_layout_whatever() {
concat!("Alignment of ", stringify!(whatever))
);
assert_eq!(
- unsafe { &(*(0 as *const whatever)).replacement as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<whatever>())).replacement as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -52,7 +52,7 @@ fn bindgen_test_layout_container() {
concat!("Alignment of ", stringify!(container))
);
assert_eq!(
- unsafe { &(*(0 as *const container)).c as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<container>())).c as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/class_with_dtor.rs b/tests/expectations/tests/class_with_dtor.rs
index 733aa071..4a5b090d 100644
--- a/tests/expectations/tests/class_with_dtor.rs
+++ b/tests/expectations/tests/class_with_dtor.rs
@@ -34,7 +34,7 @@ fn bindgen_test_layout_WithoutDtor() {
concat!("Alignment of ", stringify!(WithoutDtor))
);
assert_eq!(
- unsafe { &(*(0 as *const WithoutDtor)).shouldBeWithDtor as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<WithoutDtor>())).shouldBeWithDtor as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/class_with_inner_struct.rs b/tests/expectations/tests/class_with_inner_struct.rs
index 02c7fd0a..ecdbdf9f 100644
--- a/tests/expectations/tests/class_with_inner_struct.rs
+++ b/tests/expectations/tests/class_with_inner_struct.rs
@@ -30,7 +30,7 @@ fn bindgen_test_layout_A_Segment() {
concat!("Alignment of ", stringify!(A_Segment))
);
assert_eq!(
- unsafe { &(*(0 as *const A_Segment)).begin as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<A_Segment>())).begin as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -40,7 +40,7 @@ fn bindgen_test_layout_A_Segment() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const A_Segment)).end as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<A_Segment>())).end as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
@@ -69,7 +69,7 @@ fn bindgen_test_layout_A__bindgen_ty_1() {
concat!("Alignment of ", stringify!(A__bindgen_ty_1))
);
assert_eq!(
- unsafe { &(*(0 as *const A__bindgen_ty_1)).f as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<A__bindgen_ty_1>())).f as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -103,7 +103,7 @@ fn bindgen_test_layout_A__bindgen_ty_2() {
concat!("Alignment of ", stringify!(A__bindgen_ty_2))
);
assert_eq!(
- unsafe { &(*(0 as *const A__bindgen_ty_2)).d as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<A__bindgen_ty_2>())).d as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -131,12 +131,12 @@ fn bindgen_test_layout_A() {
concat!("Alignment of ", stringify!(A))
);
assert_eq!(
- unsafe { &(*(0 as *const A)).c as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<A>())).c as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(A), "::", stringify!(c))
);
assert_eq!(
- unsafe { &(*(0 as *const A)).named_union as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<A>())).named_union as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
@@ -175,7 +175,7 @@ fn bindgen_test_layout_B_Segment() {
concat!("Alignment of ", stringify!(B_Segment))
);
assert_eq!(
- unsafe { &(*(0 as *const B_Segment)).begin as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<B_Segment>())).begin as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -185,7 +185,7 @@ fn bindgen_test_layout_B_Segment() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const B_Segment)).end as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<B_Segment>())).end as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
@@ -208,7 +208,7 @@ fn bindgen_test_layout_B() {
concat!("Alignment of ", stringify!(B))
);
assert_eq!(
- unsafe { &(*(0 as *const B)).d as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<B>())).d as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(B), "::", stringify!(d))
);
@@ -255,7 +255,9 @@ fn bindgen_test_layout_C__bindgen_ty_1__bindgen_ty_1() {
concat!("Alignment of ", stringify!(C__bindgen_ty_1__bindgen_ty_1))
);
assert_eq!(
- unsafe { &(*(0 as *const C__bindgen_ty_1__bindgen_ty_1)).mX1 as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<C__bindgen_ty_1__bindgen_ty_1>())).mX1 as *const _ as usize
+ },
0usize,
concat!(
"Offset of field: ",
@@ -265,7 +267,9 @@ fn bindgen_test_layout_C__bindgen_ty_1__bindgen_ty_1() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const C__bindgen_ty_1__bindgen_ty_1)).mY1 as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<C__bindgen_ty_1__bindgen_ty_1>())).mY1 as *const _ as usize
+ },
4usize,
concat!(
"Offset of field: ",
@@ -275,7 +279,9 @@ fn bindgen_test_layout_C__bindgen_ty_1__bindgen_ty_1() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const C__bindgen_ty_1__bindgen_ty_1)).mX2 as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<C__bindgen_ty_1__bindgen_ty_1>())).mX2 as *const _ as usize
+ },
8usize,
concat!(
"Offset of field: ",
@@ -285,7 +291,9 @@ fn bindgen_test_layout_C__bindgen_ty_1__bindgen_ty_1() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const C__bindgen_ty_1__bindgen_ty_1)).mY2 as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<C__bindgen_ty_1__bindgen_ty_1>())).mY2 as *const _ as usize
+ },
12usize,
concat!(
"Offset of field: ",
@@ -314,7 +322,10 @@ fn bindgen_test_layout_C__bindgen_ty_1__bindgen_ty_2() {
concat!("Alignment of ", stringify!(C__bindgen_ty_1__bindgen_ty_2))
);
assert_eq!(
- unsafe { &(*(0 as *const C__bindgen_ty_1__bindgen_ty_2)).mStepSyntax as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<C__bindgen_ty_1__bindgen_ty_2>())).mStepSyntax as *const _
+ as usize
+ },
0usize,
concat!(
"Offset of field: ",
@@ -324,7 +335,9 @@ fn bindgen_test_layout_C__bindgen_ty_1__bindgen_ty_2() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const C__bindgen_ty_1__bindgen_ty_2)).mSteps as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<C__bindgen_ty_1__bindgen_ty_2>())).mSteps as *const _ as usize
+ },
4usize,
concat!(
"Offset of field: ",
@@ -352,7 +365,7 @@ fn bindgen_test_layout_C__bindgen_ty_1() {
concat!("Alignment of ", stringify!(C__bindgen_ty_1))
);
assert_eq!(
- unsafe { &(*(0 as *const C__bindgen_ty_1)).mFunc as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<C__bindgen_ty_1>())).mFunc as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -386,7 +399,7 @@ fn bindgen_test_layout_C_Segment() {
concat!("Alignment of ", stringify!(C_Segment))
);
assert_eq!(
- unsafe { &(*(0 as *const C_Segment)).begin as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<C_Segment>())).begin as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -396,7 +409,7 @@ fn bindgen_test_layout_C_Segment() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const C_Segment)).end as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<C_Segment>())).end as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
@@ -419,7 +432,7 @@ fn bindgen_test_layout_C() {
concat!("Alignment of ", stringify!(C))
);
assert_eq!(
- unsafe { &(*(0 as *const C)).d as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<C>())).d as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(C), "::", stringify!(d))
);
diff --git a/tests/expectations/tests/class_with_inner_struct_1_0.rs b/tests/expectations/tests/class_with_inner_struct_1_0.rs
index f37c0f93..1236950c 100644
--- a/tests/expectations/tests/class_with_inner_struct_1_0.rs
+++ b/tests/expectations/tests/class_with_inner_struct_1_0.rs
@@ -73,7 +73,7 @@ fn bindgen_test_layout_A_Segment() {
concat!("Alignment of ", stringify!(A_Segment))
);
assert_eq!(
- unsafe { &(*(0 as *const A_Segment)).begin as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<A_Segment>())).begin as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -83,7 +83,7 @@ fn bindgen_test_layout_A_Segment() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const A_Segment)).end as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<A_Segment>())).end as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
@@ -117,7 +117,7 @@ fn bindgen_test_layout_A__bindgen_ty_1() {
concat!("Alignment of ", stringify!(A__bindgen_ty_1))
);
assert_eq!(
- unsafe { &(*(0 as *const A__bindgen_ty_1)).f as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<A__bindgen_ty_1>())).f as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -151,7 +151,7 @@ fn bindgen_test_layout_A__bindgen_ty_2() {
concat!("Alignment of ", stringify!(A__bindgen_ty_2))
);
assert_eq!(
- unsafe { &(*(0 as *const A__bindgen_ty_2)).d as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<A__bindgen_ty_2>())).d as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -179,12 +179,12 @@ fn bindgen_test_layout_A() {
concat!("Alignment of ", stringify!(A))
);
assert_eq!(
- unsafe { &(*(0 as *const A)).c as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<A>())).c as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(A), "::", stringify!(c))
);
assert_eq!(
- unsafe { &(*(0 as *const A)).named_union as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<A>())).named_union as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
@@ -223,7 +223,7 @@ fn bindgen_test_layout_B_Segment() {
concat!("Alignment of ", stringify!(B_Segment))
);
assert_eq!(
- unsafe { &(*(0 as *const B_Segment)).begin as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<B_Segment>())).begin as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -233,7 +233,7 @@ fn bindgen_test_layout_B_Segment() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const B_Segment)).end as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<B_Segment>())).end as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
@@ -261,7 +261,7 @@ fn bindgen_test_layout_B() {
concat!("Alignment of ", stringify!(B))
);
assert_eq!(
- unsafe { &(*(0 as *const B)).d as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<B>())).d as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(B), "::", stringify!(d))
);
@@ -313,7 +313,9 @@ fn bindgen_test_layout_C__bindgen_ty_1__bindgen_ty_1() {
concat!("Alignment of ", stringify!(C__bindgen_ty_1__bindgen_ty_1))
);
assert_eq!(
- unsafe { &(*(0 as *const C__bindgen_ty_1__bindgen_ty_1)).mX1 as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<C__bindgen_ty_1__bindgen_ty_1>())).mX1 as *const _ as usize
+ },
0usize,
concat!(
"Offset of field: ",
@@ -323,7 +325,9 @@ fn bindgen_test_layout_C__bindgen_ty_1__bindgen_ty_1() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const C__bindgen_ty_1__bindgen_ty_1)).mY1 as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<C__bindgen_ty_1__bindgen_ty_1>())).mY1 as *const _ as usize
+ },
4usize,
concat!(
"Offset of field: ",
@@ -333,7 +337,9 @@ fn bindgen_test_layout_C__bindgen_ty_1__bindgen_ty_1() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const C__bindgen_ty_1__bindgen_ty_1)).mX2 as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<C__bindgen_ty_1__bindgen_ty_1>())).mX2 as *const _ as usize
+ },
8usize,
concat!(
"Offset of field: ",
@@ -343,7 +349,9 @@ fn bindgen_test_layout_C__bindgen_ty_1__bindgen_ty_1() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const C__bindgen_ty_1__bindgen_ty_1)).mY2 as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<C__bindgen_ty_1__bindgen_ty_1>())).mY2 as *const _ as usize
+ },
12usize,
concat!(
"Offset of field: ",
@@ -377,7 +385,10 @@ fn bindgen_test_layout_C__bindgen_ty_1__bindgen_ty_2() {
concat!("Alignment of ", stringify!(C__bindgen_ty_1__bindgen_ty_2))
);
assert_eq!(
- unsafe { &(*(0 as *const C__bindgen_ty_1__bindgen_ty_2)).mStepSyntax as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<C__bindgen_ty_1__bindgen_ty_2>())).mStepSyntax as *const _
+ as usize
+ },
0usize,
concat!(
"Offset of field: ",
@@ -387,7 +398,9 @@ fn bindgen_test_layout_C__bindgen_ty_1__bindgen_ty_2() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const C__bindgen_ty_1__bindgen_ty_2)).mSteps as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<C__bindgen_ty_1__bindgen_ty_2>())).mSteps as *const _ as usize
+ },
4usize,
concat!(
"Offset of field: ",
@@ -420,7 +433,7 @@ fn bindgen_test_layout_C__bindgen_ty_1() {
concat!("Alignment of ", stringify!(C__bindgen_ty_1))
);
assert_eq!(
- unsafe { &(*(0 as *const C__bindgen_ty_1)).mFunc as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<C__bindgen_ty_1>())).mFunc as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -454,7 +467,7 @@ fn bindgen_test_layout_C_Segment() {
concat!("Alignment of ", stringify!(C_Segment))
);
assert_eq!(
- unsafe { &(*(0 as *const C_Segment)).begin as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<C_Segment>())).begin as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -464,7 +477,7 @@ fn bindgen_test_layout_C_Segment() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const C_Segment)).end as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<C_Segment>())).end as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
@@ -492,7 +505,7 @@ fn bindgen_test_layout_C() {
concat!("Alignment of ", stringify!(C))
);
assert_eq!(
- unsafe { &(*(0 as *const C)).d as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<C>())).d as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(C), "::", stringify!(d))
);
diff --git a/tests/expectations/tests/class_with_typedef.rs b/tests/expectations/tests/class_with_typedef.rs
index b560567e..221ed5d7 100644
--- a/tests/expectations/tests/class_with_typedef.rs
+++ b/tests/expectations/tests/class_with_typedef.rs
@@ -29,27 +29,27 @@ fn bindgen_test_layout_C() {
concat!("Alignment of ", stringify!(C))
);
assert_eq!(
- unsafe { &(*(0 as *const C)).c as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<C>())).c as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(C), "::", stringify!(c))
);
assert_eq!(
- unsafe { &(*(0 as *const C)).ptr as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<C>())).ptr as *const _ as usize },
8usize,
concat!("Offset of field: ", stringify!(C), "::", stringify!(ptr))
);
assert_eq!(
- unsafe { &(*(0 as *const C)).arr as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<C>())).arr as *const _ as usize },
16usize,
concat!("Offset of field: ", stringify!(C), "::", stringify!(arr))
);
assert_eq!(
- unsafe { &(*(0 as *const C)).d as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<C>())).d as *const _ as usize },
56usize,
concat!("Offset of field: ", stringify!(C), "::", stringify!(d))
);
assert_eq!(
- unsafe { &(*(0 as *const C)).other_ptr as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<C>())).other_ptr as *const _ as usize },
64usize,
concat!(
"Offset of field: ",
@@ -117,7 +117,7 @@ fn bindgen_test_layout_D() {
concat!("Alignment of ", stringify!(D))
);
assert_eq!(
- unsafe { &(*(0 as *const D)).ptr as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<D>())).ptr as *const _ as usize },
72usize,
concat!("Offset of field: ", stringify!(D), "::", stringify!(ptr))
);
diff --git a/tests/expectations/tests/comment-indent.rs b/tests/expectations/tests/comment-indent.rs
index 8d69a34c..f00b0235 100644
--- a/tests/expectations/tests/comment-indent.rs
+++ b/tests/expectations/tests/comment-indent.rs
@@ -80,7 +80,7 @@ pub mod root {
concat!("Alignment of ", stringify!(Baz))
);
assert_eq!(
- unsafe { &(*(0 as *const Baz)).member as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Baz>())).member as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/complex.rs b/tests/expectations/tests/complex.rs
index 1fb70fa1..317bb99a 100644
--- a/tests/expectations/tests/complex.rs
+++ b/tests/expectations/tests/complex.rs
@@ -28,7 +28,7 @@ fn bindgen_test_layout_TestDouble() {
concat!("Alignment of ", stringify!(TestDouble))
);
assert_eq!(
- unsafe { &(*(0 as *const TestDouble)).mMember as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<TestDouble>())).mMember as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -56,7 +56,7 @@ fn bindgen_test_layout_TestDoublePtr() {
concat!("Alignment of ", stringify!(TestDoublePtr))
);
assert_eq!(
- unsafe { &(*(0 as *const TestDoublePtr)).mMember as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<TestDoublePtr>())).mMember as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -89,7 +89,7 @@ fn bindgen_test_layout_TestFloat() {
concat!("Alignment of ", stringify!(TestFloat))
);
assert_eq!(
- unsafe { &(*(0 as *const TestFloat)).mMember as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<TestFloat>())).mMember as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -117,7 +117,7 @@ fn bindgen_test_layout_TestFloatPtr() {
concat!("Alignment of ", stringify!(TestFloatPtr))
);
assert_eq!(
- unsafe { &(*(0 as *const TestFloatPtr)).mMember as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<TestFloatPtr>())).mMember as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/constify-all-enums.rs b/tests/expectations/tests/constify-all-enums.rs
index 40797371..1d518b54 100644
--- a/tests/expectations/tests/constify-all-enums.rs
+++ b/tests/expectations/tests/constify-all-enums.rs
@@ -26,7 +26,7 @@ fn bindgen_test_layout_bar() {
concat!("Alignment of ", stringify!(bar))
);
assert_eq!(
- unsafe { &(*(0 as *const bar)).this_should_work as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<bar>())).this_should_work as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/constify-module-enums-basic.rs b/tests/expectations/tests/constify-module-enums-basic.rs
index d4b6572e..f8f45f18 100644
--- a/tests/expectations/tests/constify-module-enums-basic.rs
+++ b/tests/expectations/tests/constify-module-enums-basic.rs
@@ -30,7 +30,7 @@ fn bindgen_test_layout_bar() {
concat!("Alignment of ", stringify!(bar))
);
assert_eq!(
- unsafe { &(*(0 as *const bar)).this_should_work as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<bar>())).this_should_work as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/constify-module-enums-namespace.rs b/tests/expectations/tests/constify-module-enums-namespace.rs
index 1f8b3c12..a69044e2 100644
--- a/tests/expectations/tests/constify-module-enums-namespace.rs
+++ b/tests/expectations/tests/constify-module-enums-namespace.rs
@@ -42,7 +42,9 @@ pub mod root {
concat!("Alignment of ", stringify!(bar))
);
assert_eq!(
- unsafe { &(*(0 as *const bar)).this_should_work as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<bar>())).this_should_work as *const _ as usize
+ },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/constify-module-enums-shadow-name.rs b/tests/expectations/tests/constify-module-enums-shadow-name.rs
index 33f25b50..b7da1cc3 100644
--- a/tests/expectations/tests/constify-module-enums-shadow-name.rs
+++ b/tests/expectations/tests/constify-module-enums-shadow-name.rs
@@ -29,7 +29,7 @@ fn bindgen_test_layout_bar() {
concat!("Alignment of ", stringify!(bar))
);
assert_eq!(
- unsafe { &(*(0 as *const bar)).member as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<bar>())).member as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/constify-module-enums-simple-alias.rs b/tests/expectations/tests/constify-module-enums-simple-alias.rs
index 04203428..89b3ead9 100644
--- a/tests/expectations/tests/constify-module-enums-simple-alias.rs
+++ b/tests/expectations/tests/constify-module-enums-simple-alias.rs
@@ -38,27 +38,27 @@ fn bindgen_test_layout_Bar() {
concat!("Alignment of ", stringify!(Bar))
);
assert_eq!(
- unsafe { &(*(0 as *const Bar)).baz1 as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Bar>())).baz1 as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(Bar), "::", stringify!(baz1))
);
assert_eq!(
- unsafe { &(*(0 as *const Bar)).baz2 as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Bar>())).baz2 as *const _ as usize },
4usize,
concat!("Offset of field: ", stringify!(Bar), "::", stringify!(baz2))
);
assert_eq!(
- unsafe { &(*(0 as *const Bar)).baz3 as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Bar>())).baz3 as *const _ as usize },
8usize,
concat!("Offset of field: ", stringify!(Bar), "::", stringify!(baz3))
);
assert_eq!(
- unsafe { &(*(0 as *const Bar)).baz4 as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Bar>())).baz4 as *const _ as usize },
12usize,
concat!("Offset of field: ", stringify!(Bar), "::", stringify!(baz4))
);
assert_eq!(
- unsafe { &(*(0 as *const Bar)).baz_ptr1 as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Bar>())).baz_ptr1 as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
@@ -68,7 +68,7 @@ fn bindgen_test_layout_Bar() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const Bar)).baz_ptr2 as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Bar>())).baz_ptr2 as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
@@ -78,7 +78,7 @@ fn bindgen_test_layout_Bar() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const Bar)).baz_ptr3 as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Bar>())).baz_ptr3 as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
@@ -88,7 +88,7 @@ fn bindgen_test_layout_Bar() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const Bar)).baz_ptr4 as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Bar>())).baz_ptr4 as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/constify-module-enums-simple-nonamespace.rs b/tests/expectations/tests/constify-module-enums-simple-nonamespace.rs
index 7927f3b0..b85edbae 100644
--- a/tests/expectations/tests/constify-module-enums-simple-nonamespace.rs
+++ b/tests/expectations/tests/constify-module-enums-simple-nonamespace.rs
@@ -28,12 +28,12 @@ fn bindgen_test_layout_Bar() {
concat!("Alignment of ", stringify!(Bar))
);
assert_eq!(
- unsafe { &(*(0 as *const Bar)).baz1 as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Bar>())).baz1 as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(Bar), "::", stringify!(baz1))
);
assert_eq!(
- unsafe { &(*(0 as *const Bar)).baz2 as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Bar>())).baz2 as *const _ as usize },
8usize,
concat!("Offset of field: ", stringify!(Bar), "::", stringify!(baz2))
);
diff --git a/tests/expectations/tests/constify-module-enums-types.rs b/tests/expectations/tests/constify-module-enums-types.rs
index c5cd9a3d..8849cc38 100644
--- a/tests/expectations/tests/constify-module-enums-types.rs
+++ b/tests/expectations/tests/constify-module-enums-types.rs
@@ -63,7 +63,7 @@ fn bindgen_test_layout_bar() {
concat!("Alignment of ", stringify!(bar))
);
assert_eq!(
- unsafe { &(*(0 as *const bar)).member1 as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<bar>())).member1 as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -73,7 +73,7 @@ fn bindgen_test_layout_bar() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const bar)).member2 as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<bar>())).member2 as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
@@ -83,7 +83,7 @@ fn bindgen_test_layout_bar() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const bar)).member3 as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<bar>())).member3 as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
@@ -93,7 +93,7 @@ fn bindgen_test_layout_bar() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const bar)).member4 as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<bar>())).member4 as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
@@ -103,7 +103,7 @@ fn bindgen_test_layout_bar() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const bar)).member5 as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<bar>())).member5 as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
@@ -113,7 +113,7 @@ fn bindgen_test_layout_bar() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const bar)).member6 as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<bar>())).member6 as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
@@ -123,7 +123,7 @@ fn bindgen_test_layout_bar() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const bar)).member7 as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<bar>())).member7 as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
@@ -133,7 +133,7 @@ fn bindgen_test_layout_bar() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const bar)).member8 as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<bar>())).member8 as *const _ as usize },
36usize,
concat!(
"Offset of field: ",
@@ -143,7 +143,7 @@ fn bindgen_test_layout_bar() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const bar)).member9 as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<bar>())).member9 as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
@@ -153,7 +153,7 @@ fn bindgen_test_layout_bar() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const bar)).member10 as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<bar>())).member10 as *const _ as usize },
44usize,
concat!(
"Offset of field: ",
@@ -186,7 +186,7 @@ fn bindgen_test_layout_Baz() {
concat!("Alignment of ", stringify!(Baz))
);
assert_eq!(
- unsafe { &(*(0 as *const Baz)).member1 as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Baz>())).member1 as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -224,7 +224,7 @@ fn bindgen_test_layout_Bar() {
concat!("Alignment of ", stringify!(Bar))
);
assert_eq!(
- unsafe { &(*(0 as *const Bar)).baz as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Bar>())).baz as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(Bar), "::", stringify!(baz))
);
diff --git a/tests/expectations/tests/contains-vs-inherits-zero-sized.rs b/tests/expectations/tests/contains-vs-inherits-zero-sized.rs
index c649171b..16139a06 100644
--- a/tests/expectations/tests/contains-vs-inherits-zero-sized.rs
+++ b/tests/expectations/tests/contains-vs-inherits-zero-sized.rs
@@ -44,7 +44,7 @@ fn bindgen_test_layout_Inherits() {
concat!("Alignment of ", stringify!(Inherits))
);
assert_eq!(
- unsafe { &(*(0 as *const Inherits)).b as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Inherits>())).b as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -75,7 +75,7 @@ fn bindgen_test_layout_Contains() {
concat!("Alignment of ", stringify!(Contains))
);
assert_eq!(
- unsafe { &(*(0 as *const Contains)).empty as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Contains>())).empty as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -85,7 +85,7 @@ fn bindgen_test_layout_Contains() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const Contains)).b as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Contains>())).b as *const _ as usize },
1usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/convert-cpp-comment-to-rust.rs b/tests/expectations/tests/convert-cpp-comment-to-rust.rs
index cad54c29..f9f8e200 100644
--- a/tests/expectations/tests/convert-cpp-comment-to-rust.rs
+++ b/tests/expectations/tests/convert-cpp-comment-to-rust.rs
@@ -29,7 +29,7 @@ fn bindgen_test_layout_mbedtls_mpi() {
concat!("Alignment of ", stringify!(mbedtls_mpi))
);
assert_eq!(
- unsafe { &(*(0 as *const mbedtls_mpi)).s as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<mbedtls_mpi>())).s as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -39,7 +39,7 @@ fn bindgen_test_layout_mbedtls_mpi() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const mbedtls_mpi)).n as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<mbedtls_mpi>())).n as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
@@ -49,7 +49,7 @@ fn bindgen_test_layout_mbedtls_mpi() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const mbedtls_mpi)).p as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<mbedtls_mpi>())).p as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/convert-floats.rs b/tests/expectations/tests/convert-floats.rs
index c46cf6d4..e1e93a13 100644
--- a/tests/expectations/tests/convert-floats.rs
+++ b/tests/expectations/tests/convert-floats.rs
@@ -33,22 +33,22 @@ fn bindgen_test_layout_foo() {
concat!("Alignment of ", stringify!(foo))
);
assert_eq!(
- unsafe { &(*(0 as *const foo)).bar as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<foo>())).bar as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(foo), "::", stringify!(bar))
);
assert_eq!(
- unsafe { &(*(0 as *const foo)).baz as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<foo>())).baz as *const _ as usize },
4usize,
concat!("Offset of field: ", stringify!(foo), "::", stringify!(baz))
);
assert_eq!(
- unsafe { &(*(0 as *const foo)).bazz as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<foo>())).bazz as *const _ as usize },
8usize,
concat!("Offset of field: ", stringify!(foo), "::", stringify!(bazz))
);
assert_eq!(
- unsafe { &(*(0 as *const foo)).bazzz as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<foo>())).bazzz as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
@@ -58,7 +58,7 @@ fn bindgen_test_layout_foo() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const foo)).complexFloat as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<foo>())).complexFloat as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
@@ -68,7 +68,7 @@ fn bindgen_test_layout_foo() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const foo)).complexDouble as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<foo>())).complexDouble as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/derive-bitfield-method-same-name.rs b/tests/expectations/tests/derive-bitfield-method-same-name.rs
index a3d9870d..cc15b2e6 100644
--- a/tests/expectations/tests/derive-bitfield-method-same-name.rs
+++ b/tests/expectations/tests/derive-bitfield-method-same-name.rs
@@ -28,7 +28,7 @@ fn bindgen_test_layout_Foo() {
concat!("Alignment of ", stringify!(Foo))
);
assert_eq!(
- unsafe { &(*(0 as *const Foo)).large as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Foo>())).large as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/derive-clone.rs b/tests/expectations/tests/derive-clone.rs
index 5f22e827..fda94f99 100644
--- a/tests/expectations/tests/derive-clone.rs
+++ b/tests/expectations/tests/derive-clone.rs
@@ -24,7 +24,7 @@ fn bindgen_test_layout_ShouldDeriveClone() {
concat!("Alignment of ", stringify!(ShouldDeriveClone))
);
assert_eq!(
- unsafe { &(*(0 as *const ShouldDeriveClone)).large as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<ShouldDeriveClone>())).large as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/derive-clone_1_0.rs b/tests/expectations/tests/derive-clone_1_0.rs
index 5e493e6c..c71eb92f 100644
--- a/tests/expectations/tests/derive-clone_1_0.rs
+++ b/tests/expectations/tests/derive-clone_1_0.rs
@@ -25,7 +25,7 @@ fn bindgen_test_layout_ShouldImplClone() {
concat!("Alignment of ", stringify!(ShouldImplClone))
);
assert_eq!(
- unsafe { &(*(0 as *const ShouldImplClone)).large as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<ShouldImplClone>())).large as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/derive-debug-bitfield.rs b/tests/expectations/tests/derive-debug-bitfield.rs
index 33800ab2..650c1f98 100644
--- a/tests/expectations/tests/derive-debug-bitfield.rs
+++ b/tests/expectations/tests/derive-debug-bitfield.rs
@@ -23,7 +23,7 @@ fn bindgen_test_layout_C() {
concat!("Alignment of ", stringify!(C))
);
assert_eq!(
- unsafe { &(*(0 as *const C)).large_array as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<C>())).large_array as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/derive-debug-function-pointer.rs b/tests/expectations/tests/derive-debug-function-pointer.rs
index 25a0f737..c7aed70d 100644
--- a/tests/expectations/tests/derive-debug-function-pointer.rs
+++ b/tests/expectations/tests/derive-debug-function-pointer.rs
@@ -24,7 +24,7 @@ fn bindgen_test_layout_Nice() {
concat!("Alignment of ", stringify!(Nice))
);
assert_eq!(
- unsafe { &(*(0 as *const Nice)).pointer as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Nice>())).pointer as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -34,7 +34,7 @@ fn bindgen_test_layout_Nice() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const Nice)).large_array as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Nice>())).large_array as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/derive-debug-mangle-name.rs b/tests/expectations/tests/derive-debug-mangle-name.rs
index 3b25664d..acdcba10 100644
--- a/tests/expectations/tests/derive-debug-mangle-name.rs
+++ b/tests/expectations/tests/derive-debug-mangle-name.rs
@@ -31,7 +31,7 @@ fn bindgen_test_layout_perf_event_attr__bindgen_ty_1() {
concat!("Alignment of ", stringify!(perf_event_attr__bindgen_ty_1))
);
assert_eq!(
- unsafe { &(*(0 as *const perf_event_attr__bindgen_ty_1)).b as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<perf_event_attr__bindgen_ty_1>())).b as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -41,7 +41,7 @@ fn bindgen_test_layout_perf_event_attr__bindgen_ty_1() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const perf_event_attr__bindgen_ty_1)).c as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<perf_event_attr__bindgen_ty_1>())).c as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -74,7 +74,7 @@ fn bindgen_test_layout_perf_event_attr() {
concat!("Alignment of ", stringify!(perf_event_attr))
);
assert_eq!(
- unsafe { &(*(0 as *const perf_event_attr)).type_ as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<perf_event_attr>())).type_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -84,7 +84,7 @@ fn bindgen_test_layout_perf_event_attr() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const perf_event_attr)).a as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<perf_event_attr>())).a as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/derive-debug-opaque-template-instantiation.rs b/tests/expectations/tests/derive-debug-opaque-template-instantiation.rs
index 058b3cc8..f323245e 100644
--- a/tests/expectations/tests/derive-debug-opaque-template-instantiation.rs
+++ b/tests/expectations/tests/derive-debug-opaque-template-instantiation.rs
@@ -21,7 +21,7 @@ fn bindgen_test_layout_Instance() {
concat!("Alignment of ", stringify!(Instance))
);
assert_eq!(
- unsafe { &(*(0 as *const Instance)).val as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Instance>())).val as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/derive-debug-opaque.rs b/tests/expectations/tests/derive-debug-opaque.rs
index 128cfe7e..a18e210c 100644
--- a/tests/expectations/tests/derive-debug-opaque.rs
+++ b/tests/expectations/tests/derive-debug-opaque.rs
@@ -48,7 +48,7 @@ fn bindgen_test_layout_OpaqueUser() {
concat!("Alignment of ", stringify!(OpaqueUser))
);
assert_eq!(
- unsafe { &(*(0 as *const OpaqueUser)).opaque as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<OpaqueUser>())).opaque as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/derive-default-and-blacklist.rs b/tests/expectations/tests/derive-default-and-blacklist.rs
index 698caf0b..7b1b1afc 100644
--- a/tests/expectations/tests/derive-default-and-blacklist.rs
+++ b/tests/expectations/tests/derive-default-and-blacklist.rs
@@ -25,7 +25,7 @@ fn bindgen_test_layout_ShouldNotDeriveDefault() {
concat!("Alignment of ", stringify!(ShouldNotDeriveDefault))
);
assert_eq!(
- unsafe { &(*(0 as *const ShouldNotDeriveDefault)).a as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<ShouldNotDeriveDefault>())).a as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/derive-fn-ptr.rs b/tests/expectations/tests/derive-fn-ptr.rs
index 51efa7af..4b7105e9 100644
--- a/tests/expectations/tests/derive-fn-ptr.rs
+++ b/tests/expectations/tests/derive-fn-ptr.rs
@@ -42,7 +42,7 @@ fn bindgen_test_layout_Foo() {
concat!("Alignment of ", stringify!(Foo))
);
assert_eq!(
- unsafe { &(*(0 as *const Foo)).callback as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Foo>())).callback as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -91,7 +91,7 @@ fn bindgen_test_layout_Bar() {
concat!("Alignment of ", stringify!(Bar))
);
assert_eq!(
- unsafe { &(*(0 as *const Bar)).callback as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Bar>())).callback as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/derive-hash-and-blacklist.rs b/tests/expectations/tests/derive-hash-and-blacklist.rs
index 31e3415a..ef12b9a8 100644
--- a/tests/expectations/tests/derive-hash-and-blacklist.rs
+++ b/tests/expectations/tests/derive-hash-and-blacklist.rs
@@ -24,7 +24,7 @@ fn bindgen_test_layout_ShouldNotDeriveHash() {
concat!("Alignment of ", stringify!(ShouldNotDeriveHash))
);
assert_eq!(
- unsafe { &(*(0 as *const ShouldNotDeriveHash)).a as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<ShouldNotDeriveHash>())).a as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/derive-hash-blacklisting.rs b/tests/expectations/tests/derive-hash-blacklisting.rs
index a371536d..fa35d6ca 100644
--- a/tests/expectations/tests/derive-hash-blacklisting.rs
+++ b/tests/expectations/tests/derive-hash-blacklisting.rs
@@ -30,7 +30,7 @@ fn bindgen_test_layout_WhitelistedOne() {
concat!("Alignment of ", stringify!(WhitelistedOne))
);
assert_eq!(
- unsafe { &(*(0 as *const WhitelistedOne)).a as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<WhitelistedOne>())).a as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -63,7 +63,7 @@ fn bindgen_test_layout_WhitelistedTwo() {
concat!("Alignment of ", stringify!(WhitelistedTwo))
);
assert_eq!(
- unsafe { &(*(0 as *const WhitelistedTwo)).b as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<WhitelistedTwo>())).b as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/derive-hash-struct-with-anon-struct-float.rs b/tests/expectations/tests/derive-hash-struct-with-anon-struct-float.rs
index 5a0afd9b..11c86de4 100644
--- a/tests/expectations/tests/derive-hash-struct-with-anon-struct-float.rs
+++ b/tests/expectations/tests/derive-hash-struct-with-anon-struct-float.rs
@@ -30,7 +30,7 @@ fn bindgen_test_layout_foo__bindgen_ty_1() {
concat!("Alignment of ", stringify!(foo__bindgen_ty_1))
);
assert_eq!(
- unsafe { &(*(0 as *const foo__bindgen_ty_1)).a as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<foo__bindgen_ty_1>())).a as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -40,7 +40,7 @@ fn bindgen_test_layout_foo__bindgen_ty_1() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const foo__bindgen_ty_1)).b as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<foo__bindgen_ty_1>())).b as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
@@ -63,7 +63,7 @@ fn bindgen_test_layout_foo() {
concat!("Alignment of ", stringify!(foo))
);
assert_eq!(
- unsafe { &(*(0 as *const foo)).bar as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<foo>())).bar as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(foo), "::", stringify!(bar))
);
diff --git a/tests/expectations/tests/derive-hash-struct-with-float-array.rs b/tests/expectations/tests/derive-hash-struct-with-float-array.rs
index 5b65ddcd..12ac57aa 100644
--- a/tests/expectations/tests/derive-hash-struct-with-float-array.rs
+++ b/tests/expectations/tests/derive-hash-struct-with-float-array.rs
@@ -24,7 +24,7 @@ fn bindgen_test_layout_foo() {
concat!("Alignment of ", stringify!(foo))
);
assert_eq!(
- unsafe { &(*(0 as *const foo)).bar as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<foo>())).bar as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(foo), "::", stringify!(bar))
);
diff --git a/tests/expectations/tests/derive-hash-struct-with-incomplete-array.rs b/tests/expectations/tests/derive-hash-struct-with-incomplete-array.rs
index d5173421..7f56de7b 100644
--- a/tests/expectations/tests/derive-hash-struct-with-incomplete-array.rs
+++ b/tests/expectations/tests/derive-hash-struct-with-incomplete-array.rs
@@ -60,12 +60,12 @@ fn bindgen_test_layout_test() {
concat!("Alignment of ", stringify!(test))
);
assert_eq!(
- unsafe { &(*(0 as *const test)).a as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<test>())).a as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(test), "::", stringify!(a))
);
assert_eq!(
- unsafe { &(*(0 as *const test)).zero_length_array as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<test>())).zero_length_array as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/derive-hash-struct-with-pointer.rs b/tests/expectations/tests/derive-hash-struct-with-pointer.rs
index 4192726d..ee41c4f4 100644
--- a/tests/expectations/tests/derive-hash-struct-with-pointer.rs
+++ b/tests/expectations/tests/derive-hash-struct-with-pointer.rs
@@ -24,7 +24,7 @@ fn bindgen_test_layout_ConstPtrMutObj() {
concat!("Alignment of ", stringify!(ConstPtrMutObj))
);
assert_eq!(
- unsafe { &(*(0 as *const ConstPtrMutObj)).bar as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<ConstPtrMutObj>())).bar as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -57,7 +57,7 @@ fn bindgen_test_layout_MutPtrMutObj() {
concat!("Alignment of ", stringify!(MutPtrMutObj))
);
assert_eq!(
- unsafe { &(*(0 as *const MutPtrMutObj)).bar as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<MutPtrMutObj>())).bar as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -90,7 +90,7 @@ fn bindgen_test_layout_MutPtrConstObj() {
concat!("Alignment of ", stringify!(MutPtrConstObj))
);
assert_eq!(
- unsafe { &(*(0 as *const MutPtrConstObj)).bar as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<MutPtrConstObj>())).bar as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -123,7 +123,7 @@ fn bindgen_test_layout_ConstPtrConstObj() {
concat!("Alignment of ", stringify!(ConstPtrConstObj))
);
assert_eq!(
- unsafe { &(*(0 as *const ConstPtrConstObj)).bar as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<ConstPtrConstObj>())).bar as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/derive-hash-template-inst-float.rs b/tests/expectations/tests/derive-hash-template-inst-float.rs
index ea53b9ec..abb98f05 100644
--- a/tests/expectations/tests/derive-hash-template-inst-float.rs
+++ b/tests/expectations/tests/derive-hash-template-inst-float.rs
@@ -36,7 +36,7 @@ fn bindgen_test_layout_IntStr() {
concat!("Alignment of ", stringify!(IntStr))
);
assert_eq!(
- unsafe { &(*(0 as *const IntStr)).a as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<IntStr>())).a as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(IntStr), "::", stringify!(a))
);
@@ -65,7 +65,7 @@ fn bindgen_test_layout_FloatStr() {
concat!("Alignment of ", stringify!(FloatStr))
);
assert_eq!(
- unsafe { &(*(0 as *const FloatStr)).a as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<FloatStr>())).a as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/derive-partialeq-and-blacklist.rs b/tests/expectations/tests/derive-partialeq-and-blacklist.rs
index 4d55c8b8..1c51c3a3 100644
--- a/tests/expectations/tests/derive-partialeq-and-blacklist.rs
+++ b/tests/expectations/tests/derive-partialeq-and-blacklist.rs
@@ -25,7 +25,7 @@ fn bindgen_test_layout_ShouldNotDerivePartialEq() {
concat!("Alignment of ", stringify!(ShouldNotDerivePartialEq))
);
assert_eq!(
- unsafe { &(*(0 as *const ShouldNotDerivePartialEq)).a as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<ShouldNotDerivePartialEq>())).a as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/derive-partialeq-base.rs b/tests/expectations/tests/derive-partialeq-base.rs
index 8fc0b61f..ed92813b 100644
--- a/tests/expectations/tests/derive-partialeq-base.rs
+++ b/tests/expectations/tests/derive-partialeq-base.rs
@@ -22,7 +22,7 @@ fn bindgen_test_layout_Base() {
concat!("Alignment of ", stringify!(Base))
);
assert_eq!(
- unsafe { &(*(0 as *const Base)).large as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Base>())).large as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/derive-partialeq-bitfield.rs b/tests/expectations/tests/derive-partialeq-bitfield.rs
index 4efb5981..4b567fbf 100644
--- a/tests/expectations/tests/derive-partialeq-bitfield.rs
+++ b/tests/expectations/tests/derive-partialeq-bitfield.rs
@@ -23,7 +23,7 @@ fn bindgen_test_layout_C() {
concat!("Alignment of ", stringify!(C))
);
assert_eq!(
- unsafe { &(*(0 as *const C)).large_array as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<C>())).large_array as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/derive-partialeq-core.rs b/tests/expectations/tests/derive-partialeq-core.rs
index b8f6def7..7d6f3571 100644
--- a/tests/expectations/tests/derive-partialeq-core.rs
+++ b/tests/expectations/tests/derive-partialeq-core.rs
@@ -23,7 +23,7 @@ fn bindgen_test_layout_C() {
concat!("Alignment of ", stringify!(C))
);
assert_eq!(
- unsafe { &(*(0 as *const C)).large_array as *const _ as usize },
+ unsafe { &(*(::core::ptr::null::<C>())).large_array as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/derive-partialeq-pointer.rs b/tests/expectations/tests/derive-partialeq-pointer.rs
index 83747b14..4ce1a3fe 100644
--- a/tests/expectations/tests/derive-partialeq-pointer.rs
+++ b/tests/expectations/tests/derive-partialeq-pointer.rs
@@ -22,7 +22,7 @@ fn bindgen_test_layout_Bar() {
concat!("Alignment of ", stringify!(Bar))
);
assert_eq!(
- unsafe { &(*(0 as *const Bar)).b as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Bar>())).b as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(Bar), "::", stringify!(b))
);
@@ -97,7 +97,7 @@ fn bindgen_test_layout_a() {
concat!("Alignment of ", stringify!(a))
);
assert_eq!(
- unsafe { &(*(0 as *const a)).d as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<a>())).d as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(a), "::", stringify!(d))
);
diff --git a/tests/expectations/tests/derive-partialeq-union.rs b/tests/expectations/tests/derive-partialeq-union.rs
index 8e257339..68344591 100644
--- a/tests/expectations/tests/derive-partialeq-union.rs
+++ b/tests/expectations/tests/derive-partialeq-union.rs
@@ -26,7 +26,7 @@ fn bindgen_test_layout_ShouldNotDerivePartialEq() {
concat!("Alignment of ", stringify!(ShouldNotDerivePartialEq))
);
assert_eq!(
- unsafe { &(*(0 as *const ShouldNotDerivePartialEq)).a as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<ShouldNotDerivePartialEq>())).a as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -36,7 +36,7 @@ fn bindgen_test_layout_ShouldNotDerivePartialEq() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const ShouldNotDerivePartialEq)).b as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<ShouldNotDerivePartialEq>())).b as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/derive-partialeq-union_1_0.rs b/tests/expectations/tests/derive-partialeq-union_1_0.rs
index 35518c0d..dab82854 100644
--- a/tests/expectations/tests/derive-partialeq-union_1_0.rs
+++ b/tests/expectations/tests/derive-partialeq-union_1_0.rs
@@ -68,7 +68,7 @@ fn bindgen_test_layout_ShouldDerivePartialEq() {
concat!("Alignment of ", stringify!(ShouldDerivePartialEq))
);
assert_eq!(
- unsafe { &(*(0 as *const ShouldDerivePartialEq)).a as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<ShouldDerivePartialEq>())).a as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -78,7 +78,7 @@ fn bindgen_test_layout_ShouldDerivePartialEq() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const ShouldDerivePartialEq)).b as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<ShouldDerivePartialEq>())).b as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/do-not-derive-copy.rs b/tests/expectations/tests/do-not-derive-copy.rs
index fd7ff301..50fcebd4 100644
--- a/tests/expectations/tests/do-not-derive-copy.rs
+++ b/tests/expectations/tests/do-not-derive-copy.rs
@@ -25,7 +25,9 @@ fn bindgen_test_layout_WouldBeCopyButWeAreNotDerivingCopy() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const WouldBeCopyButWeAreNotDerivingCopy)).x as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<WouldBeCopyButWeAreNotDerivingCopy>())).x as *const _ as usize
+ },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/doggo-or-null.rs b/tests/expectations/tests/doggo-or-null.rs
index e87949e7..cf576634 100644
--- a/tests/expectations/tests/doggo-or-null.rs
+++ b/tests/expectations/tests/doggo-or-null.rs
@@ -22,7 +22,7 @@ fn bindgen_test_layout_Doggo() {
concat!("Alignment of ", stringify!(Doggo))
);
assert_eq!(
- unsafe { &(*(0 as *const Doggo)).x as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Doggo>())).x as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(Doggo), "::", stringify!(x))
);
diff --git a/tests/expectations/tests/duplicated-namespaces-definitions.rs b/tests/expectations/tests/duplicated-namespaces-definitions.rs
index 1fa1c73e..fff400c2 100644
--- a/tests/expectations/tests/duplicated-namespaces-definitions.rs
+++ b/tests/expectations/tests/duplicated-namespaces-definitions.rs
@@ -30,12 +30,12 @@ pub mod root {
concat!("Alignment of ", stringify!(Bar))
);
assert_eq!(
- unsafe { &(*(0 as *const Bar)).foo as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Bar>())).foo as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(Bar), "::", stringify!(foo))
);
assert_eq!(
- unsafe { &(*(0 as *const Bar)).baz as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Bar>())).baz as *const _ as usize },
4usize,
concat!("Offset of field: ", stringify!(Bar), "::", stringify!(baz))
);
@@ -62,7 +62,7 @@ pub mod root {
concat!("Alignment of ", stringify!(Foo))
);
assert_eq!(
- unsafe { &(*(0 as *const Foo)).ptr as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Foo>())).ptr as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(Foo), "::", stringify!(ptr))
);
diff --git a/tests/expectations/tests/enum_and_vtable_mangling.rs b/tests/expectations/tests/enum_and_vtable_mangling.rs
index 71c1d079..e9e6f13c 100644
--- a/tests/expectations/tests/enum_and_vtable_mangling.rs
+++ b/tests/expectations/tests/enum_and_vtable_mangling.rs
@@ -33,7 +33,7 @@ fn bindgen_test_layout_C() {
concat!("Alignment of ", stringify!(C))
);
assert_eq!(
- unsafe { &(*(0 as *const C)).i as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<C>())).i as *const _ as usize },
8usize,
concat!("Offset of field: ", stringify!(C), "::", stringify!(i))
);
diff --git a/tests/expectations/tests/forward-declaration-autoptr.rs b/tests/expectations/tests/forward-declaration-autoptr.rs
index c7edbec0..b465836d 100644
--- a/tests/expectations/tests/forward-declaration-autoptr.rs
+++ b/tests/expectations/tests/forward-declaration-autoptr.rs
@@ -38,7 +38,7 @@ fn bindgen_test_layout_Bar() {
concat!("Alignment of ", stringify!(Bar))
);
assert_eq!(
- unsafe { &(*(0 as *const Bar)).m_member as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Bar>())).m_member as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/forward_declared_complex_types.rs b/tests/expectations/tests/forward_declared_complex_types.rs
index 5fc83a18..970d6d59 100644
--- a/tests/expectations/tests/forward_declared_complex_types.rs
+++ b/tests/expectations/tests/forward_declared_complex_types.rs
@@ -45,7 +45,7 @@ fn bindgen_test_layout_Bar() {
concat!("Alignment of ", stringify!(Bar))
);
assert_eq!(
- unsafe { &(*(0 as *const Bar)).f as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Bar>())).f as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(Bar), "::", stringify!(f))
);
diff --git a/tests/expectations/tests/forward_declared_complex_types_1_0.rs b/tests/expectations/tests/forward_declared_complex_types_1_0.rs
index 248ccd82..04fe9a3c 100644
--- a/tests/expectations/tests/forward_declared_complex_types_1_0.rs
+++ b/tests/expectations/tests/forward_declared_complex_types_1_0.rs
@@ -50,7 +50,7 @@ fn bindgen_test_layout_Bar() {
concat!("Alignment of ", stringify!(Bar))
);
assert_eq!(
- unsafe { &(*(0 as *const Bar)).f as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Bar>())).f as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(Bar), "::", stringify!(f))
);
diff --git a/tests/expectations/tests/forward_declared_struct.rs b/tests/expectations/tests/forward_declared_struct.rs
index 7cc7c43e..c69960b8 100644
--- a/tests/expectations/tests/forward_declared_struct.rs
+++ b/tests/expectations/tests/forward_declared_struct.rs
@@ -22,7 +22,7 @@ fn bindgen_test_layout_a() {
concat!("Alignment of ", stringify!(a))
);
assert_eq!(
- unsafe { &(*(0 as *const a)).b as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<a>())).b as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(a), "::", stringify!(b))
);
@@ -45,7 +45,7 @@ fn bindgen_test_layout_c() {
concat!("Alignment of ", stringify!(c))
);
assert_eq!(
- unsafe { &(*(0 as *const c)).d as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<c>())).d as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(c), "::", stringify!(d))
);
diff --git a/tests/expectations/tests/func_ptr_in_struct.rs b/tests/expectations/tests/func_ptr_in_struct.rs
index 7c82aa69..290a148c 100644
--- a/tests/expectations/tests/func_ptr_in_struct.rs
+++ b/tests/expectations/tests/func_ptr_in_struct.rs
@@ -26,7 +26,7 @@ fn bindgen_test_layout_Foo() {
concat!("Alignment of ", stringify!(Foo))
);
assert_eq!(
- unsafe { &(*(0 as *const Foo)).bar as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Foo>())).bar as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(Foo), "::", stringify!(bar))
);
diff --git a/tests/expectations/tests/gen-destructors-neg.rs b/tests/expectations/tests/gen-destructors-neg.rs
index 5ba459f1..37740e09 100644
--- a/tests/expectations/tests/gen-destructors-neg.rs
+++ b/tests/expectations/tests/gen-destructors-neg.rs
@@ -22,7 +22,7 @@ fn bindgen_test_layout_Foo() {
concat!("Alignment of ", stringify!(Foo))
);
assert_eq!(
- unsafe { &(*(0 as *const Foo)).bar as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Foo>())).bar as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(Foo), "::", stringify!(bar))
);
diff --git a/tests/expectations/tests/gen-destructors.rs b/tests/expectations/tests/gen-destructors.rs
index fbb9017e..03ccec2a 100644
--- a/tests/expectations/tests/gen-destructors.rs
+++ b/tests/expectations/tests/gen-destructors.rs
@@ -22,7 +22,7 @@ fn bindgen_test_layout_Foo() {
concat!("Alignment of ", stringify!(Foo))
);
assert_eq!(
- unsafe { &(*(0 as *const Foo)).bar as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Foo>())).bar as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(Foo), "::", stringify!(bar))
);
diff --git a/tests/expectations/tests/inline_namespace.rs b/tests/expectations/tests/inline_namespace.rs
index d7420755..910883de 100644
--- a/tests/expectations/tests/inline_namespace.rs
+++ b/tests/expectations/tests/inline_namespace.rs
@@ -31,7 +31,7 @@ pub mod root {
concat!("Alignment of ", stringify!(Bar))
);
assert_eq!(
- unsafe { &(*(0 as *const Bar)).baz as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Bar>())).baz as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(Bar), "::", stringify!(baz))
);
diff --git a/tests/expectations/tests/inline_namespace_conservative.rs b/tests/expectations/tests/inline_namespace_conservative.rs
index 6dd85f04..90fc3793 100644
--- a/tests/expectations/tests/inline_namespace_conservative.rs
+++ b/tests/expectations/tests/inline_namespace_conservative.rs
@@ -36,7 +36,7 @@ pub mod root {
concat!("Alignment of ", stringify!(Bar))
);
assert_eq!(
- unsafe { &(*(0 as *const Bar)).baz as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Bar>())).baz as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(Bar), "::", stringify!(baz))
);
diff --git a/tests/expectations/tests/inner_const.rs b/tests/expectations/tests/inner_const.rs
index 63b81f71..ef62414e 100644
--- a/tests/expectations/tests/inner_const.rs
+++ b/tests/expectations/tests/inner_const.rs
@@ -30,7 +30,7 @@ fn bindgen_test_layout_Foo() {
concat!("Alignment of ", stringify!(Foo))
);
assert_eq!(
- unsafe { &(*(0 as *const Foo)).bar as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Foo>())).bar as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(Foo), "::", stringify!(bar))
);
diff --git a/tests/expectations/tests/inner_template_self.rs b/tests/expectations/tests/inner_template_self.rs
index 0601f107..5a975175 100644
--- a/tests/expectations/tests/inner_template_self.rs
+++ b/tests/expectations/tests/inner_template_self.rs
@@ -33,7 +33,7 @@ fn bindgen_test_layout_InstantiateIt() {
concat!("Alignment of ", stringify!(InstantiateIt))
);
assert_eq!(
- unsafe { &(*(0 as *const InstantiateIt)).m_list as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<InstantiateIt>())).m_list as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/issue-1118-using-forward-decl.rs b/tests/expectations/tests/issue-1118-using-forward-decl.rs
index 8952ab9d..d72e08b9 100644
--- a/tests/expectations/tests/issue-1118-using-forward-decl.rs
+++ b/tests/expectations/tests/issue-1118-using-forward-decl.rs
@@ -23,7 +23,7 @@ fn bindgen_test_layout_nsTArray_base() {
concat!("Alignment of ", stringify!(nsTArray_base))
);
assert_eq!(
- unsafe { &(*(0 as *const nsTArray_base)).d as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<nsTArray_base>())).d as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -66,7 +66,7 @@ fn bindgen_test_layout_nsIContent() {
concat!("Alignment of ", stringify!(nsIContent))
);
assert_eq!(
- unsafe { &(*(0 as *const nsIContent)).foo as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<nsIContent>())).foo as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/issue-372.rs b/tests/expectations/tests/issue-372.rs
index 7cbb8904..b2949da3 100644
--- a/tests/expectations/tests/issue-372.rs
+++ b/tests/expectations/tests/issue-372.rs
@@ -28,17 +28,17 @@ pub mod root {
concat!("Alignment of ", stringify!(i))
);
assert_eq!(
- unsafe { &(*(0 as *const i)).j as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<i>())).j as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(i), "::", stringify!(j))
);
assert_eq!(
- unsafe { &(*(0 as *const i)).k as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<i>())).k as *const _ as usize },
8usize,
concat!("Offset of field: ", stringify!(i), "::", stringify!(k))
);
assert_eq!(
- unsafe { &(*(0 as *const i)).l as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<i>())).l as *const _ as usize },
16usize,
concat!("Offset of field: ", stringify!(i), "::", stringify!(l))
);
@@ -66,7 +66,7 @@ pub mod root {
concat!("Alignment of ", stringify!(d))
);
assert_eq!(
- unsafe { &(*(0 as *const d)).m as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<d>())).m as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(d), "::", stringify!(m))
);
@@ -109,7 +109,7 @@ pub mod root {
concat!("Alignment of ", stringify!(F))
);
assert_eq!(
- unsafe { &(*(0 as *const F)).w as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<F>())).w as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(F), "::", stringify!(w))
);
diff --git a/tests/expectations/tests/issue-537.rs b/tests/expectations/tests/issue-537.rs
index 4c43acd5..136f9e0c 100644
--- a/tests/expectations/tests/issue-537.rs
+++ b/tests/expectations/tests/issue-537.rs
@@ -25,7 +25,7 @@ fn bindgen_test_layout_AlignedToOne() {
concat!("Alignment of ", stringify!(AlignedToOne))
);
assert_eq!(
- unsafe { &(*(0 as *const AlignedToOne)).i as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<AlignedToOne>())).i as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -77,7 +77,7 @@ fn bindgen_test_layout_PackedToOne() {
concat!("Alignment of ", stringify!(PackedToOne))
);
assert_eq!(
- unsafe { &(*(0 as *const PackedToOne)).x as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<PackedToOne>())).x as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -87,7 +87,7 @@ fn bindgen_test_layout_PackedToOne() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const PackedToOne)).y as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<PackedToOne>())).y as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/issue-573-layout-test-failures.rs b/tests/expectations/tests/issue-573-layout-test-failures.rs
index 0824b81f..cbb08bb2 100644
--- a/tests/expectations/tests/issue-573-layout-test-failures.rs
+++ b/tests/expectations/tests/issue-573-layout-test-failures.rs
@@ -27,7 +27,7 @@ fn bindgen_test_layout_AutoIdVector() {
concat!("Alignment of ", stringify!(AutoIdVector))
);
assert_eq!(
- unsafe { &(*(0 as *const AutoIdVector)).ar as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<AutoIdVector>())).ar as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/issue-574-assertion-failure-in-codegen.rs b/tests/expectations/tests/issue-574-assertion-failure-in-codegen.rs
index fca2bff0..db573a7e 100644
--- a/tests/expectations/tests/issue-574-assertion-failure-in-codegen.rs
+++ b/tests/expectations/tests/issue-574-assertion-failure-in-codegen.rs
@@ -27,7 +27,7 @@ fn bindgen_test_layout__bindgen_ty_1() {
concat!("Alignment of ", stringify!(_bindgen_ty_1))
);
assert_eq!(
- unsafe { &(*(0 as *const _bindgen_ty_1)).ar as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<_bindgen_ty_1>())).ar as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/issue-584-stylo-template-analysis-panic.rs b/tests/expectations/tests/issue-584-stylo-template-analysis-panic.rs
index 89f3c793..a7d085b0 100644
--- a/tests/expectations/tests/issue-584-stylo-template-analysis-panic.rs
+++ b/tests/expectations/tests/issue-584-stylo-template-analysis-panic.rs
@@ -56,7 +56,7 @@ fn bindgen_test_layout_g() {
concat!("Alignment of ", stringify!(g))
);
assert_eq!(
- unsafe { &(*(0 as *const g)).h as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<g>())).h as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(g), "::", stringify!(h))
);
diff --git a/tests/expectations/tests/issue-639-typedef-anon-field.rs b/tests/expectations/tests/issue-639-typedef-anon-field.rs
index 574505c7..3cc21b19 100644
--- a/tests/expectations/tests/issue-639-typedef-anon-field.rs
+++ b/tests/expectations/tests/issue-639-typedef-anon-field.rs
@@ -27,7 +27,7 @@ fn bindgen_test_layout_Foo_Bar() {
concat!("Alignment of ", stringify!(Foo_Bar))
);
assert_eq!(
- unsafe { &(*(0 as *const Foo_Bar)).abc as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Foo_Bar>())).abc as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -50,7 +50,7 @@ fn bindgen_test_layout_Foo() {
concat!("Alignment of ", stringify!(Foo))
);
assert_eq!(
- unsafe { &(*(0 as *const Foo)).bar as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Foo>())).bar as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(Foo), "::", stringify!(bar))
);
@@ -78,7 +78,7 @@ fn bindgen_test_layout_Baz_Bar() {
concat!("Alignment of ", stringify!(Baz_Bar))
);
assert_eq!(
- unsafe { &(*(0 as *const Baz_Bar)).abc as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Baz_Bar>())).abc as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/issue-643-inner-struct.rs b/tests/expectations/tests/issue-643-inner-struct.rs
index 2aaf644f..7f2d4e35 100644
--- a/tests/expectations/tests/issue-643-inner-struct.rs
+++ b/tests/expectations/tests/issue-643-inner-struct.rs
@@ -67,7 +67,7 @@ fn bindgen_test_layout_rte_ring_prod() {
concat!("Alignment of ", stringify!(rte_ring_prod))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_ring_prod)).watermark as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_ring_prod>())).watermark as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -95,7 +95,7 @@ fn bindgen_test_layout_rte_ring_cons() {
concat!("Alignment of ", stringify!(rte_ring_cons))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_ring_cons)).sc_dequeue as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_ring_cons>())).sc_dequeue as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/issue-648-derive-debug-with-padding.rs b/tests/expectations/tests/issue-648-derive-debug-with-padding.rs
index 8e147675..0b0eb9a2 100644
--- a/tests/expectations/tests/issue-648-derive-debug-with-padding.rs
+++ b/tests/expectations/tests/issue-648-derive-debug-with-padding.rs
@@ -23,7 +23,7 @@ fn bindgen_test_layout_NoDebug() {
concat!("Size of: ", stringify!(NoDebug))
);
assert_eq!(
- unsafe { &(*(0 as *const NoDebug)).c as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<NoDebug>())).c as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -62,7 +62,7 @@ fn bindgen_test_layout_ShouldDeriveDebugButDoesNot() {
concat!("Size of: ", stringify!(ShouldDeriveDebugButDoesNot))
);
assert_eq!(
- unsafe { &(*(0 as *const ShouldDeriveDebugButDoesNot)).c as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<ShouldDeriveDebugButDoesNot>())).c as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -72,7 +72,7 @@ fn bindgen_test_layout_ShouldDeriveDebugButDoesNot() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const ShouldDeriveDebugButDoesNot)).d as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<ShouldDeriveDebugButDoesNot>())).d as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/issue-674-1.rs b/tests/expectations/tests/issue-674-1.rs
index 4f06b594..01865494 100644
--- a/tests/expectations/tests/issue-674-1.rs
+++ b/tests/expectations/tests/issue-674-1.rs
@@ -36,7 +36,7 @@ pub mod root {
concat!("Alignment of ", stringify!(CapturingContentInfo))
);
assert_eq!(
- unsafe { &(*(0 as *const CapturingContentInfo)).a as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<CapturingContentInfo>())).a as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/issue-674-2.rs b/tests/expectations/tests/issue-674-2.rs
index 8da0c094..9394708d 100644
--- a/tests/expectations/tests/issue-674-2.rs
+++ b/tests/expectations/tests/issue-674-2.rs
@@ -36,7 +36,7 @@ pub mod root {
concat!("Alignment of ", stringify!(c))
);
assert_eq!(
- unsafe { &(*(0 as *const c)).b as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<c>())).b as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(c), "::", stringify!(b))
);
@@ -59,7 +59,7 @@ pub mod root {
concat!("Alignment of ", stringify!(B))
);
assert_eq!(
- unsafe { &(*(0 as *const B)).a as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<B>())).a as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(B), "::", stringify!(a))
);
diff --git a/tests/expectations/tests/issue-674-3.rs b/tests/expectations/tests/issue-674-3.rs
index 4a934608..413ad926 100644
--- a/tests/expectations/tests/issue-674-3.rs
+++ b/tests/expectations/tests/issue-674-3.rs
@@ -32,7 +32,7 @@ pub mod root {
concat!("Alignment of ", stringify!(a))
);
assert_eq!(
- unsafe { &(*(0 as *const a)).b as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<a>())).b as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(a), "::", stringify!(b))
);
@@ -55,7 +55,7 @@ pub mod root {
concat!("Alignment of ", stringify!(nsCSSValue))
);
assert_eq!(
- unsafe { &(*(0 as *const nsCSSValue)).c as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<nsCSSValue>())).c as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/issue-801-opaque-sloppiness.rs b/tests/expectations/tests/issue-801-opaque-sloppiness.rs
index 3d843708..b3ad9d05 100644
--- a/tests/expectations/tests/issue-801-opaque-sloppiness.rs
+++ b/tests/expectations/tests/issue-801-opaque-sloppiness.rs
@@ -49,7 +49,7 @@ fn bindgen_test_layout_C() {
concat!("Alignment of ", stringify!(C))
);
assert_eq!(
- unsafe { &(*(0 as *const C)).b as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<C>())).b as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(C), "::", stringify!(b))
);
diff --git a/tests/expectations/tests/issue-807-opaque-types-methods-being-generated.rs b/tests/expectations/tests/issue-807-opaque-types-methods-being-generated.rs
index 7494e001..0b1c020d 100644
--- a/tests/expectations/tests/issue-807-opaque-types-methods-being-generated.rs
+++ b/tests/expectations/tests/issue-807-opaque-types-methods-being-generated.rs
@@ -118,7 +118,7 @@ fn bindgen_test_layout_Whitelisted() {
concat!("Alignment of ", stringify!(Whitelisted))
);
assert_eq!(
- unsafe { &(*(0 as *const Whitelisted)).some_member as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Whitelisted>())).some_member as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/issue-944-derive-copy-and-blacklisting.rs b/tests/expectations/tests/issue-944-derive-copy-and-blacklisting.rs
index 58f51080..8143921d 100644
--- a/tests/expectations/tests/issue-944-derive-copy-and-blacklisting.rs
+++ b/tests/expectations/tests/issue-944-derive-copy-and-blacklisting.rs
@@ -24,7 +24,7 @@ fn bindgen_test_layout_ShouldNotBeCopy() {
concat!("Alignment of ", stringify!(ShouldNotBeCopy))
);
assert_eq!(
- unsafe { &(*(0 as *const ShouldNotBeCopy)).a as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<ShouldNotBeCopy>())).a as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/jsval_layout_opaque.rs b/tests/expectations/tests/jsval_layout_opaque.rs
index 8f06b93b..9c80dfc1 100644
--- a/tests/expectations/tests/jsval_layout_opaque.rs
+++ b/tests/expectations/tests/jsval_layout_opaque.rs
@@ -219,7 +219,8 @@ fn bindgen_test_layout_jsval_layout__bindgen_ty_2__bindgen_ty_1() {
);
assert_eq!(
unsafe {
- &(*(0 as *const jsval_layout__bindgen_ty_2__bindgen_ty_1)).i32 as *const _ as usize
+ &(*(::std::ptr::null::<jsval_layout__bindgen_ty_2__bindgen_ty_1>())).i32 as *const _
+ as usize
},
0usize,
concat!(
@@ -231,7 +232,8 @@ fn bindgen_test_layout_jsval_layout__bindgen_ty_2__bindgen_ty_1() {
);
assert_eq!(
unsafe {
- &(*(0 as *const jsval_layout__bindgen_ty_2__bindgen_ty_1)).u32 as *const _ as usize
+ &(*(::std::ptr::null::<jsval_layout__bindgen_ty_2__bindgen_ty_1>())).u32 as *const _
+ as usize
},
0usize,
concat!(
@@ -243,7 +245,8 @@ fn bindgen_test_layout_jsval_layout__bindgen_ty_2__bindgen_ty_1() {
);
assert_eq!(
unsafe {
- &(*(0 as *const jsval_layout__bindgen_ty_2__bindgen_ty_1)).why as *const _ as usize
+ &(*(::std::ptr::null::<jsval_layout__bindgen_ty_2__bindgen_ty_1>())).why as *const _
+ as usize
},
0usize,
concat!(
@@ -272,7 +275,9 @@ fn bindgen_test_layout_jsval_layout__bindgen_ty_2() {
concat!("Alignment of ", stringify!(jsval_layout__bindgen_ty_2))
);
assert_eq!(
- unsafe { &(*(0 as *const jsval_layout__bindgen_ty_2)).payload as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<jsval_layout__bindgen_ty_2>())).payload as *const _ as usize
+ },
0usize,
concat!(
"Offset of field: ",
@@ -300,7 +305,7 @@ fn bindgen_test_layout_jsval_layout() {
concat!("Alignment of ", stringify!(jsval_layout))
);
assert_eq!(
- unsafe { &(*(0 as *const jsval_layout)).asBits as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<jsval_layout>())).asBits as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -310,7 +315,7 @@ fn bindgen_test_layout_jsval_layout() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const jsval_layout)).debugView as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<jsval_layout>())).debugView as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -320,7 +325,7 @@ fn bindgen_test_layout_jsval_layout() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const jsval_layout)).s as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<jsval_layout>())).s as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -330,7 +335,7 @@ fn bindgen_test_layout_jsval_layout() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const jsval_layout)).asDouble as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<jsval_layout>())).asDouble as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -340,7 +345,7 @@ fn bindgen_test_layout_jsval_layout() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const jsval_layout)).asPtr as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<jsval_layout>())).asPtr as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -350,7 +355,7 @@ fn bindgen_test_layout_jsval_layout() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const jsval_layout)).asWord as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<jsval_layout>())).asWord as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -360,7 +365,7 @@ fn bindgen_test_layout_jsval_layout() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const jsval_layout)).asUIntPtr as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<jsval_layout>())).asUIntPtr as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -393,7 +398,7 @@ fn bindgen_test_layout_Value() {
concat!("Alignment of ", stringify!(Value))
);
assert_eq!(
- unsafe { &(*(0 as *const Value)).data as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Value>())).data as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/jsval_layout_opaque_1_0.rs b/tests/expectations/tests/jsval_layout_opaque_1_0.rs
index d0a79b53..229bed04 100644
--- a/tests/expectations/tests/jsval_layout_opaque_1_0.rs
+++ b/tests/expectations/tests/jsval_layout_opaque_1_0.rs
@@ -267,7 +267,8 @@ fn bindgen_test_layout_jsval_layout__bindgen_ty_2__bindgen_ty_1() {
);
assert_eq!(
unsafe {
- &(*(0 as *const jsval_layout__bindgen_ty_2__bindgen_ty_1)).i32 as *const _ as usize
+ &(*(::std::ptr::null::<jsval_layout__bindgen_ty_2__bindgen_ty_1>())).i32 as *const _
+ as usize
},
0usize,
concat!(
@@ -279,7 +280,8 @@ fn bindgen_test_layout_jsval_layout__bindgen_ty_2__bindgen_ty_1() {
);
assert_eq!(
unsafe {
- &(*(0 as *const jsval_layout__bindgen_ty_2__bindgen_ty_1)).u32 as *const _ as usize
+ &(*(::std::ptr::null::<jsval_layout__bindgen_ty_2__bindgen_ty_1>())).u32 as *const _
+ as usize
},
0usize,
concat!(
@@ -291,7 +293,8 @@ fn bindgen_test_layout_jsval_layout__bindgen_ty_2__bindgen_ty_1() {
);
assert_eq!(
unsafe {
- &(*(0 as *const jsval_layout__bindgen_ty_2__bindgen_ty_1)).why as *const _ as usize
+ &(*(::std::ptr::null::<jsval_layout__bindgen_ty_2__bindgen_ty_1>())).why as *const _
+ as usize
},
0usize,
concat!(
@@ -320,7 +323,9 @@ fn bindgen_test_layout_jsval_layout__bindgen_ty_2() {
concat!("Alignment of ", stringify!(jsval_layout__bindgen_ty_2))
);
assert_eq!(
- unsafe { &(*(0 as *const jsval_layout__bindgen_ty_2)).payload as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<jsval_layout__bindgen_ty_2>())).payload as *const _ as usize
+ },
0usize,
concat!(
"Offset of field: ",
@@ -348,7 +353,7 @@ fn bindgen_test_layout_jsval_layout() {
concat!("Alignment of ", stringify!(jsval_layout))
);
assert_eq!(
- unsafe { &(*(0 as *const jsval_layout)).asBits as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<jsval_layout>())).asBits as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -358,7 +363,7 @@ fn bindgen_test_layout_jsval_layout() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const jsval_layout)).debugView as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<jsval_layout>())).debugView as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -368,7 +373,7 @@ fn bindgen_test_layout_jsval_layout() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const jsval_layout)).s as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<jsval_layout>())).s as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -378,7 +383,7 @@ fn bindgen_test_layout_jsval_layout() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const jsval_layout)).asDouble as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<jsval_layout>())).asDouble as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -388,7 +393,7 @@ fn bindgen_test_layout_jsval_layout() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const jsval_layout)).asPtr as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<jsval_layout>())).asPtr as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -398,7 +403,7 @@ fn bindgen_test_layout_jsval_layout() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const jsval_layout)).asWord as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<jsval_layout>())).asWord as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -408,7 +413,7 @@ fn bindgen_test_layout_jsval_layout() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const jsval_layout)).asUIntPtr as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<jsval_layout>())).asUIntPtr as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -441,7 +446,7 @@ fn bindgen_test_layout_Value() {
concat!("Alignment of ", stringify!(Value))
);
assert_eq!(
- unsafe { &(*(0 as *const Value)).data as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Value>())).data as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/layout_align.rs b/tests/expectations/tests/layout_align.rs
index 3555fbef..daca4cd6 100644
--- a/tests/expectations/tests/layout_align.rs
+++ b/tests/expectations/tests/layout_align.rs
@@ -96,7 +96,7 @@ fn bindgen_test_layout_rte_eth_link() {
concat!("Alignment of ", stringify!(rte_eth_link))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_link)).link_speed as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_link>())).link_speed as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/layout_arp.rs b/tests/expectations/tests/layout_arp.rs
index e49b87a7..4978b152 100644
--- a/tests/expectations/tests/layout_arp.rs
+++ b/tests/expectations/tests/layout_arp.rs
@@ -40,7 +40,7 @@ fn bindgen_test_layout_ether_addr() {
concat!("Alignment of ", stringify!(ether_addr))
);
assert_eq!(
- unsafe { &(*(0 as *const ether_addr)).addr_bytes as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<ether_addr>())).addr_bytes as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -76,7 +76,7 @@ fn bindgen_test_layout_arp_ipv4() {
concat!("Alignment of ", stringify!(arp_ipv4))
);
assert_eq!(
- unsafe { &(*(0 as *const arp_ipv4)).arp_sha as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<arp_ipv4>())).arp_sha as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -86,7 +86,7 @@ fn bindgen_test_layout_arp_ipv4() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const arp_ipv4)).arp_sip as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<arp_ipv4>())).arp_sip as *const _ as usize },
6usize,
concat!(
"Offset of field: ",
@@ -96,7 +96,7 @@ fn bindgen_test_layout_arp_ipv4() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const arp_ipv4)).arp_tha as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<arp_ipv4>())).arp_tha as *const _ as usize },
10usize,
concat!(
"Offset of field: ",
@@ -106,7 +106,7 @@ fn bindgen_test_layout_arp_ipv4() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const arp_ipv4)).arp_tip as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<arp_ipv4>())).arp_tip as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
@@ -140,7 +140,7 @@ fn bindgen_test_layout_arp_hdr() {
concat!("Alignment of ", stringify!(arp_hdr))
);
assert_eq!(
- unsafe { &(*(0 as *const arp_hdr)).arp_hrd as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<arp_hdr>())).arp_hrd as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -150,7 +150,7 @@ fn bindgen_test_layout_arp_hdr() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const arp_hdr)).arp_pro as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<arp_hdr>())).arp_pro as *const _ as usize },
2usize,
concat!(
"Offset of field: ",
@@ -160,7 +160,7 @@ fn bindgen_test_layout_arp_hdr() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const arp_hdr)).arp_hln as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<arp_hdr>())).arp_hln as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
@@ -170,7 +170,7 @@ fn bindgen_test_layout_arp_hdr() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const arp_hdr)).arp_pln as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<arp_hdr>())).arp_pln as *const _ as usize },
5usize,
concat!(
"Offset of field: ",
@@ -180,7 +180,7 @@ fn bindgen_test_layout_arp_hdr() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const arp_hdr)).arp_op as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<arp_hdr>())).arp_op as *const _ as usize },
6usize,
concat!(
"Offset of field: ",
@@ -190,7 +190,7 @@ fn bindgen_test_layout_arp_hdr() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const arp_hdr)).arp_data as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<arp_hdr>())).arp_data as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/layout_array.rs b/tests/expectations/tests/layout_array.rs
index c5d66078..51676999 100644
--- a/tests/expectations/tests/layout_array.rs
+++ b/tests/expectations/tests/layout_array.rs
@@ -73,7 +73,7 @@ fn bindgen_test_layout_rte_mempool_ops() {
concat!("Size of: ", stringify!(rte_mempool_ops))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mempool_ops)).name as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_mempool_ops>())).name as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -83,7 +83,7 @@ fn bindgen_test_layout_rte_mempool_ops() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mempool_ops)).alloc as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_mempool_ops>())).alloc as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
@@ -93,7 +93,7 @@ fn bindgen_test_layout_rte_mempool_ops() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mempool_ops)).free as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_mempool_ops>())).free as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
@@ -103,7 +103,7 @@ fn bindgen_test_layout_rte_mempool_ops() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mempool_ops)).enqueue as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_mempool_ops>())).enqueue as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
@@ -113,7 +113,7 @@ fn bindgen_test_layout_rte_mempool_ops() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mempool_ops)).dequeue as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_mempool_ops>())).dequeue as *const _ as usize },
56usize,
concat!(
"Offset of field: ",
@@ -123,7 +123,7 @@ fn bindgen_test_layout_rte_mempool_ops() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mempool_ops)).get_count as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_mempool_ops>())).get_count as *const _ as usize },
64usize,
concat!(
"Offset of field: ",
@@ -165,7 +165,7 @@ fn bindgen_test_layout_rte_spinlock_t() {
concat!("Alignment of ", stringify!(rte_spinlock_t))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_spinlock_t)).locked as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_spinlock_t>())).locked as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -201,7 +201,7 @@ fn bindgen_test_layout_rte_mempool_ops_table() {
concat!("Size of: ", stringify!(rte_mempool_ops_table))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mempool_ops_table)).sl as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_mempool_ops_table>())).sl as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -211,7 +211,7 @@ fn bindgen_test_layout_rte_mempool_ops_table() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mempool_ops_table)).num_ops as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_mempool_ops_table>())).num_ops as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
@@ -221,7 +221,7 @@ fn bindgen_test_layout_rte_mempool_ops_table() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mempool_ops_table)).ops as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_mempool_ops_table>())).ops as *const _ as usize },
64usize,
concat!(
"Offset of field: ",
@@ -263,7 +263,9 @@ fn bindgen_test_layout_malloc_heap__bindgen_ty_1() {
concat!("Alignment of ", stringify!(malloc_heap__bindgen_ty_1))
);
assert_eq!(
- unsafe { &(*(0 as *const malloc_heap__bindgen_ty_1)).lh_first as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<malloc_heap__bindgen_ty_1>())).lh_first as *const _ as usize
+ },
0usize,
concat!(
"Offset of field: ",
@@ -286,7 +288,7 @@ fn bindgen_test_layout_malloc_heap() {
concat!("Size of: ", stringify!(malloc_heap))
);
assert_eq!(
- unsafe { &(*(0 as *const malloc_heap)).lock as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<malloc_heap>())).lock as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -296,7 +298,7 @@ fn bindgen_test_layout_malloc_heap() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const malloc_heap)).free_head as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<malloc_heap>())).free_head as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
@@ -306,7 +308,7 @@ fn bindgen_test_layout_malloc_heap() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const malloc_heap)).alloc_count as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<malloc_heap>())).alloc_count as *const _ as usize },
112usize,
concat!(
"Offset of field: ",
@@ -316,7 +318,7 @@ fn bindgen_test_layout_malloc_heap() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const malloc_heap)).total_size as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<malloc_heap>())).total_size as *const _ as usize },
120usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/layout_array_too_long.rs b/tests/expectations/tests/layout_array_too_long.rs
index e8b2c748..b7677573 100644
--- a/tests/expectations/tests/layout_array_too_long.rs
+++ b/tests/expectations/tests/layout_array_too_long.rs
@@ -42,7 +42,7 @@ fn bindgen_test_layout_ip_frag() {
concat!("Alignment of ", stringify!(ip_frag))
);
assert_eq!(
- unsafe { &(*(0 as *const ip_frag)).ofs as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<ip_frag>())).ofs as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -52,7 +52,7 @@ fn bindgen_test_layout_ip_frag() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const ip_frag)).len as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<ip_frag>())).len as *const _ as usize },
2usize,
concat!(
"Offset of field: ",
@@ -62,7 +62,7 @@ fn bindgen_test_layout_ip_frag() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const ip_frag)).mb as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<ip_frag>())).mb as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
@@ -101,7 +101,7 @@ fn bindgen_test_layout_ip_frag_key() {
concat!("Alignment of ", stringify!(ip_frag_key))
);
assert_eq!(
- unsafe { &(*(0 as *const ip_frag_key)).src_dst as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<ip_frag_key>())).src_dst as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -111,7 +111,7 @@ fn bindgen_test_layout_ip_frag_key() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const ip_frag_key)).id as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<ip_frag_key>())).id as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
@@ -121,7 +121,7 @@ fn bindgen_test_layout_ip_frag_key() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const ip_frag_key)).key_len as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<ip_frag_key>())).key_len as *const _ as usize },
36usize,
concat!(
"Offset of field: ",
@@ -171,7 +171,9 @@ fn bindgen_test_layout_ip_frag_pkt__bindgen_ty_1() {
concat!("Alignment of ", stringify!(ip_frag_pkt__bindgen_ty_1))
);
assert_eq!(
- unsafe { &(*(0 as *const ip_frag_pkt__bindgen_ty_1)).tqe_next as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<ip_frag_pkt__bindgen_ty_1>())).tqe_next as *const _ as usize
+ },
0usize,
concat!(
"Offset of field: ",
@@ -181,7 +183,9 @@ fn bindgen_test_layout_ip_frag_pkt__bindgen_ty_1() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const ip_frag_pkt__bindgen_ty_1)).tqe_prev as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<ip_frag_pkt__bindgen_ty_1>())).tqe_prev as *const _ as usize
+ },
8usize,
concat!(
"Offset of field: ",
@@ -204,7 +208,7 @@ fn bindgen_test_layout_ip_frag_pkt() {
concat!("Size of: ", stringify!(ip_frag_pkt))
);
assert_eq!(
- unsafe { &(*(0 as *const ip_frag_pkt)).lru as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<ip_frag_pkt>())).lru as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -214,7 +218,7 @@ fn bindgen_test_layout_ip_frag_pkt() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const ip_frag_pkt)).key as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<ip_frag_pkt>())).key as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
@@ -224,7 +228,7 @@ fn bindgen_test_layout_ip_frag_pkt() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const ip_frag_pkt)).start as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<ip_frag_pkt>())).start as *const _ as usize },
56usize,
concat!(
"Offset of field: ",
@@ -234,7 +238,7 @@ fn bindgen_test_layout_ip_frag_pkt() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const ip_frag_pkt)).total_size as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<ip_frag_pkt>())).total_size as *const _ as usize },
64usize,
concat!(
"Offset of field: ",
@@ -244,7 +248,7 @@ fn bindgen_test_layout_ip_frag_pkt() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const ip_frag_pkt)).frag_size as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<ip_frag_pkt>())).frag_size as *const _ as usize },
68usize,
concat!(
"Offset of field: ",
@@ -254,7 +258,7 @@ fn bindgen_test_layout_ip_frag_pkt() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const ip_frag_pkt)).last_idx as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<ip_frag_pkt>())).last_idx as *const _ as usize },
72usize,
concat!(
"Offset of field: ",
@@ -264,7 +268,7 @@ fn bindgen_test_layout_ip_frag_pkt() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const ip_frag_pkt)).frags as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<ip_frag_pkt>())).frags as *const _ as usize },
80usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/layout_cmdline_token.rs b/tests/expectations/tests/layout_cmdline_token.rs
index 34243298..91157416 100644
--- a/tests/expectations/tests/layout_cmdline_token.rs
+++ b/tests/expectations/tests/layout_cmdline_token.rs
@@ -26,7 +26,7 @@ fn bindgen_test_layout_cmdline_token_hdr() {
concat!("Alignment of ", stringify!(cmdline_token_hdr))
);
assert_eq!(
- unsafe { &(*(0 as *const cmdline_token_hdr)).ops as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<cmdline_token_hdr>())).ops as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -36,7 +36,7 @@ fn bindgen_test_layout_cmdline_token_hdr() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const cmdline_token_hdr)).offset as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<cmdline_token_hdr>())).offset as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
@@ -117,7 +117,7 @@ fn bindgen_test_layout_cmdline_token_ops() {
concat!("Alignment of ", stringify!(cmdline_token_ops))
);
assert_eq!(
- unsafe { &(*(0 as *const cmdline_token_ops)).parse as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<cmdline_token_ops>())).parse as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -127,7 +127,9 @@ fn bindgen_test_layout_cmdline_token_ops() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const cmdline_token_ops)).complete_get_nb as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<cmdline_token_ops>())).complete_get_nb as *const _ as usize
+ },
8usize,
concat!(
"Offset of field: ",
@@ -137,7 +139,9 @@ fn bindgen_test_layout_cmdline_token_ops() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const cmdline_token_ops)).complete_get_elt as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<cmdline_token_ops>())).complete_get_elt as *const _ as usize
+ },
16usize,
concat!(
"Offset of field: ",
@@ -147,7 +151,7 @@ fn bindgen_test_layout_cmdline_token_ops() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const cmdline_token_ops)).get_help as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<cmdline_token_ops>())).get_help as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
@@ -192,7 +196,7 @@ fn bindgen_test_layout_cmdline_token_num_data() {
concat!("Alignment of ", stringify!(cmdline_token_num_data))
);
assert_eq!(
- unsafe { &(*(0 as *const cmdline_token_num_data)).type_ as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<cmdline_token_num_data>())).type_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -226,7 +230,7 @@ fn bindgen_test_layout_cmdline_token_num() {
concat!("Alignment of ", stringify!(cmdline_token_num))
);
assert_eq!(
- unsafe { &(*(0 as *const cmdline_token_num)).hdr as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<cmdline_token_num>())).hdr as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -236,7 +240,7 @@ fn bindgen_test_layout_cmdline_token_num() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const cmdline_token_num)).num_data as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<cmdline_token_num>())).num_data as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/layout_eth_conf.rs b/tests/expectations/tests/layout_eth_conf.rs
index 1c2fdaa2..9297c46f 100644
--- a/tests/expectations/tests/layout_eth_conf.rs
+++ b/tests/expectations/tests/layout_eth_conf.rs
@@ -75,7 +75,7 @@ fn bindgen_test_layout_rte_eth_rxmode() {
concat!("Alignment of ", stringify!(rte_eth_rxmode))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_rxmode)).mq_mode as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_rxmode>())).mq_mode as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -85,7 +85,7 @@ fn bindgen_test_layout_rte_eth_rxmode() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_rxmode)).max_rx_pkt_len as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_rxmode>())).max_rx_pkt_len as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
@@ -95,7 +95,7 @@ fn bindgen_test_layout_rte_eth_rxmode() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_rxmode)).split_hdr_size as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_rxmode>())).split_hdr_size as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
@@ -491,7 +491,7 @@ fn bindgen_test_layout_rte_eth_txmode() {
concat!("Alignment of ", stringify!(rte_eth_txmode))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_txmode)).mq_mode as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_txmode>())).mq_mode as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -501,7 +501,7 @@ fn bindgen_test_layout_rte_eth_txmode() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_txmode)).pvid as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_txmode>())).pvid as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
@@ -674,7 +674,7 @@ fn bindgen_test_layout_rte_eth_rss_conf() {
concat!("Alignment of ", stringify!(rte_eth_rss_conf))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_rss_conf)).rss_key as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_rss_conf>())).rss_key as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -684,7 +684,7 @@ fn bindgen_test_layout_rte_eth_rss_conf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_rss_conf)).rss_key_len as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_rss_conf>())).rss_key_len as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
@@ -694,7 +694,7 @@ fn bindgen_test_layout_rte_eth_rss_conf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_rss_conf)).rss_hf as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_rss_conf>())).rss_hf as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
@@ -776,7 +776,8 @@ fn bindgen_test_layout_rte_eth_vmdq_dcb_conf__bindgen_ty_1() {
);
assert_eq!(
unsafe {
- &(*(0 as *const rte_eth_vmdq_dcb_conf__bindgen_ty_1)).vlan_id as *const _ as usize
+ &(*(::std::ptr::null::<rte_eth_vmdq_dcb_conf__bindgen_ty_1>())).vlan_id as *const _
+ as usize
},
0usize,
concat!(
@@ -787,7 +788,10 @@ fn bindgen_test_layout_rte_eth_vmdq_dcb_conf__bindgen_ty_1() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_vmdq_dcb_conf__bindgen_ty_1)).pools as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_eth_vmdq_dcb_conf__bindgen_ty_1>())).pools as *const _
+ as usize
+ },
8usize,
concat!(
"Offset of field: ",
@@ -810,7 +814,9 @@ fn bindgen_test_layout_rte_eth_vmdq_dcb_conf() {
concat!("Alignment of ", stringify!(rte_eth_vmdq_dcb_conf))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_vmdq_dcb_conf)).nb_queue_pools as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_eth_vmdq_dcb_conf>())).nb_queue_pools as *const _ as usize
+ },
0usize,
concat!(
"Offset of field: ",
@@ -820,7 +826,10 @@ fn bindgen_test_layout_rte_eth_vmdq_dcb_conf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_vmdq_dcb_conf)).enable_default_pool as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_eth_vmdq_dcb_conf>())).enable_default_pool as *const _
+ as usize
+ },
4usize,
concat!(
"Offset of field: ",
@@ -830,7 +839,9 @@ fn bindgen_test_layout_rte_eth_vmdq_dcb_conf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_vmdq_dcb_conf)).default_pool as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_eth_vmdq_dcb_conf>())).default_pool as *const _ as usize
+ },
5usize,
concat!(
"Offset of field: ",
@@ -840,7 +851,9 @@ fn bindgen_test_layout_rte_eth_vmdq_dcb_conf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_vmdq_dcb_conf)).nb_pool_maps as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_eth_vmdq_dcb_conf>())).nb_pool_maps as *const _ as usize
+ },
6usize,
concat!(
"Offset of field: ",
@@ -850,7 +863,7 @@ fn bindgen_test_layout_rte_eth_vmdq_dcb_conf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_vmdq_dcb_conf)).pool_map as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_vmdq_dcb_conf>())).pool_map as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
@@ -860,7 +873,7 @@ fn bindgen_test_layout_rte_eth_vmdq_dcb_conf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_vmdq_dcb_conf)).dcb_tc as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_vmdq_dcb_conf>())).dcb_tc as *const _ as usize },
1032usize,
concat!(
"Offset of field: ",
@@ -896,7 +909,7 @@ fn bindgen_test_layout_rte_eth_dcb_rx_conf() {
concat!("Alignment of ", stringify!(rte_eth_dcb_rx_conf))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_dcb_rx_conf)).nb_tcs as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_dcb_rx_conf>())).nb_tcs as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -906,7 +919,7 @@ fn bindgen_test_layout_rte_eth_dcb_rx_conf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_dcb_rx_conf)).dcb_tc as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_dcb_rx_conf>())).dcb_tc as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
@@ -942,7 +955,9 @@ fn bindgen_test_layout_rte_eth_vmdq_dcb_tx_conf() {
concat!("Alignment of ", stringify!(rte_eth_vmdq_dcb_tx_conf))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_vmdq_dcb_tx_conf)).nb_queue_pools as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_eth_vmdq_dcb_tx_conf>())).nb_queue_pools as *const _ as usize
+ },
0usize,
concat!(
"Offset of field: ",
@@ -952,7 +967,7 @@ fn bindgen_test_layout_rte_eth_vmdq_dcb_tx_conf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_vmdq_dcb_tx_conf)).dcb_tc as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_vmdq_dcb_tx_conf>())).dcb_tc as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
@@ -988,7 +1003,7 @@ fn bindgen_test_layout_rte_eth_dcb_tx_conf() {
concat!("Alignment of ", stringify!(rte_eth_dcb_tx_conf))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_dcb_tx_conf)).nb_tcs as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_dcb_tx_conf>())).nb_tcs as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -998,7 +1013,7 @@ fn bindgen_test_layout_rte_eth_dcb_tx_conf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_dcb_tx_conf)).dcb_tc as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_dcb_tx_conf>())).dcb_tc as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
@@ -1032,7 +1047,9 @@ fn bindgen_test_layout_rte_eth_vmdq_tx_conf() {
concat!("Alignment of ", stringify!(rte_eth_vmdq_tx_conf))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_vmdq_tx_conf)).nb_queue_pools as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_eth_vmdq_tx_conf>())).nb_queue_pools as *const _ as usize
+ },
0usize,
concat!(
"Offset of field: ",
@@ -1090,7 +1107,8 @@ fn bindgen_test_layout_rte_eth_vmdq_rx_conf__bindgen_ty_1() {
);
assert_eq!(
unsafe {
- &(*(0 as *const rte_eth_vmdq_rx_conf__bindgen_ty_1)).vlan_id as *const _ as usize
+ &(*(::std::ptr::null::<rte_eth_vmdq_rx_conf__bindgen_ty_1>())).vlan_id as *const _
+ as usize
},
0usize,
concat!(
@@ -1101,7 +1119,10 @@ fn bindgen_test_layout_rte_eth_vmdq_rx_conf__bindgen_ty_1() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_vmdq_rx_conf__bindgen_ty_1)).pools as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_eth_vmdq_rx_conf__bindgen_ty_1>())).pools as *const _
+ as usize
+ },
8usize,
concat!(
"Offset of field: ",
@@ -1124,7 +1145,9 @@ fn bindgen_test_layout_rte_eth_vmdq_rx_conf() {
concat!("Alignment of ", stringify!(rte_eth_vmdq_rx_conf))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_vmdq_rx_conf)).nb_queue_pools as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_eth_vmdq_rx_conf>())).nb_queue_pools as *const _ as usize
+ },
0usize,
concat!(
"Offset of field: ",
@@ -1134,7 +1157,10 @@ fn bindgen_test_layout_rte_eth_vmdq_rx_conf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_vmdq_rx_conf)).enable_default_pool as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_eth_vmdq_rx_conf>())).enable_default_pool as *const _
+ as usize
+ },
4usize,
concat!(
"Offset of field: ",
@@ -1144,7 +1170,9 @@ fn bindgen_test_layout_rte_eth_vmdq_rx_conf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_vmdq_rx_conf)).default_pool as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_eth_vmdq_rx_conf>())).default_pool as *const _ as usize
+ },
5usize,
concat!(
"Offset of field: ",
@@ -1154,7 +1182,9 @@ fn bindgen_test_layout_rte_eth_vmdq_rx_conf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_vmdq_rx_conf)).enable_loop_back as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_eth_vmdq_rx_conf>())).enable_loop_back as *const _ as usize
+ },
6usize,
concat!(
"Offset of field: ",
@@ -1164,7 +1194,9 @@ fn bindgen_test_layout_rte_eth_vmdq_rx_conf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_vmdq_rx_conf)).nb_pool_maps as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_eth_vmdq_rx_conf>())).nb_pool_maps as *const _ as usize
+ },
7usize,
concat!(
"Offset of field: ",
@@ -1174,7 +1206,7 @@ fn bindgen_test_layout_rte_eth_vmdq_rx_conf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_vmdq_rx_conf)).rx_mode as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_vmdq_rx_conf>())).rx_mode as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
@@ -1184,7 +1216,7 @@ fn bindgen_test_layout_rte_eth_vmdq_rx_conf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_vmdq_rx_conf)).pool_map as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_vmdq_rx_conf>())).pool_map as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
@@ -1254,7 +1286,7 @@ fn bindgen_test_layout_rte_eth_ipv4_flow() {
concat!("Alignment of ", stringify!(rte_eth_ipv4_flow))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_ipv4_flow)).src_ip as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_ipv4_flow>())).src_ip as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -1264,7 +1296,7 @@ fn bindgen_test_layout_rte_eth_ipv4_flow() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_ipv4_flow)).dst_ip as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_ipv4_flow>())).dst_ip as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
@@ -1274,7 +1306,7 @@ fn bindgen_test_layout_rte_eth_ipv4_flow() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_ipv4_flow)).tos as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_ipv4_flow>())).tos as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
@@ -1284,7 +1316,7 @@ fn bindgen_test_layout_rte_eth_ipv4_flow() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_ipv4_flow)).ttl as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_ipv4_flow>())).ttl as *const _ as usize },
9usize,
concat!(
"Offset of field: ",
@@ -1294,7 +1326,7 @@ fn bindgen_test_layout_rte_eth_ipv4_flow() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_ipv4_flow)).proto as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_ipv4_flow>())).proto as *const _ as usize },
10usize,
concat!(
"Offset of field: ",
@@ -1332,7 +1364,7 @@ fn bindgen_test_layout_rte_eth_ipv6_flow() {
concat!("Alignment of ", stringify!(rte_eth_ipv6_flow))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_ipv6_flow)).src_ip as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_ipv6_flow>())).src_ip as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -1342,7 +1374,7 @@ fn bindgen_test_layout_rte_eth_ipv6_flow() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_ipv6_flow)).dst_ip as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_ipv6_flow>())).dst_ip as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
@@ -1352,7 +1384,7 @@ fn bindgen_test_layout_rte_eth_ipv6_flow() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_ipv6_flow)).tc as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_ipv6_flow>())).tc as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
@@ -1362,7 +1394,7 @@ fn bindgen_test_layout_rte_eth_ipv6_flow() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_ipv6_flow)).proto as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_ipv6_flow>())).proto as *const _ as usize },
33usize,
concat!(
"Offset of field: ",
@@ -1372,7 +1404,7 @@ fn bindgen_test_layout_rte_eth_ipv6_flow() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_ipv6_flow)).hop_limits as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_ipv6_flow>())).hop_limits as *const _ as usize },
34usize,
concat!(
"Offset of field: ",
@@ -1419,7 +1451,9 @@ fn bindgen_test_layout_rte_eth_fdir_masks() {
concat!("Alignment of ", stringify!(rte_eth_fdir_masks))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_fdir_masks)).vlan_tci_mask as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_eth_fdir_masks>())).vlan_tci_mask as *const _ as usize
+ },
0usize,
concat!(
"Offset of field: ",
@@ -1429,7 +1463,7 @@ fn bindgen_test_layout_rte_eth_fdir_masks() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_fdir_masks)).ipv4_mask as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_fdir_masks>())).ipv4_mask as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
@@ -1439,7 +1473,7 @@ fn bindgen_test_layout_rte_eth_fdir_masks() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_fdir_masks)).ipv6_mask as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_fdir_masks>())).ipv6_mask as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
@@ -1449,7 +1483,9 @@ fn bindgen_test_layout_rte_eth_fdir_masks() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_fdir_masks)).src_port_mask as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_eth_fdir_masks>())).src_port_mask as *const _ as usize
+ },
52usize,
concat!(
"Offset of field: ",
@@ -1459,7 +1495,9 @@ fn bindgen_test_layout_rte_eth_fdir_masks() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_fdir_masks)).dst_port_mask as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_eth_fdir_masks>())).dst_port_mask as *const _ as usize
+ },
54usize,
concat!(
"Offset of field: ",
@@ -1469,7 +1507,9 @@ fn bindgen_test_layout_rte_eth_fdir_masks() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_fdir_masks)).mac_addr_byte_mask as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_eth_fdir_masks>())).mac_addr_byte_mask as *const _ as usize
+ },
56usize,
concat!(
"Offset of field: ",
@@ -1479,7 +1519,9 @@ fn bindgen_test_layout_rte_eth_fdir_masks() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_fdir_masks)).tunnel_id_mask as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_eth_fdir_masks>())).tunnel_id_mask as *const _ as usize
+ },
60usize,
concat!(
"Offset of field: ",
@@ -1489,7 +1531,9 @@ fn bindgen_test_layout_rte_eth_fdir_masks() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_fdir_masks)).tunnel_type_mask as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_eth_fdir_masks>())).tunnel_type_mask as *const _ as usize
+ },
64usize,
concat!(
"Offset of field: ",
@@ -1532,7 +1576,7 @@ fn bindgen_test_layout_rte_eth_flex_payload_cfg() {
concat!("Alignment of ", stringify!(rte_eth_flex_payload_cfg))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_flex_payload_cfg)).type_ as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_flex_payload_cfg>())).type_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -1542,7 +1586,9 @@ fn bindgen_test_layout_rte_eth_flex_payload_cfg() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_flex_payload_cfg)).src_offset as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_eth_flex_payload_cfg>())).src_offset as *const _ as usize
+ },
4usize,
concat!(
"Offset of field: ",
@@ -1578,7 +1624,9 @@ fn bindgen_test_layout_rte_eth_fdir_flex_mask() {
concat!("Alignment of ", stringify!(rte_eth_fdir_flex_mask))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_fdir_flex_mask)).flow_type as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_eth_fdir_flex_mask>())).flow_type as *const _ as usize
+ },
0usize,
concat!(
"Offset of field: ",
@@ -1588,7 +1636,7 @@ fn bindgen_test_layout_rte_eth_fdir_flex_mask() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_fdir_flex_mask)).mask as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_fdir_flex_mask>())).mask as *const _ as usize },
2usize,
concat!(
"Offset of field: ",
@@ -1623,7 +1671,9 @@ fn bindgen_test_layout_rte_eth_fdir_flex_conf() {
concat!("Alignment of ", stringify!(rte_eth_fdir_flex_conf))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_fdir_flex_conf)).nb_payloads as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_eth_fdir_flex_conf>())).nb_payloads as *const _ as usize
+ },
0usize,
concat!(
"Offset of field: ",
@@ -1633,7 +1683,9 @@ fn bindgen_test_layout_rte_eth_fdir_flex_conf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_fdir_flex_conf)).nb_flexmasks as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_eth_fdir_flex_conf>())).nb_flexmasks as *const _ as usize
+ },
2usize,
concat!(
"Offset of field: ",
@@ -1643,7 +1695,7 @@ fn bindgen_test_layout_rte_eth_fdir_flex_conf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_fdir_flex_conf)).flex_set as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_fdir_flex_conf>())).flex_set as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
@@ -1653,7 +1705,9 @@ fn bindgen_test_layout_rte_eth_fdir_flex_conf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_fdir_flex_conf)).flex_mask as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_eth_fdir_flex_conf>())).flex_mask as *const _ as usize
+ },
292usize,
concat!(
"Offset of field: ",
@@ -1699,7 +1753,7 @@ fn bindgen_test_layout_rte_fdir_conf() {
concat!("Alignment of ", stringify!(rte_fdir_conf))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_fdir_conf)).mode as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_fdir_conf>())).mode as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -1709,7 +1763,7 @@ fn bindgen_test_layout_rte_fdir_conf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_fdir_conf)).pballoc as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_fdir_conf>())).pballoc as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
@@ -1719,7 +1773,7 @@ fn bindgen_test_layout_rte_fdir_conf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_fdir_conf)).status as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_fdir_conf>())).status as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
@@ -1729,7 +1783,7 @@ fn bindgen_test_layout_rte_fdir_conf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_fdir_conf)).drop_queue as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_fdir_conf>())).drop_queue as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
@@ -1739,7 +1793,7 @@ fn bindgen_test_layout_rte_fdir_conf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_fdir_conf)).mask as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_fdir_conf>())).mask as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
@@ -1749,7 +1803,7 @@ fn bindgen_test_layout_rte_fdir_conf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_fdir_conf)).flex_conf as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_fdir_conf>())).flex_conf as *const _ as usize },
84usize,
concat!(
"Offset of field: ",
@@ -1786,7 +1840,7 @@ fn bindgen_test_layout_rte_intr_conf() {
concat!("Alignment of ", stringify!(rte_intr_conf))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_intr_conf)).lsc as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_intr_conf>())).lsc as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -1796,7 +1850,7 @@ fn bindgen_test_layout_rte_intr_conf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_intr_conf)).rxq as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_intr_conf>())).rxq as *const _ as usize },
2usize,
concat!(
"Offset of field: ",
@@ -1864,7 +1918,9 @@ fn bindgen_test_layout_rte_eth_conf__bindgen_ty_1() {
concat!("Alignment of ", stringify!(rte_eth_conf__bindgen_ty_1))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_conf__bindgen_ty_1)).rss_conf as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_eth_conf__bindgen_ty_1>())).rss_conf as *const _ as usize
+ },
0usize,
concat!(
"Offset of field: ",
@@ -1874,7 +1930,10 @@ fn bindgen_test_layout_rte_eth_conf__bindgen_ty_1() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_conf__bindgen_ty_1)).vmdq_dcb_conf as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_eth_conf__bindgen_ty_1>())).vmdq_dcb_conf as *const _
+ as usize
+ },
24usize,
concat!(
"Offset of field: ",
@@ -1884,7 +1943,9 @@ fn bindgen_test_layout_rte_eth_conf__bindgen_ty_1() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_conf__bindgen_ty_1)).dcb_rx_conf as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_eth_conf__bindgen_ty_1>())).dcb_rx_conf as *const _ as usize
+ },
1064usize,
concat!(
"Offset of field: ",
@@ -1894,7 +1955,9 @@ fn bindgen_test_layout_rte_eth_conf__bindgen_ty_1() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_conf__bindgen_ty_1)).vmdq_rx_conf as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_eth_conf__bindgen_ty_1>())).vmdq_rx_conf as *const _ as usize
+ },
1080usize,
concat!(
"Offset of field: ",
@@ -1931,7 +1994,8 @@ fn bindgen_test_layout_rte_eth_conf__bindgen_ty_2() {
);
assert_eq!(
unsafe {
- &(*(0 as *const rte_eth_conf__bindgen_ty_2)).vmdq_dcb_tx_conf as *const _ as usize
+ &(*(::std::ptr::null::<rte_eth_conf__bindgen_ty_2>())).vmdq_dcb_tx_conf as *const _
+ as usize
},
0usize,
concat!(
@@ -1942,7 +2006,9 @@ fn bindgen_test_layout_rte_eth_conf__bindgen_ty_2() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_conf__bindgen_ty_2)).dcb_tx_conf as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_eth_conf__bindgen_ty_2>())).dcb_tx_conf as *const _ as usize
+ },
0usize,
concat!(
"Offset of field: ",
@@ -1952,7 +2018,9 @@ fn bindgen_test_layout_rte_eth_conf__bindgen_ty_2() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_conf__bindgen_ty_2)).vmdq_tx_conf as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_eth_conf__bindgen_ty_2>())).vmdq_tx_conf as *const _ as usize
+ },
0usize,
concat!(
"Offset of field: ",
@@ -1980,7 +2048,7 @@ fn bindgen_test_layout_rte_eth_conf() {
concat!("Alignment of ", stringify!(rte_eth_conf))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_conf)).link_speeds as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_conf>())).link_speeds as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -1990,7 +2058,7 @@ fn bindgen_test_layout_rte_eth_conf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_conf)).rxmode as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_conf>())).rxmode as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
@@ -2000,7 +2068,7 @@ fn bindgen_test_layout_rte_eth_conf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_conf)).txmode as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_conf>())).txmode as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
@@ -2010,7 +2078,7 @@ fn bindgen_test_layout_rte_eth_conf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_conf)).lpbk_mode as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_conf>())).lpbk_mode as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
@@ -2020,7 +2088,7 @@ fn bindgen_test_layout_rte_eth_conf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_conf)).rx_adv_conf as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_conf>())).rx_adv_conf as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
@@ -2030,7 +2098,7 @@ fn bindgen_test_layout_rte_eth_conf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_conf)).tx_adv_conf as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_conf>())).tx_adv_conf as *const _ as usize },
2152usize,
concat!(
"Offset of field: ",
@@ -2040,7 +2108,7 @@ fn bindgen_test_layout_rte_eth_conf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_conf)).dcb_capability_en as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_conf>())).dcb_capability_en as *const _ as usize },
2164usize,
concat!(
"Offset of field: ",
@@ -2050,7 +2118,7 @@ fn bindgen_test_layout_rte_eth_conf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_conf)).fdir_conf as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_conf>())).fdir_conf as *const _ as usize },
2168usize,
concat!(
"Offset of field: ",
@@ -2060,7 +2128,7 @@ fn bindgen_test_layout_rte_eth_conf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_conf)).intr_conf as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_conf>())).intr_conf as *const _ as usize },
2940usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/layout_eth_conf_1_0.rs b/tests/expectations/tests/layout_eth_conf_1_0.rs
index 2ff4e87e..37d2c115 100644
--- a/tests/expectations/tests/layout_eth_conf_1_0.rs
+++ b/tests/expectations/tests/layout_eth_conf_1_0.rs
@@ -118,7 +118,7 @@ fn bindgen_test_layout_rte_eth_rxmode() {
concat!("Alignment of ", stringify!(rte_eth_rxmode))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_rxmode)).mq_mode as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_rxmode>())).mq_mode as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -128,7 +128,7 @@ fn bindgen_test_layout_rte_eth_rxmode() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_rxmode)).max_rx_pkt_len as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_rxmode>())).max_rx_pkt_len as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
@@ -138,7 +138,7 @@ fn bindgen_test_layout_rte_eth_rxmode() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_rxmode)).split_hdr_size as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_rxmode>())).split_hdr_size as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
@@ -539,7 +539,7 @@ fn bindgen_test_layout_rte_eth_txmode() {
concat!("Alignment of ", stringify!(rte_eth_txmode))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_txmode)).mq_mode as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_txmode>())).mq_mode as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -549,7 +549,7 @@ fn bindgen_test_layout_rte_eth_txmode() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_txmode)).pvid as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_txmode>())).pvid as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
@@ -727,7 +727,7 @@ fn bindgen_test_layout_rte_eth_rss_conf() {
concat!("Alignment of ", stringify!(rte_eth_rss_conf))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_rss_conf)).rss_key as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_rss_conf>())).rss_key as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -737,7 +737,7 @@ fn bindgen_test_layout_rte_eth_rss_conf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_rss_conf)).rss_key_len as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_rss_conf>())).rss_key_len as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
@@ -747,7 +747,7 @@ fn bindgen_test_layout_rte_eth_rss_conf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_rss_conf)).rss_hf as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_rss_conf>())).rss_hf as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
@@ -834,7 +834,8 @@ fn bindgen_test_layout_rte_eth_vmdq_dcb_conf__bindgen_ty_1() {
);
assert_eq!(
unsafe {
- &(*(0 as *const rte_eth_vmdq_dcb_conf__bindgen_ty_1)).vlan_id as *const _ as usize
+ &(*(::std::ptr::null::<rte_eth_vmdq_dcb_conf__bindgen_ty_1>())).vlan_id as *const _
+ as usize
},
0usize,
concat!(
@@ -845,7 +846,10 @@ fn bindgen_test_layout_rte_eth_vmdq_dcb_conf__bindgen_ty_1() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_vmdq_dcb_conf__bindgen_ty_1)).pools as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_eth_vmdq_dcb_conf__bindgen_ty_1>())).pools as *const _
+ as usize
+ },
8usize,
concat!(
"Offset of field: ",
@@ -873,7 +877,9 @@ fn bindgen_test_layout_rte_eth_vmdq_dcb_conf() {
concat!("Alignment of ", stringify!(rte_eth_vmdq_dcb_conf))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_vmdq_dcb_conf)).nb_queue_pools as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_eth_vmdq_dcb_conf>())).nb_queue_pools as *const _ as usize
+ },
0usize,
concat!(
"Offset of field: ",
@@ -883,7 +889,10 @@ fn bindgen_test_layout_rte_eth_vmdq_dcb_conf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_vmdq_dcb_conf)).enable_default_pool as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_eth_vmdq_dcb_conf>())).enable_default_pool as *const _
+ as usize
+ },
4usize,
concat!(
"Offset of field: ",
@@ -893,7 +902,9 @@ fn bindgen_test_layout_rte_eth_vmdq_dcb_conf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_vmdq_dcb_conf)).default_pool as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_eth_vmdq_dcb_conf>())).default_pool as *const _ as usize
+ },
5usize,
concat!(
"Offset of field: ",
@@ -903,7 +914,9 @@ fn bindgen_test_layout_rte_eth_vmdq_dcb_conf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_vmdq_dcb_conf)).nb_pool_maps as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_eth_vmdq_dcb_conf>())).nb_pool_maps as *const _ as usize
+ },
6usize,
concat!(
"Offset of field: ",
@@ -913,7 +926,7 @@ fn bindgen_test_layout_rte_eth_vmdq_dcb_conf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_vmdq_dcb_conf)).pool_map as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_vmdq_dcb_conf>())).pool_map as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
@@ -923,7 +936,7 @@ fn bindgen_test_layout_rte_eth_vmdq_dcb_conf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_vmdq_dcb_conf)).dcb_tc as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_vmdq_dcb_conf>())).dcb_tc as *const _ as usize },
1032usize,
concat!(
"Offset of field: ",
@@ -964,7 +977,7 @@ fn bindgen_test_layout_rte_eth_dcb_rx_conf() {
concat!("Alignment of ", stringify!(rte_eth_dcb_rx_conf))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_dcb_rx_conf)).nb_tcs as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_dcb_rx_conf>())).nb_tcs as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -974,7 +987,7 @@ fn bindgen_test_layout_rte_eth_dcb_rx_conf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_dcb_rx_conf)).dcb_tc as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_dcb_rx_conf>())).dcb_tc as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
@@ -1015,7 +1028,9 @@ fn bindgen_test_layout_rte_eth_vmdq_dcb_tx_conf() {
concat!("Alignment of ", stringify!(rte_eth_vmdq_dcb_tx_conf))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_vmdq_dcb_tx_conf)).nb_queue_pools as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_eth_vmdq_dcb_tx_conf>())).nb_queue_pools as *const _ as usize
+ },
0usize,
concat!(
"Offset of field: ",
@@ -1025,7 +1040,7 @@ fn bindgen_test_layout_rte_eth_vmdq_dcb_tx_conf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_vmdq_dcb_tx_conf)).dcb_tc as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_vmdq_dcb_tx_conf>())).dcb_tc as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
@@ -1066,7 +1081,7 @@ fn bindgen_test_layout_rte_eth_dcb_tx_conf() {
concat!("Alignment of ", stringify!(rte_eth_dcb_tx_conf))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_dcb_tx_conf)).nb_tcs as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_dcb_tx_conf>())).nb_tcs as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -1076,7 +1091,7 @@ fn bindgen_test_layout_rte_eth_dcb_tx_conf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_dcb_tx_conf)).dcb_tc as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_dcb_tx_conf>())).dcb_tc as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
@@ -1115,7 +1130,9 @@ fn bindgen_test_layout_rte_eth_vmdq_tx_conf() {
concat!("Alignment of ", stringify!(rte_eth_vmdq_tx_conf))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_vmdq_tx_conf)).nb_queue_pools as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_eth_vmdq_tx_conf>())).nb_queue_pools as *const _ as usize
+ },
0usize,
concat!(
"Offset of field: ",
@@ -1178,7 +1195,8 @@ fn bindgen_test_layout_rte_eth_vmdq_rx_conf__bindgen_ty_1() {
);
assert_eq!(
unsafe {
- &(*(0 as *const rte_eth_vmdq_rx_conf__bindgen_ty_1)).vlan_id as *const _ as usize
+ &(*(::std::ptr::null::<rte_eth_vmdq_rx_conf__bindgen_ty_1>())).vlan_id as *const _
+ as usize
},
0usize,
concat!(
@@ -1189,7 +1207,10 @@ fn bindgen_test_layout_rte_eth_vmdq_rx_conf__bindgen_ty_1() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_vmdq_rx_conf__bindgen_ty_1)).pools as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_eth_vmdq_rx_conf__bindgen_ty_1>())).pools as *const _
+ as usize
+ },
8usize,
concat!(
"Offset of field: ",
@@ -1217,7 +1238,9 @@ fn bindgen_test_layout_rte_eth_vmdq_rx_conf() {
concat!("Alignment of ", stringify!(rte_eth_vmdq_rx_conf))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_vmdq_rx_conf)).nb_queue_pools as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_eth_vmdq_rx_conf>())).nb_queue_pools as *const _ as usize
+ },
0usize,
concat!(
"Offset of field: ",
@@ -1227,7 +1250,10 @@ fn bindgen_test_layout_rte_eth_vmdq_rx_conf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_vmdq_rx_conf)).enable_default_pool as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_eth_vmdq_rx_conf>())).enable_default_pool as *const _
+ as usize
+ },
4usize,
concat!(
"Offset of field: ",
@@ -1237,7 +1263,9 @@ fn bindgen_test_layout_rte_eth_vmdq_rx_conf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_vmdq_rx_conf)).default_pool as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_eth_vmdq_rx_conf>())).default_pool as *const _ as usize
+ },
5usize,
concat!(
"Offset of field: ",
@@ -1247,7 +1275,9 @@ fn bindgen_test_layout_rte_eth_vmdq_rx_conf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_vmdq_rx_conf)).enable_loop_back as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_eth_vmdq_rx_conf>())).enable_loop_back as *const _ as usize
+ },
6usize,
concat!(
"Offset of field: ",
@@ -1257,7 +1287,9 @@ fn bindgen_test_layout_rte_eth_vmdq_rx_conf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_vmdq_rx_conf)).nb_pool_maps as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_eth_vmdq_rx_conf>())).nb_pool_maps as *const _ as usize
+ },
7usize,
concat!(
"Offset of field: ",
@@ -1267,7 +1299,7 @@ fn bindgen_test_layout_rte_eth_vmdq_rx_conf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_vmdq_rx_conf)).rx_mode as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_vmdq_rx_conf>())).rx_mode as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
@@ -1277,7 +1309,7 @@ fn bindgen_test_layout_rte_eth_vmdq_rx_conf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_vmdq_rx_conf)).pool_map as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_vmdq_rx_conf>())).pool_map as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
@@ -1352,7 +1384,7 @@ fn bindgen_test_layout_rte_eth_ipv4_flow() {
concat!("Alignment of ", stringify!(rte_eth_ipv4_flow))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_ipv4_flow)).src_ip as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_ipv4_flow>())).src_ip as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -1362,7 +1394,7 @@ fn bindgen_test_layout_rte_eth_ipv4_flow() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_ipv4_flow)).dst_ip as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_ipv4_flow>())).dst_ip as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
@@ -1372,7 +1404,7 @@ fn bindgen_test_layout_rte_eth_ipv4_flow() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_ipv4_flow)).tos as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_ipv4_flow>())).tos as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
@@ -1382,7 +1414,7 @@ fn bindgen_test_layout_rte_eth_ipv4_flow() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_ipv4_flow)).ttl as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_ipv4_flow>())).ttl as *const _ as usize },
9usize,
concat!(
"Offset of field: ",
@@ -1392,7 +1424,7 @@ fn bindgen_test_layout_rte_eth_ipv4_flow() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_ipv4_flow)).proto as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_ipv4_flow>())).proto as *const _ as usize },
10usize,
concat!(
"Offset of field: ",
@@ -1435,7 +1467,7 @@ fn bindgen_test_layout_rte_eth_ipv6_flow() {
concat!("Alignment of ", stringify!(rte_eth_ipv6_flow))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_ipv6_flow)).src_ip as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_ipv6_flow>())).src_ip as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -1445,7 +1477,7 @@ fn bindgen_test_layout_rte_eth_ipv6_flow() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_ipv6_flow)).dst_ip as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_ipv6_flow>())).dst_ip as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
@@ -1455,7 +1487,7 @@ fn bindgen_test_layout_rte_eth_ipv6_flow() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_ipv6_flow)).tc as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_ipv6_flow>())).tc as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
@@ -1465,7 +1497,7 @@ fn bindgen_test_layout_rte_eth_ipv6_flow() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_ipv6_flow)).proto as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_ipv6_flow>())).proto as *const _ as usize },
33usize,
concat!(
"Offset of field: ",
@@ -1475,7 +1507,7 @@ fn bindgen_test_layout_rte_eth_ipv6_flow() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_ipv6_flow)).hop_limits as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_ipv6_flow>())).hop_limits as *const _ as usize },
34usize,
concat!(
"Offset of field: ",
@@ -1527,7 +1559,9 @@ fn bindgen_test_layout_rte_eth_fdir_masks() {
concat!("Alignment of ", stringify!(rte_eth_fdir_masks))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_fdir_masks)).vlan_tci_mask as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_eth_fdir_masks>())).vlan_tci_mask as *const _ as usize
+ },
0usize,
concat!(
"Offset of field: ",
@@ -1537,7 +1571,7 @@ fn bindgen_test_layout_rte_eth_fdir_masks() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_fdir_masks)).ipv4_mask as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_fdir_masks>())).ipv4_mask as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
@@ -1547,7 +1581,7 @@ fn bindgen_test_layout_rte_eth_fdir_masks() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_fdir_masks)).ipv6_mask as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_fdir_masks>())).ipv6_mask as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
@@ -1557,7 +1591,9 @@ fn bindgen_test_layout_rte_eth_fdir_masks() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_fdir_masks)).src_port_mask as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_eth_fdir_masks>())).src_port_mask as *const _ as usize
+ },
52usize,
concat!(
"Offset of field: ",
@@ -1567,7 +1603,9 @@ fn bindgen_test_layout_rte_eth_fdir_masks() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_fdir_masks)).dst_port_mask as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_eth_fdir_masks>())).dst_port_mask as *const _ as usize
+ },
54usize,
concat!(
"Offset of field: ",
@@ -1577,7 +1615,9 @@ fn bindgen_test_layout_rte_eth_fdir_masks() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_fdir_masks)).mac_addr_byte_mask as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_eth_fdir_masks>())).mac_addr_byte_mask as *const _ as usize
+ },
56usize,
concat!(
"Offset of field: ",
@@ -1587,7 +1627,9 @@ fn bindgen_test_layout_rte_eth_fdir_masks() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_fdir_masks)).tunnel_id_mask as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_eth_fdir_masks>())).tunnel_id_mask as *const _ as usize
+ },
60usize,
concat!(
"Offset of field: ",
@@ -1597,7 +1639,9 @@ fn bindgen_test_layout_rte_eth_fdir_masks() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_fdir_masks)).tunnel_type_mask as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_eth_fdir_masks>())).tunnel_type_mask as *const _ as usize
+ },
64usize,
concat!(
"Offset of field: ",
@@ -1645,7 +1689,7 @@ fn bindgen_test_layout_rte_eth_flex_payload_cfg() {
concat!("Alignment of ", stringify!(rte_eth_flex_payload_cfg))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_flex_payload_cfg)).type_ as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_flex_payload_cfg>())).type_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -1655,7 +1699,9 @@ fn bindgen_test_layout_rte_eth_flex_payload_cfg() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_flex_payload_cfg)).src_offset as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_eth_flex_payload_cfg>())).src_offset as *const _ as usize
+ },
4usize,
concat!(
"Offset of field: ",
@@ -1696,7 +1742,9 @@ fn bindgen_test_layout_rte_eth_fdir_flex_mask() {
concat!("Alignment of ", stringify!(rte_eth_fdir_flex_mask))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_fdir_flex_mask)).flow_type as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_eth_fdir_flex_mask>())).flow_type as *const _ as usize
+ },
0usize,
concat!(
"Offset of field: ",
@@ -1706,7 +1754,7 @@ fn bindgen_test_layout_rte_eth_fdir_flex_mask() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_fdir_flex_mask)).mask as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_fdir_flex_mask>())).mask as *const _ as usize },
2usize,
concat!(
"Offset of field: ",
@@ -1746,7 +1794,9 @@ fn bindgen_test_layout_rte_eth_fdir_flex_conf() {
concat!("Alignment of ", stringify!(rte_eth_fdir_flex_conf))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_fdir_flex_conf)).nb_payloads as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_eth_fdir_flex_conf>())).nb_payloads as *const _ as usize
+ },
0usize,
concat!(
"Offset of field: ",
@@ -1756,7 +1806,9 @@ fn bindgen_test_layout_rte_eth_fdir_flex_conf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_fdir_flex_conf)).nb_flexmasks as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_eth_fdir_flex_conf>())).nb_flexmasks as *const _ as usize
+ },
2usize,
concat!(
"Offset of field: ",
@@ -1766,7 +1818,7 @@ fn bindgen_test_layout_rte_eth_fdir_flex_conf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_fdir_flex_conf)).flex_set as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_fdir_flex_conf>())).flex_set as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
@@ -1776,7 +1828,9 @@ fn bindgen_test_layout_rte_eth_fdir_flex_conf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_fdir_flex_conf)).flex_mask as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_eth_fdir_flex_conf>())).flex_mask as *const _ as usize
+ },
292usize,
concat!(
"Offset of field: ",
@@ -1827,7 +1881,7 @@ fn bindgen_test_layout_rte_fdir_conf() {
concat!("Alignment of ", stringify!(rte_fdir_conf))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_fdir_conf)).mode as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_fdir_conf>())).mode as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -1837,7 +1891,7 @@ fn bindgen_test_layout_rte_fdir_conf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_fdir_conf)).pballoc as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_fdir_conf>())).pballoc as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
@@ -1847,7 +1901,7 @@ fn bindgen_test_layout_rte_fdir_conf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_fdir_conf)).status as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_fdir_conf>())).status as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
@@ -1857,7 +1911,7 @@ fn bindgen_test_layout_rte_fdir_conf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_fdir_conf)).drop_queue as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_fdir_conf>())).drop_queue as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
@@ -1867,7 +1921,7 @@ fn bindgen_test_layout_rte_fdir_conf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_fdir_conf)).mask as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_fdir_conf>())).mask as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
@@ -1877,7 +1931,7 @@ fn bindgen_test_layout_rte_fdir_conf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_fdir_conf)).flex_conf as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_fdir_conf>())).flex_conf as *const _ as usize },
84usize,
concat!(
"Offset of field: ",
@@ -1919,7 +1973,7 @@ fn bindgen_test_layout_rte_intr_conf() {
concat!("Alignment of ", stringify!(rte_intr_conf))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_intr_conf)).lsc as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_intr_conf>())).lsc as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -1929,7 +1983,7 @@ fn bindgen_test_layout_rte_intr_conf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_intr_conf)).rxq as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_intr_conf>())).rxq as *const _ as usize },
2usize,
concat!(
"Offset of field: ",
@@ -2002,7 +2056,9 @@ fn bindgen_test_layout_rte_eth_conf__bindgen_ty_1() {
concat!("Alignment of ", stringify!(rte_eth_conf__bindgen_ty_1))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_conf__bindgen_ty_1)).rss_conf as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_eth_conf__bindgen_ty_1>())).rss_conf as *const _ as usize
+ },
0usize,
concat!(
"Offset of field: ",
@@ -2012,7 +2068,10 @@ fn bindgen_test_layout_rte_eth_conf__bindgen_ty_1() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_conf__bindgen_ty_1)).vmdq_dcb_conf as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_eth_conf__bindgen_ty_1>())).vmdq_dcb_conf as *const _
+ as usize
+ },
24usize,
concat!(
"Offset of field: ",
@@ -2022,7 +2081,9 @@ fn bindgen_test_layout_rte_eth_conf__bindgen_ty_1() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_conf__bindgen_ty_1)).dcb_rx_conf as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_eth_conf__bindgen_ty_1>())).dcb_rx_conf as *const _ as usize
+ },
1064usize,
concat!(
"Offset of field: ",
@@ -2032,7 +2093,9 @@ fn bindgen_test_layout_rte_eth_conf__bindgen_ty_1() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_conf__bindgen_ty_1)).vmdq_rx_conf as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_eth_conf__bindgen_ty_1>())).vmdq_rx_conf as *const _ as usize
+ },
1080usize,
concat!(
"Offset of field: ",
@@ -2074,7 +2137,8 @@ fn bindgen_test_layout_rte_eth_conf__bindgen_ty_2() {
);
assert_eq!(
unsafe {
- &(*(0 as *const rte_eth_conf__bindgen_ty_2)).vmdq_dcb_tx_conf as *const _ as usize
+ &(*(::std::ptr::null::<rte_eth_conf__bindgen_ty_2>())).vmdq_dcb_tx_conf as *const _
+ as usize
},
0usize,
concat!(
@@ -2085,7 +2149,9 @@ fn bindgen_test_layout_rte_eth_conf__bindgen_ty_2() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_conf__bindgen_ty_2)).dcb_tx_conf as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_eth_conf__bindgen_ty_2>())).dcb_tx_conf as *const _ as usize
+ },
0usize,
concat!(
"Offset of field: ",
@@ -2095,7 +2161,9 @@ fn bindgen_test_layout_rte_eth_conf__bindgen_ty_2() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_conf__bindgen_ty_2)).vmdq_tx_conf as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_eth_conf__bindgen_ty_2>())).vmdq_tx_conf as *const _ as usize
+ },
0usize,
concat!(
"Offset of field: ",
@@ -2123,7 +2191,7 @@ fn bindgen_test_layout_rte_eth_conf() {
concat!("Alignment of ", stringify!(rte_eth_conf))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_conf)).link_speeds as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_conf>())).link_speeds as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -2133,7 +2201,7 @@ fn bindgen_test_layout_rte_eth_conf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_conf)).rxmode as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_conf>())).rxmode as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
@@ -2143,7 +2211,7 @@ fn bindgen_test_layout_rte_eth_conf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_conf)).txmode as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_conf>())).txmode as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
@@ -2153,7 +2221,7 @@ fn bindgen_test_layout_rte_eth_conf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_conf)).lpbk_mode as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_conf>())).lpbk_mode as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
@@ -2163,7 +2231,7 @@ fn bindgen_test_layout_rte_eth_conf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_conf)).rx_adv_conf as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_conf>())).rx_adv_conf as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
@@ -2173,7 +2241,7 @@ fn bindgen_test_layout_rte_eth_conf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_conf)).tx_adv_conf as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_conf>())).tx_adv_conf as *const _ as usize },
2152usize,
concat!(
"Offset of field: ",
@@ -2183,7 +2251,7 @@ fn bindgen_test_layout_rte_eth_conf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_conf)).dcb_capability_en as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_conf>())).dcb_capability_en as *const _ as usize },
2164usize,
concat!(
"Offset of field: ",
@@ -2193,7 +2261,7 @@ fn bindgen_test_layout_rte_eth_conf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_conf)).fdir_conf as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_conf>())).fdir_conf as *const _ as usize },
2168usize,
concat!(
"Offset of field: ",
@@ -2203,7 +2271,7 @@ fn bindgen_test_layout_rte_eth_conf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_eth_conf)).intr_conf as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_eth_conf>())).intr_conf as *const _ as usize },
2940usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/layout_kni_mbuf.rs b/tests/expectations/tests/layout_kni_mbuf.rs
index 7d1efa17..a8989c10 100644
--- a/tests/expectations/tests/layout_kni_mbuf.rs
+++ b/tests/expectations/tests/layout_kni_mbuf.rs
@@ -39,7 +39,7 @@ fn bindgen_test_layout_rte_kni_mbuf() {
concat!("Size of: ", stringify!(rte_kni_mbuf))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_kni_mbuf)).buf_addr as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_kni_mbuf>())).buf_addr as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -49,7 +49,7 @@ fn bindgen_test_layout_rte_kni_mbuf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_kni_mbuf)).buf_physaddr as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_kni_mbuf>())).buf_physaddr as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
@@ -59,7 +59,7 @@ fn bindgen_test_layout_rte_kni_mbuf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_kni_mbuf)).pad0 as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_kni_mbuf>())).pad0 as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
@@ -69,7 +69,7 @@ fn bindgen_test_layout_rte_kni_mbuf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_kni_mbuf)).data_off as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_kni_mbuf>())).data_off as *const _ as usize },
18usize,
concat!(
"Offset of field: ",
@@ -79,7 +79,7 @@ fn bindgen_test_layout_rte_kni_mbuf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_kni_mbuf)).pad1 as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_kni_mbuf>())).pad1 as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
@@ -89,7 +89,7 @@ fn bindgen_test_layout_rte_kni_mbuf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_kni_mbuf)).nb_segs as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_kni_mbuf>())).nb_segs as *const _ as usize },
22usize,
concat!(
"Offset of field: ",
@@ -99,7 +99,7 @@ fn bindgen_test_layout_rte_kni_mbuf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_kni_mbuf)).pad4 as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_kni_mbuf>())).pad4 as *const _ as usize },
23usize,
concat!(
"Offset of field: ",
@@ -109,7 +109,7 @@ fn bindgen_test_layout_rte_kni_mbuf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_kni_mbuf)).ol_flags as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_kni_mbuf>())).ol_flags as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
@@ -119,7 +119,7 @@ fn bindgen_test_layout_rte_kni_mbuf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_kni_mbuf)).pad2 as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_kni_mbuf>())).pad2 as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
@@ -129,7 +129,7 @@ fn bindgen_test_layout_rte_kni_mbuf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_kni_mbuf)).pkt_len as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_kni_mbuf>())).pkt_len as *const _ as usize },
36usize,
concat!(
"Offset of field: ",
@@ -139,7 +139,7 @@ fn bindgen_test_layout_rte_kni_mbuf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_kni_mbuf)).data_len as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_kni_mbuf>())).data_len as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
@@ -149,7 +149,7 @@ fn bindgen_test_layout_rte_kni_mbuf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_kni_mbuf)).pad3 as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_kni_mbuf>())).pad3 as *const _ as usize },
64usize,
concat!(
"Offset of field: ",
@@ -159,7 +159,7 @@ fn bindgen_test_layout_rte_kni_mbuf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_kni_mbuf)).pool as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_kni_mbuf>())).pool as *const _ as usize },
72usize,
concat!(
"Offset of field: ",
@@ -169,7 +169,7 @@ fn bindgen_test_layout_rte_kni_mbuf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_kni_mbuf)).next as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_kni_mbuf>())).next as *const _ as usize },
80usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/layout_large_align_field.rs b/tests/expectations/tests/layout_large_align_field.rs
index a7e455a9..21f84546 100644
--- a/tests/expectations/tests/layout_large_align_field.rs
+++ b/tests/expectations/tests/layout_large_align_field.rs
@@ -79,7 +79,7 @@ fn bindgen_test_layout_ip_frag() {
concat!("Alignment of ", stringify!(ip_frag))
);
assert_eq!(
- unsafe { &(*(0 as *const ip_frag)).ofs as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<ip_frag>())).ofs as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -89,7 +89,7 @@ fn bindgen_test_layout_ip_frag() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const ip_frag)).len as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<ip_frag>())).len as *const _ as usize },
2usize,
concat!(
"Offset of field: ",
@@ -99,7 +99,7 @@ fn bindgen_test_layout_ip_frag() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const ip_frag)).mb as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<ip_frag>())).mb as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
@@ -138,7 +138,7 @@ fn bindgen_test_layout_ip_frag_key() {
concat!("Alignment of ", stringify!(ip_frag_key))
);
assert_eq!(
- unsafe { &(*(0 as *const ip_frag_key)).src_dst as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<ip_frag_key>())).src_dst as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -148,7 +148,7 @@ fn bindgen_test_layout_ip_frag_key() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const ip_frag_key)).id as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<ip_frag_key>())).id as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
@@ -158,7 +158,7 @@ fn bindgen_test_layout_ip_frag_key() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const ip_frag_key)).key_len as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<ip_frag_key>())).key_len as *const _ as usize },
36usize,
concat!(
"Offset of field: ",
@@ -208,7 +208,9 @@ fn bindgen_test_layout_ip_frag_pkt__bindgen_ty_1() {
concat!("Alignment of ", stringify!(ip_frag_pkt__bindgen_ty_1))
);
assert_eq!(
- unsafe { &(*(0 as *const ip_frag_pkt__bindgen_ty_1)).tqe_next as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<ip_frag_pkt__bindgen_ty_1>())).tqe_next as *const _ as usize
+ },
0usize,
concat!(
"Offset of field: ",
@@ -218,7 +220,9 @@ fn bindgen_test_layout_ip_frag_pkt__bindgen_ty_1() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const ip_frag_pkt__bindgen_ty_1)).tqe_prev as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<ip_frag_pkt__bindgen_ty_1>())).tqe_prev as *const _ as usize
+ },
8usize,
concat!(
"Offset of field: ",
@@ -241,7 +245,7 @@ fn bindgen_test_layout_ip_frag_pkt() {
concat!("Size of: ", stringify!(ip_frag_pkt))
);
assert_eq!(
- unsafe { &(*(0 as *const ip_frag_pkt)).lru as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<ip_frag_pkt>())).lru as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -251,7 +255,7 @@ fn bindgen_test_layout_ip_frag_pkt() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const ip_frag_pkt)).key as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<ip_frag_pkt>())).key as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
@@ -261,7 +265,7 @@ fn bindgen_test_layout_ip_frag_pkt() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const ip_frag_pkt)).start as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<ip_frag_pkt>())).start as *const _ as usize },
56usize,
concat!(
"Offset of field: ",
@@ -271,7 +275,7 @@ fn bindgen_test_layout_ip_frag_pkt() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const ip_frag_pkt)).total_size as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<ip_frag_pkt>())).total_size as *const _ as usize },
64usize,
concat!(
"Offset of field: ",
@@ -281,7 +285,7 @@ fn bindgen_test_layout_ip_frag_pkt() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const ip_frag_pkt)).frag_size as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<ip_frag_pkt>())).frag_size as *const _ as usize },
68usize,
concat!(
"Offset of field: ",
@@ -291,7 +295,7 @@ fn bindgen_test_layout_ip_frag_pkt() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const ip_frag_pkt)).last_idx as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<ip_frag_pkt>())).last_idx as *const _ as usize },
72usize,
concat!(
"Offset of field: ",
@@ -301,7 +305,7 @@ fn bindgen_test_layout_ip_frag_pkt() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const ip_frag_pkt)).frags as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<ip_frag_pkt>())).frags as *const _ as usize },
80usize,
concat!(
"Offset of field: ",
@@ -335,7 +339,7 @@ fn bindgen_test_layout_ip_pkt_list() {
concat!("Alignment of ", stringify!(ip_pkt_list))
);
assert_eq!(
- unsafe { &(*(0 as *const ip_pkt_list)).tqh_first as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<ip_pkt_list>())).tqh_first as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -345,7 +349,7 @@ fn bindgen_test_layout_ip_pkt_list() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const ip_pkt_list)).tqh_last as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<ip_pkt_list>())).tqh_last as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
@@ -386,7 +390,7 @@ fn bindgen_test_layout_ip_frag_tbl_stat() {
concat!("Size of: ", stringify!(ip_frag_tbl_stat))
);
assert_eq!(
- unsafe { &(*(0 as *const ip_frag_tbl_stat)).find_num as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<ip_frag_tbl_stat>())).find_num as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -396,7 +400,7 @@ fn bindgen_test_layout_ip_frag_tbl_stat() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const ip_frag_tbl_stat)).add_num as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<ip_frag_tbl_stat>())).add_num as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
@@ -406,7 +410,7 @@ fn bindgen_test_layout_ip_frag_tbl_stat() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const ip_frag_tbl_stat)).del_num as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<ip_frag_tbl_stat>())).del_num as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
@@ -416,7 +420,7 @@ fn bindgen_test_layout_ip_frag_tbl_stat() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const ip_frag_tbl_stat)).reuse_num as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<ip_frag_tbl_stat>())).reuse_num as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
@@ -426,7 +430,7 @@ fn bindgen_test_layout_ip_frag_tbl_stat() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const ip_frag_tbl_stat)).fail_total as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<ip_frag_tbl_stat>())).fail_total as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
@@ -436,7 +440,7 @@ fn bindgen_test_layout_ip_frag_tbl_stat() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const ip_frag_tbl_stat)).fail_nospace as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<ip_frag_tbl_stat>())).fail_nospace as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
@@ -486,7 +490,7 @@ fn bindgen_test_layout_rte_ip_frag_tbl() {
concat!("Size of: ", stringify!(rte_ip_frag_tbl))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_ip_frag_tbl)).max_cycles as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_ip_frag_tbl>())).max_cycles as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -496,7 +500,7 @@ fn bindgen_test_layout_rte_ip_frag_tbl() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_ip_frag_tbl)).entry_mask as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_ip_frag_tbl>())).entry_mask as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
@@ -506,7 +510,7 @@ fn bindgen_test_layout_rte_ip_frag_tbl() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_ip_frag_tbl)).max_entries as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_ip_frag_tbl>())).max_entries as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
@@ -516,7 +520,7 @@ fn bindgen_test_layout_rte_ip_frag_tbl() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_ip_frag_tbl)).use_entries as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_ip_frag_tbl>())).use_entries as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
@@ -526,7 +530,7 @@ fn bindgen_test_layout_rte_ip_frag_tbl() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_ip_frag_tbl)).bucket_entries as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_ip_frag_tbl>())).bucket_entries as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
@@ -536,7 +540,7 @@ fn bindgen_test_layout_rte_ip_frag_tbl() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_ip_frag_tbl)).nb_entries as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_ip_frag_tbl>())).nb_entries as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
@@ -546,7 +550,7 @@ fn bindgen_test_layout_rte_ip_frag_tbl() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_ip_frag_tbl)).nb_buckets as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_ip_frag_tbl>())).nb_buckets as *const _ as usize },
28usize,
concat!(
"Offset of field: ",
@@ -556,7 +560,7 @@ fn bindgen_test_layout_rte_ip_frag_tbl() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_ip_frag_tbl)).last as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_ip_frag_tbl>())).last as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
@@ -566,7 +570,7 @@ fn bindgen_test_layout_rte_ip_frag_tbl() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_ip_frag_tbl)).lru as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_ip_frag_tbl>())).lru as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
@@ -576,7 +580,7 @@ fn bindgen_test_layout_rte_ip_frag_tbl() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_ip_frag_tbl)).stat as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_ip_frag_tbl>())).stat as *const _ as usize },
64usize,
concat!(
"Offset of field: ",
@@ -586,7 +590,7 @@ fn bindgen_test_layout_rte_ip_frag_tbl() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_ip_frag_tbl)).pkt as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_ip_frag_tbl>())).pkt as *const _ as usize },
128usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/layout_mbuf.rs b/tests/expectations/tests/layout_mbuf.rs
index 339771d9..1e5a0c42 100644
--- a/tests/expectations/tests/layout_mbuf.rs
+++ b/tests/expectations/tests/layout_mbuf.rs
@@ -30,7 +30,7 @@ fn bindgen_test_layout_rte_atomic16_t() {
concat!("Alignment of ", stringify!(rte_atomic16_t))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_atomic16_t)).cnt as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_atomic16_t>())).cnt as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -115,7 +115,9 @@ fn bindgen_test_layout_rte_mbuf__bindgen_ty_1() {
concat!("Alignment of ", stringify!(rte_mbuf__bindgen_ty_1))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mbuf__bindgen_ty_1)).refcnt_atomic as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_mbuf__bindgen_ty_1>())).refcnt_atomic as *const _ as usize
+ },
0usize,
concat!(
"Offset of field: ",
@@ -125,7 +127,7 @@ fn bindgen_test_layout_rte_mbuf__bindgen_ty_1() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mbuf__bindgen_ty_1)).refcnt as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_mbuf__bindgen_ty_1>())).refcnt as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -458,7 +460,9 @@ fn bindgen_test_layout_rte_mbuf__bindgen_ty_2() {
concat!("Alignment of ", stringify!(rte_mbuf__bindgen_ty_2))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mbuf__bindgen_ty_2)).packet_type as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_mbuf__bindgen_ty_2>())).packet_type as *const _ as usize
+ },
0usize,
concat!(
"Offset of field: ",
@@ -525,8 +529,10 @@ fn bindgen_test_layout_rte_mbuf__bindgen_ty_3__bindgen_ty_1__bindgen_ty_1__bindg
);
assert_eq!(
unsafe {
- &(*(0 as *const rte_mbuf__bindgen_ty_3__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1)).hash
- as *const _ as usize
+ &(*(::std::ptr::null::<
+ rte_mbuf__bindgen_ty_3__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1,
+ >()))
+ .hash as *const _ as usize
},
0usize,
concat!(
@@ -538,8 +544,10 @@ fn bindgen_test_layout_rte_mbuf__bindgen_ty_3__bindgen_ty_1__bindgen_ty_1__bindg
);
assert_eq!(
unsafe {
- &(*(0 as *const rte_mbuf__bindgen_ty_3__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1)).id
- as *const _ as usize
+ &(*(::std::ptr::null::<
+ rte_mbuf__bindgen_ty_3__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1,
+ >()))
+ .id as *const _ as usize
},
2usize,
concat!(
@@ -570,8 +578,8 @@ fn bindgen_test_layout_rte_mbuf__bindgen_ty_3__bindgen_ty_1__bindgen_ty_1() {
);
assert_eq!(
unsafe {
- &(*(0 as *const rte_mbuf__bindgen_ty_3__bindgen_ty_1__bindgen_ty_1)).lo as *const _
- as usize
+ &(*(::std::ptr::null::<rte_mbuf__bindgen_ty_3__bindgen_ty_1__bindgen_ty_1>())).lo
+ as *const _ as usize
},
0usize,
concat!(
@@ -606,7 +614,9 @@ fn bindgen_test_layout_rte_mbuf__bindgen_ty_3__bindgen_ty_1() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mbuf__bindgen_ty_3__bindgen_ty_1)).hi as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_mbuf__bindgen_ty_3__bindgen_ty_1>())).hi as *const _ as usize
+ },
4usize,
concat!(
"Offset of field: ",
@@ -646,7 +656,9 @@ fn bindgen_test_layout_rte_mbuf__bindgen_ty_3__bindgen_ty_2() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mbuf__bindgen_ty_3__bindgen_ty_2)).lo as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_mbuf__bindgen_ty_3__bindgen_ty_2>())).lo as *const _ as usize
+ },
0usize,
concat!(
"Offset of field: ",
@@ -656,7 +668,9 @@ fn bindgen_test_layout_rte_mbuf__bindgen_ty_3__bindgen_ty_2() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mbuf__bindgen_ty_3__bindgen_ty_2)).hi as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_mbuf__bindgen_ty_3__bindgen_ty_2>())).hi as *const _ as usize
+ },
4usize,
concat!(
"Offset of field: ",
@@ -679,7 +693,7 @@ fn bindgen_test_layout_rte_mbuf__bindgen_ty_3() {
concat!("Alignment of ", stringify!(rte_mbuf__bindgen_ty_3))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mbuf__bindgen_ty_3)).rss as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_mbuf__bindgen_ty_3>())).rss as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -689,7 +703,7 @@ fn bindgen_test_layout_rte_mbuf__bindgen_ty_3() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mbuf__bindgen_ty_3)).fdir as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_mbuf__bindgen_ty_3>())).fdir as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -699,7 +713,7 @@ fn bindgen_test_layout_rte_mbuf__bindgen_ty_3() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mbuf__bindgen_ty_3)).sched as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_mbuf__bindgen_ty_3>())).sched as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -709,7 +723,7 @@ fn bindgen_test_layout_rte_mbuf__bindgen_ty_3() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mbuf__bindgen_ty_3)).usr as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_mbuf__bindgen_ty_3>())).usr as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -746,7 +760,7 @@ fn bindgen_test_layout_rte_mbuf__bindgen_ty_4() {
concat!("Alignment of ", stringify!(rte_mbuf__bindgen_ty_4))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mbuf__bindgen_ty_4)).userdata as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_mbuf__bindgen_ty_4>())).userdata as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -756,7 +770,7 @@ fn bindgen_test_layout_rte_mbuf__bindgen_ty_4() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mbuf__bindgen_ty_4)).udata64 as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_mbuf__bindgen_ty_4>())).udata64 as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -1051,7 +1065,9 @@ fn bindgen_test_layout_rte_mbuf__bindgen_ty_5() {
concat!("Alignment of ", stringify!(rte_mbuf__bindgen_ty_5))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mbuf__bindgen_ty_5)).tx_offload as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_mbuf__bindgen_ty_5>())).tx_offload as *const _ as usize
+ },
0usize,
concat!(
"Offset of field: ",
@@ -1074,7 +1090,7 @@ fn bindgen_test_layout_rte_mbuf() {
concat!("Size of: ", stringify!(rte_mbuf))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mbuf)).cacheline0 as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_mbuf>())).cacheline0 as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -1084,7 +1100,7 @@ fn bindgen_test_layout_rte_mbuf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mbuf)).buf_addr as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_mbuf>())).buf_addr as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -1094,7 +1110,7 @@ fn bindgen_test_layout_rte_mbuf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mbuf)).buf_physaddr as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_mbuf>())).buf_physaddr as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
@@ -1104,7 +1120,7 @@ fn bindgen_test_layout_rte_mbuf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mbuf)).buf_len as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_mbuf>())).buf_len as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
@@ -1114,7 +1130,7 @@ fn bindgen_test_layout_rte_mbuf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mbuf)).rearm_data as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_mbuf>())).rearm_data as *const _ as usize },
18usize,
concat!(
"Offset of field: ",
@@ -1124,7 +1140,7 @@ fn bindgen_test_layout_rte_mbuf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mbuf)).data_off as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_mbuf>())).data_off as *const _ as usize },
18usize,
concat!(
"Offset of field: ",
@@ -1134,7 +1150,7 @@ fn bindgen_test_layout_rte_mbuf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mbuf)).nb_segs as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_mbuf>())).nb_segs as *const _ as usize },
22usize,
concat!(
"Offset of field: ",
@@ -1144,7 +1160,7 @@ fn bindgen_test_layout_rte_mbuf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mbuf)).port as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_mbuf>())).port as *const _ as usize },
23usize,
concat!(
"Offset of field: ",
@@ -1154,7 +1170,7 @@ fn bindgen_test_layout_rte_mbuf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mbuf)).ol_flags as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_mbuf>())).ol_flags as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
@@ -1164,7 +1180,7 @@ fn bindgen_test_layout_rte_mbuf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mbuf)).rx_descriptor_fields1 as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_mbuf>())).rx_descriptor_fields1 as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
@@ -1174,7 +1190,7 @@ fn bindgen_test_layout_rte_mbuf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mbuf)).pkt_len as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_mbuf>())).pkt_len as *const _ as usize },
36usize,
concat!(
"Offset of field: ",
@@ -1184,7 +1200,7 @@ fn bindgen_test_layout_rte_mbuf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mbuf)).data_len as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_mbuf>())).data_len as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
@@ -1194,7 +1210,7 @@ fn bindgen_test_layout_rte_mbuf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mbuf)).vlan_tci as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_mbuf>())).vlan_tci as *const _ as usize },
42usize,
concat!(
"Offset of field: ",
@@ -1204,7 +1220,7 @@ fn bindgen_test_layout_rte_mbuf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mbuf)).hash as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_mbuf>())).hash as *const _ as usize },
44usize,
concat!(
"Offset of field: ",
@@ -1214,7 +1230,7 @@ fn bindgen_test_layout_rte_mbuf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mbuf)).seqn as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_mbuf>())).seqn as *const _ as usize },
52usize,
concat!(
"Offset of field: ",
@@ -1224,7 +1240,7 @@ fn bindgen_test_layout_rte_mbuf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mbuf)).vlan_tci_outer as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_mbuf>())).vlan_tci_outer as *const _ as usize },
56usize,
concat!(
"Offset of field: ",
@@ -1234,7 +1250,7 @@ fn bindgen_test_layout_rte_mbuf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mbuf)).cacheline1 as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_mbuf>())).cacheline1 as *const _ as usize },
64usize,
concat!(
"Offset of field: ",
@@ -1244,7 +1260,7 @@ fn bindgen_test_layout_rte_mbuf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mbuf)).pool as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_mbuf>())).pool as *const _ as usize },
72usize,
concat!(
"Offset of field: ",
@@ -1254,7 +1270,7 @@ fn bindgen_test_layout_rte_mbuf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mbuf)).next as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_mbuf>())).next as *const _ as usize },
80usize,
concat!(
"Offset of field: ",
@@ -1264,7 +1280,7 @@ fn bindgen_test_layout_rte_mbuf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mbuf)).priv_size as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_mbuf>())).priv_size as *const _ as usize },
96usize,
concat!(
"Offset of field: ",
@@ -1274,7 +1290,7 @@ fn bindgen_test_layout_rte_mbuf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mbuf)).timesync as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_mbuf>())).timesync as *const _ as usize },
98usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/layout_mbuf_1_0.rs b/tests/expectations/tests/layout_mbuf_1_0.rs
index 891dd665..7b4dbf0f 100644
--- a/tests/expectations/tests/layout_mbuf_1_0.rs
+++ b/tests/expectations/tests/layout_mbuf_1_0.rs
@@ -73,7 +73,7 @@ fn bindgen_test_layout_rte_atomic16_t() {
concat!("Alignment of ", stringify!(rte_atomic16_t))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_atomic16_t)).cnt as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_atomic16_t>())).cnt as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -163,7 +163,9 @@ fn bindgen_test_layout_rte_mbuf__bindgen_ty_1() {
concat!("Alignment of ", stringify!(rte_mbuf__bindgen_ty_1))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mbuf__bindgen_ty_1)).refcnt_atomic as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_mbuf__bindgen_ty_1>())).refcnt_atomic as *const _ as usize
+ },
0usize,
concat!(
"Offset of field: ",
@@ -173,7 +175,7 @@ fn bindgen_test_layout_rte_mbuf__bindgen_ty_1() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mbuf__bindgen_ty_1)).refcnt as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_mbuf__bindgen_ty_1>())).refcnt as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -511,7 +513,9 @@ fn bindgen_test_layout_rte_mbuf__bindgen_ty_2() {
concat!("Alignment of ", stringify!(rte_mbuf__bindgen_ty_2))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mbuf__bindgen_ty_2)).packet_type as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_mbuf__bindgen_ty_2>())).packet_type as *const _ as usize
+ },
0usize,
concat!(
"Offset of field: ",
@@ -579,8 +583,10 @@ fn bindgen_test_layout_rte_mbuf__bindgen_ty_3__bindgen_ty_1__bindgen_ty_1__bindg
);
assert_eq!(
unsafe {
- &(*(0 as *const rte_mbuf__bindgen_ty_3__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1)).hash
- as *const _ as usize
+ &(*(::std::ptr::null::<
+ rte_mbuf__bindgen_ty_3__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1,
+ >()))
+ .hash as *const _ as usize
},
0usize,
concat!(
@@ -592,8 +598,10 @@ fn bindgen_test_layout_rte_mbuf__bindgen_ty_3__bindgen_ty_1__bindgen_ty_1__bindg
);
assert_eq!(
unsafe {
- &(*(0 as *const rte_mbuf__bindgen_ty_3__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1)).id
- as *const _ as usize
+ &(*(::std::ptr::null::<
+ rte_mbuf__bindgen_ty_3__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1,
+ >()))
+ .id as *const _ as usize
},
2usize,
concat!(
@@ -629,8 +637,8 @@ fn bindgen_test_layout_rte_mbuf__bindgen_ty_3__bindgen_ty_1__bindgen_ty_1() {
);
assert_eq!(
unsafe {
- &(*(0 as *const rte_mbuf__bindgen_ty_3__bindgen_ty_1__bindgen_ty_1)).lo as *const _
- as usize
+ &(*(::std::ptr::null::<rte_mbuf__bindgen_ty_3__bindgen_ty_1__bindgen_ty_1>())).lo
+ as *const _ as usize
},
0usize,
concat!(
@@ -665,7 +673,9 @@ fn bindgen_test_layout_rte_mbuf__bindgen_ty_3__bindgen_ty_1() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mbuf__bindgen_ty_3__bindgen_ty_1)).hi as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_mbuf__bindgen_ty_3__bindgen_ty_1>())).hi as *const _ as usize
+ },
4usize,
concat!(
"Offset of field: ",
@@ -705,7 +715,9 @@ fn bindgen_test_layout_rte_mbuf__bindgen_ty_3__bindgen_ty_2() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mbuf__bindgen_ty_3__bindgen_ty_2)).lo as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_mbuf__bindgen_ty_3__bindgen_ty_2>())).lo as *const _ as usize
+ },
0usize,
concat!(
"Offset of field: ",
@@ -715,7 +727,9 @@ fn bindgen_test_layout_rte_mbuf__bindgen_ty_3__bindgen_ty_2() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mbuf__bindgen_ty_3__bindgen_ty_2)).hi as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_mbuf__bindgen_ty_3__bindgen_ty_2>())).hi as *const _ as usize
+ },
4usize,
concat!(
"Offset of field: ",
@@ -743,7 +757,7 @@ fn bindgen_test_layout_rte_mbuf__bindgen_ty_3() {
concat!("Alignment of ", stringify!(rte_mbuf__bindgen_ty_3))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mbuf__bindgen_ty_3)).rss as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_mbuf__bindgen_ty_3>())).rss as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -753,7 +767,7 @@ fn bindgen_test_layout_rte_mbuf__bindgen_ty_3() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mbuf__bindgen_ty_3)).fdir as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_mbuf__bindgen_ty_3>())).fdir as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -763,7 +777,7 @@ fn bindgen_test_layout_rte_mbuf__bindgen_ty_3() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mbuf__bindgen_ty_3)).sched as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_mbuf__bindgen_ty_3>())).sched as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -773,7 +787,7 @@ fn bindgen_test_layout_rte_mbuf__bindgen_ty_3() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mbuf__bindgen_ty_3)).usr as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_mbuf__bindgen_ty_3>())).usr as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -810,7 +824,7 @@ fn bindgen_test_layout_rte_mbuf__bindgen_ty_4() {
concat!("Alignment of ", stringify!(rte_mbuf__bindgen_ty_4))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mbuf__bindgen_ty_4)).userdata as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_mbuf__bindgen_ty_4>())).userdata as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -820,7 +834,7 @@ fn bindgen_test_layout_rte_mbuf__bindgen_ty_4() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mbuf__bindgen_ty_4)).udata64 as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_mbuf__bindgen_ty_4>())).udata64 as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -1120,7 +1134,9 @@ fn bindgen_test_layout_rte_mbuf__bindgen_ty_5() {
concat!("Alignment of ", stringify!(rte_mbuf__bindgen_ty_5))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mbuf__bindgen_ty_5)).tx_offload as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<rte_mbuf__bindgen_ty_5>())).tx_offload as *const _ as usize
+ },
0usize,
concat!(
"Offset of field: ",
@@ -1143,7 +1159,7 @@ fn bindgen_test_layout_rte_mbuf() {
concat!("Size of: ", stringify!(rte_mbuf))
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mbuf)).cacheline0 as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_mbuf>())).cacheline0 as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -1153,7 +1169,7 @@ fn bindgen_test_layout_rte_mbuf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mbuf)).buf_addr as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_mbuf>())).buf_addr as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -1163,7 +1179,7 @@ fn bindgen_test_layout_rte_mbuf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mbuf)).buf_physaddr as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_mbuf>())).buf_physaddr as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
@@ -1173,7 +1189,7 @@ fn bindgen_test_layout_rte_mbuf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mbuf)).buf_len as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_mbuf>())).buf_len as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
@@ -1183,7 +1199,7 @@ fn bindgen_test_layout_rte_mbuf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mbuf)).rearm_data as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_mbuf>())).rearm_data as *const _ as usize },
18usize,
concat!(
"Offset of field: ",
@@ -1193,7 +1209,7 @@ fn bindgen_test_layout_rte_mbuf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mbuf)).data_off as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_mbuf>())).data_off as *const _ as usize },
18usize,
concat!(
"Offset of field: ",
@@ -1203,7 +1219,7 @@ fn bindgen_test_layout_rte_mbuf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mbuf)).nb_segs as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_mbuf>())).nb_segs as *const _ as usize },
22usize,
concat!(
"Offset of field: ",
@@ -1213,7 +1229,7 @@ fn bindgen_test_layout_rte_mbuf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mbuf)).port as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_mbuf>())).port as *const _ as usize },
23usize,
concat!(
"Offset of field: ",
@@ -1223,7 +1239,7 @@ fn bindgen_test_layout_rte_mbuf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mbuf)).ol_flags as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_mbuf>())).ol_flags as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
@@ -1233,7 +1249,7 @@ fn bindgen_test_layout_rte_mbuf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mbuf)).rx_descriptor_fields1 as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_mbuf>())).rx_descriptor_fields1 as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
@@ -1243,7 +1259,7 @@ fn bindgen_test_layout_rte_mbuf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mbuf)).pkt_len as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_mbuf>())).pkt_len as *const _ as usize },
36usize,
concat!(
"Offset of field: ",
@@ -1253,7 +1269,7 @@ fn bindgen_test_layout_rte_mbuf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mbuf)).data_len as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_mbuf>())).data_len as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
@@ -1263,7 +1279,7 @@ fn bindgen_test_layout_rte_mbuf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mbuf)).vlan_tci as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_mbuf>())).vlan_tci as *const _ as usize },
42usize,
concat!(
"Offset of field: ",
@@ -1273,7 +1289,7 @@ fn bindgen_test_layout_rte_mbuf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mbuf)).hash as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_mbuf>())).hash as *const _ as usize },
44usize,
concat!(
"Offset of field: ",
@@ -1283,7 +1299,7 @@ fn bindgen_test_layout_rte_mbuf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mbuf)).seqn as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_mbuf>())).seqn as *const _ as usize },
52usize,
concat!(
"Offset of field: ",
@@ -1293,7 +1309,7 @@ fn bindgen_test_layout_rte_mbuf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mbuf)).vlan_tci_outer as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_mbuf>())).vlan_tci_outer as *const _ as usize },
56usize,
concat!(
"Offset of field: ",
@@ -1303,7 +1319,7 @@ fn bindgen_test_layout_rte_mbuf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mbuf)).cacheline1 as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_mbuf>())).cacheline1 as *const _ as usize },
64usize,
concat!(
"Offset of field: ",
@@ -1313,7 +1329,7 @@ fn bindgen_test_layout_rte_mbuf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mbuf)).pool as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_mbuf>())).pool as *const _ as usize },
72usize,
concat!(
"Offset of field: ",
@@ -1323,7 +1339,7 @@ fn bindgen_test_layout_rte_mbuf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mbuf)).next as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_mbuf>())).next as *const _ as usize },
80usize,
concat!(
"Offset of field: ",
@@ -1333,7 +1349,7 @@ fn bindgen_test_layout_rte_mbuf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mbuf)).priv_size as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_mbuf>())).priv_size as *const _ as usize },
96usize,
concat!(
"Offset of field: ",
@@ -1343,7 +1359,7 @@ fn bindgen_test_layout_rte_mbuf() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const rte_mbuf)).timesync as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<rte_mbuf>())).timesync as *const _ as usize },
98usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/libclang-3.8/call-conv-field.rs b/tests/expectations/tests/libclang-3.8/call-conv-field.rs
index 3e3f55a3..ddc1c202 100644
--- a/tests/expectations/tests/libclang-3.8/call-conv-field.rs
+++ b/tests/expectations/tests/libclang-3.8/call-conv-field.rs
@@ -26,7 +26,7 @@ fn bindgen_test_layout_JNINativeInterface_() {
concat!("Alignment of ", stringify!(JNINativeInterface_))
);
assert_eq!(
- unsafe { &(*(0 as *const JNINativeInterface_)).GetVersion as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<JNINativeInterface_>())).GetVersion as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -36,7 +36,7 @@ fn bindgen_test_layout_JNINativeInterface_() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const JNINativeInterface_)).__hack as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<JNINativeInterface_>())).__hack as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/libclang-3.8/type_alias_template_specialized.rs b/tests/expectations/tests/libclang-3.8/type_alias_template_specialized.rs
index 387fe7a8..a0d9ade6 100644
--- a/tests/expectations/tests/libclang-3.8/type_alias_template_specialized.rs
+++ b/tests/expectations/tests/libclang-3.8/type_alias_template_specialized.rs
@@ -22,7 +22,7 @@ fn bindgen_test_layout_Rooted() {
concat!("Alignment of ", stringify!(Rooted))
);
assert_eq!(
- unsafe { &(*(0 as *const Rooted)).ptr as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Rooted>())).ptr as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/libclang-3.9/call-conv-field.rs b/tests/expectations/tests/libclang-3.9/call-conv-field.rs
index dee43760..c22f5aa6 100644
--- a/tests/expectations/tests/libclang-3.9/call-conv-field.rs
+++ b/tests/expectations/tests/libclang-3.9/call-conv-field.rs
@@ -26,7 +26,7 @@ fn bindgen_test_layout_JNINativeInterface_() {
concat!("Alignment of ", stringify!(JNINativeInterface_))
);
assert_eq!(
- unsafe { &(*(0 as *const JNINativeInterface_)).GetVersion as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<JNINativeInterface_>())).GetVersion as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -36,7 +36,7 @@ fn bindgen_test_layout_JNINativeInterface_() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const JNINativeInterface_)).__hack as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<JNINativeInterface_>())).__hack as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/libclang-3.9/type_alias_template_specialized.rs b/tests/expectations/tests/libclang-3.9/type_alias_template_specialized.rs
index 387fe7a8..a0d9ade6 100644
--- a/tests/expectations/tests/libclang-3.9/type_alias_template_specialized.rs
+++ b/tests/expectations/tests/libclang-3.9/type_alias_template_specialized.rs
@@ -22,7 +22,7 @@ fn bindgen_test_layout_Rooted() {
concat!("Alignment of ", stringify!(Rooted))
);
assert_eq!(
- unsafe { &(*(0 as *const Rooted)).ptr as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Rooted>())).ptr as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/libclang-4/call-conv-field.rs b/tests/expectations/tests/libclang-4/call-conv-field.rs
index dee43760..c22f5aa6 100644
--- a/tests/expectations/tests/libclang-4/call-conv-field.rs
+++ b/tests/expectations/tests/libclang-4/call-conv-field.rs
@@ -26,7 +26,7 @@ fn bindgen_test_layout_JNINativeInterface_() {
concat!("Alignment of ", stringify!(JNINativeInterface_))
);
assert_eq!(
- unsafe { &(*(0 as *const JNINativeInterface_)).GetVersion as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<JNINativeInterface_>())).GetVersion as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -36,7 +36,7 @@ fn bindgen_test_layout_JNINativeInterface_() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const JNINativeInterface_)).__hack as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<JNINativeInterface_>())).__hack as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/libclang-4/type_alias_template_specialized.rs b/tests/expectations/tests/libclang-4/type_alias_template_specialized.rs
index 85d76b75..a09323a8 100644
--- a/tests/expectations/tests/libclang-4/type_alias_template_specialized.rs
+++ b/tests/expectations/tests/libclang-4/type_alias_template_specialized.rs
@@ -22,7 +22,7 @@ fn bindgen_test_layout_Rooted() {
concat!("Alignment of ", stringify!(Rooted))
);
assert_eq!(
- unsafe { &(*(0 as *const Rooted)).ptr as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Rooted>())).ptr as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/msvc-no-usr.rs b/tests/expectations/tests/msvc-no-usr.rs
index ca079531..94d5a671 100644
--- a/tests/expectations/tests/msvc-no-usr.rs
+++ b/tests/expectations/tests/msvc-no-usr.rs
@@ -22,7 +22,7 @@ fn bindgen_test_layout_A() {
concat!("Alignment of ", stringify!(A))
);
assert_eq!(
- unsafe { &(*(0 as *const A)).foo as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<A>())).foo as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(A), "::", stringify!(foo))
);
diff --git a/tests/expectations/tests/mutable.rs b/tests/expectations/tests/mutable.rs
index 50cfbadc..d60e6cf7 100644
--- a/tests/expectations/tests/mutable.rs
+++ b/tests/expectations/tests/mutable.rs
@@ -23,7 +23,7 @@ fn bindgen_test_layout_C() {
concat!("Alignment of ", stringify!(C))
);
assert_eq!(
- unsafe { &(*(0 as *const C)).m_member as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<C>())).m_member as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -33,7 +33,7 @@ fn bindgen_test_layout_C() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const C)).m_other as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<C>())).m_other as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
@@ -61,7 +61,7 @@ fn bindgen_test_layout_NonCopiable() {
concat!("Alignment of ", stringify!(NonCopiable))
);
assert_eq!(
- unsafe { &(*(0 as *const NonCopiable)).m_member as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<NonCopiable>())).m_member as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -96,7 +96,8 @@ fn bindgen_test_layout_NonCopiableWithNonCopiableMutableMember() {
);
assert_eq!(
unsafe {
- &(*(0 as *const NonCopiableWithNonCopiableMutableMember)).m_member as *const _ as usize
+ &(*(::std::ptr::null::<NonCopiableWithNonCopiableMutableMember>())).m_member as *const _
+ as usize
},
0usize,
concat!(
diff --git a/tests/expectations/tests/namespace.rs b/tests/expectations/tests/namespace.rs
index c57764fb..961ed447 100644
--- a/tests/expectations/tests/namespace.rs
+++ b/tests/expectations/tests/namespace.rs
@@ -46,7 +46,7 @@ pub mod root {
concat!("Alignment of ", stringify!(A))
);
assert_eq!(
- unsafe { &(*(0 as *const A)).b as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<A>())).b as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(A), "::", stringify!(b))
);
diff --git a/tests/expectations/tests/nested.rs b/tests/expectations/tests/nested.rs
index 9e8424d0..4022909c 100644
--- a/tests/expectations/tests/nested.rs
+++ b/tests/expectations/tests/nested.rs
@@ -22,7 +22,7 @@ fn bindgen_test_layout_Calc() {
concat!("Alignment of ", stringify!(Calc))
);
assert_eq!(
- unsafe { &(*(0 as *const Calc)).w as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Calc>())).w as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(Calc), "::", stringify!(w))
);
@@ -69,7 +69,7 @@ fn bindgen_test_layout_Test_Size() {
concat!("Alignment of ", stringify!(Test_Size))
);
assert_eq!(
- unsafe { &(*(0 as *const Test_Size)).mWidth as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Test_Size>())).mWidth as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -79,7 +79,7 @@ fn bindgen_test_layout_Test_Size() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const Test_Size)).mHeight as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Test_Size>())).mHeight as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/nested_within_namespace.rs b/tests/expectations/tests/nested_within_namespace.rs
index 390d9339..868510e8 100644
--- a/tests/expectations/tests/nested_within_namespace.rs
+++ b/tests/expectations/tests/nested_within_namespace.rs
@@ -34,7 +34,7 @@ pub mod root {
concat!("Alignment of ", stringify!(Bar_Baz))
);
assert_eq!(
- unsafe { &(*(0 as *const Bar_Baz)).foo as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Bar_Baz>())).foo as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -57,7 +57,7 @@ pub mod root {
concat!("Alignment of ", stringify!(Bar))
);
assert_eq!(
- unsafe { &(*(0 as *const Bar)).foo as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Bar>())).foo as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(Bar), "::", stringify!(foo))
);
@@ -80,7 +80,7 @@ pub mod root {
concat!("Alignment of ", stringify!(Baz))
);
assert_eq!(
- unsafe { &(*(0 as *const Baz)).baz as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Baz>())).baz as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(Baz), "::", stringify!(baz))
);
diff --git a/tests/expectations/tests/no-comments.rs b/tests/expectations/tests/no-comments.rs
index 2c7144dd..65f69624 100644
--- a/tests/expectations/tests/no-comments.rs
+++ b/tests/expectations/tests/no-comments.rs
@@ -22,7 +22,7 @@ fn bindgen_test_layout_Foo() {
concat!("Alignment of ", stringify!(Foo))
);
assert_eq!(
- unsafe { &(*(0 as *const Foo)).s as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Foo>())).s as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(Foo), "::", stringify!(s))
);
diff --git a/tests/expectations/tests/no-derive-debug.rs b/tests/expectations/tests/no-derive-debug.rs
index 309b79d4..6272d773 100644
--- a/tests/expectations/tests/no-derive-debug.rs
+++ b/tests/expectations/tests/no-derive-debug.rs
@@ -31,12 +31,12 @@ fn bindgen_test_layout_bar() {
concat!("Alignment of ", stringify!(bar))
);
assert_eq!(
- unsafe { &(*(0 as *const bar)).foo as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<bar>())).foo as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(bar), "::", stringify!(foo))
);
assert_eq!(
- unsafe { &(*(0 as *const bar)).baz as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<bar>())).baz as *const _ as usize },
4usize,
concat!("Offset of field: ", stringify!(bar), "::", stringify!(baz))
);
diff --git a/tests/expectations/tests/no-derive-default.rs b/tests/expectations/tests/no-derive-default.rs
index 5e8ca7e6..da5e1001 100644
--- a/tests/expectations/tests/no-derive-default.rs
+++ b/tests/expectations/tests/no-derive-default.rs
@@ -31,12 +31,12 @@ fn bindgen_test_layout_bar() {
concat!("Alignment of ", stringify!(bar))
);
assert_eq!(
- unsafe { &(*(0 as *const bar)).foo as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<bar>())).foo as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(bar), "::", stringify!(foo))
);
assert_eq!(
- unsafe { &(*(0 as *const bar)).baz as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<bar>())).baz as *const _ as usize },
4usize,
concat!("Offset of field: ", stringify!(bar), "::", stringify!(baz))
);
diff --git a/tests/expectations/tests/no-hash-whitelisted.rs b/tests/expectations/tests/no-hash-whitelisted.rs
index 4a6c92c8..fd54300d 100644
--- a/tests/expectations/tests/no-hash-whitelisted.rs
+++ b/tests/expectations/tests/no-hash-whitelisted.rs
@@ -22,7 +22,7 @@ fn bindgen_test_layout_NoHash() {
concat!("Alignment of ", stringify!(NoHash))
);
assert_eq!(
- unsafe { &(*(0 as *const NoHash)).i as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<NoHash>())).i as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(NoHash), "::", stringify!(i))
);
diff --git a/tests/expectations/tests/no-partialeq-whitelisted.rs b/tests/expectations/tests/no-partialeq-whitelisted.rs
index 388686cc..00f7210e 100644
--- a/tests/expectations/tests/no-partialeq-whitelisted.rs
+++ b/tests/expectations/tests/no-partialeq-whitelisted.rs
@@ -22,7 +22,7 @@ fn bindgen_test_layout_NoPartialEq() {
concat!("Alignment of ", stringify!(NoPartialEq))
);
assert_eq!(
- unsafe { &(*(0 as *const NoPartialEq)).i as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<NoPartialEq>())).i as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/no-recursive-whitelisting.rs b/tests/expectations/tests/no-recursive-whitelisting.rs
index a1494ce9..e8fb6944 100644
--- a/tests/expectations/tests/no-recursive-whitelisting.rs
+++ b/tests/expectations/tests/no-recursive-whitelisting.rs
@@ -22,7 +22,7 @@ fn bindgen_test_layout_Foo() {
concat!("Alignment of ", stringify!(Foo))
);
assert_eq!(
- unsafe { &(*(0 as *const Foo)).baz as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Foo>())).baz as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(Foo), "::", stringify!(baz))
);
diff --git a/tests/expectations/tests/no-std.rs b/tests/expectations/tests/no-std.rs
index b8ba74f4..524b307a 100644
--- a/tests/expectations/tests/no-std.rs
+++ b/tests/expectations/tests/no-std.rs
@@ -28,17 +28,17 @@ fn bindgen_test_layout_foo() {
concat!("Alignment of ", stringify!(foo))
);
assert_eq!(
- unsafe { &(*(0 as *const foo)).a as *const _ as usize },
+ unsafe { &(*(::core::ptr::null::<foo>())).a as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(foo), "::", stringify!(a))
);
assert_eq!(
- unsafe { &(*(0 as *const foo)).b as *const _ as usize },
+ unsafe { &(*(::core::ptr::null::<foo>())).b as *const _ as usize },
4usize,
concat!("Offset of field: ", stringify!(foo), "::", stringify!(b))
);
assert_eq!(
- unsafe { &(*(0 as *const foo)).bar as *const _ as usize },
+ unsafe { &(*(::core::ptr::null::<foo>())).bar as *const _ as usize },
8usize,
concat!("Offset of field: ", stringify!(foo), "::", stringify!(bar))
);
diff --git a/tests/expectations/tests/no_copy_whitelisted.rs b/tests/expectations/tests/no_copy_whitelisted.rs
index 2dcb1601..340fc1ec 100644
--- a/tests/expectations/tests/no_copy_whitelisted.rs
+++ b/tests/expectations/tests/no_copy_whitelisted.rs
@@ -22,7 +22,7 @@ fn bindgen_test_layout_NoCopy() {
concat!("Alignment of ", stringify!(NoCopy))
);
assert_eq!(
- unsafe { &(*(0 as *const NoCopy)).i as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<NoCopy>())).i as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(NoCopy), "::", stringify!(i))
);
diff --git a/tests/expectations/tests/non-type-params.rs b/tests/expectations/tests/non-type-params.rs
index c0ee9095..4ba64257 100644
--- a/tests/expectations/tests/non-type-params.rs
+++ b/tests/expectations/tests/non-type-params.rs
@@ -26,7 +26,7 @@ fn bindgen_test_layout_UsesArray() {
concat!("Alignment of ", stringify!(UsesArray))
);
assert_eq!(
- unsafe { &(*(0 as *const UsesArray)).array_char_16 as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<UsesArray>())).array_char_16 as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -36,7 +36,7 @@ fn bindgen_test_layout_UsesArray() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const UsesArray)).array_bool_8 as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<UsesArray>())).array_bool_8 as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
@@ -46,7 +46,7 @@ fn bindgen_test_layout_UsesArray() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const UsesArray)).array_int_4 as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<UsesArray>())).array_int_4 as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/objc_interface_type.rs b/tests/expectations/tests/objc_interface_type.rs
index 7e16ed80..9931f5a9 100644
--- a/tests/expectations/tests/objc_interface_type.rs
+++ b/tests/expectations/tests/objc_interface_type.rs
@@ -28,7 +28,7 @@ fn bindgen_test_layout_FooStruct() {
concat!("Alignment of ", stringify!(FooStruct))
);
assert_eq!(
- unsafe { &(*(0 as *const FooStruct)).foo as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<FooStruct>())).foo as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/opaque-template-inst-member-2.rs b/tests/expectations/tests/opaque-template-inst-member-2.rs
index 0ccf282e..99e507b8 100644
--- a/tests/expectations/tests/opaque-template-inst-member-2.rs
+++ b/tests/expectations/tests/opaque-template-inst-member-2.rs
@@ -32,7 +32,7 @@ fn bindgen_test_layout_ContainsOpaqueTemplate() {
concat!("Alignment of ", stringify!(ContainsOpaqueTemplate))
);
assert_eq!(
- unsafe { &(*(0 as *const ContainsOpaqueTemplate)).mBlah as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<ContainsOpaqueTemplate>())).mBlah as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -42,7 +42,7 @@ fn bindgen_test_layout_ContainsOpaqueTemplate() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const ContainsOpaqueTemplate)).mBaz as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<ContainsOpaqueTemplate>())).mBaz as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
@@ -72,7 +72,7 @@ fn bindgen_test_layout_InheritsOpaqueTemplate() {
concat!("Alignment of ", stringify!(InheritsOpaqueTemplate))
);
assert_eq!(
- unsafe { &(*(0 as *const InheritsOpaqueTemplate)).wow as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<InheritsOpaqueTemplate>())).wow as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/opaque-template-inst-member.rs b/tests/expectations/tests/opaque-template-inst-member.rs
index 26f85657..66531232 100644
--- a/tests/expectations/tests/opaque-template-inst-member.rs
+++ b/tests/expectations/tests/opaque-template-inst-member.rs
@@ -29,7 +29,7 @@ fn bindgen_test_layout_ContainsOpaqueTemplate() {
concat!("Alignment of ", stringify!(ContainsOpaqueTemplate))
);
assert_eq!(
- unsafe { &(*(0 as *const ContainsOpaqueTemplate)).mBlah as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<ContainsOpaqueTemplate>())).mBlah as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -39,7 +39,7 @@ fn bindgen_test_layout_ContainsOpaqueTemplate() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const ContainsOpaqueTemplate)).mBaz as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<ContainsOpaqueTemplate>())).mBaz as *const _ as usize },
404usize,
concat!(
"Offset of field: ",
@@ -79,7 +79,7 @@ fn bindgen_test_layout_InheritsOpaqueTemplate() {
concat!("Alignment of ", stringify!(InheritsOpaqueTemplate))
);
assert_eq!(
- unsafe { &(*(0 as *const InheritsOpaqueTemplate)).wow as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<InheritsOpaqueTemplate>())).wow as *const _ as usize },
408usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/opaque-template-instantiation-namespaced.rs b/tests/expectations/tests/opaque-template-instantiation-namespaced.rs
index d22d74c6..4f5b0cb9 100644
--- a/tests/expectations/tests/opaque-template-instantiation-namespaced.rs
+++ b/tests/expectations/tests/opaque-template-instantiation-namespaced.rs
@@ -40,7 +40,7 @@ pub mod root {
concat!("Alignment of ", stringify!(Foo))
);
assert_eq!(
- unsafe { &(*(0 as *const Foo)).c as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Foo>())).c as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(Foo), "::", stringify!(c))
);
@@ -63,7 +63,7 @@ pub mod root {
concat!("Alignment of ", stringify!(Bar))
);
assert_eq!(
- unsafe { &(*(0 as *const Bar)).i as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Bar>())).i as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(Bar), "::", stringify!(i))
);
@@ -86,7 +86,10 @@ pub mod root {
concat!("Alignment of ", stringify!(ContainsInstantiation))
);
assert_eq!(
- unsafe { &(*(0 as *const ContainsInstantiation)).not_opaque as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<ContainsInstantiation>())).not_opaque as *const _
+ as usize
+ },
0usize,
concat!(
"Offset of field: ",
@@ -120,7 +123,8 @@ pub mod root {
);
assert_eq!(
unsafe {
- &(*(0 as *const ContainsOpaqueInstantiation)).opaque as *const _ as usize
+ &(*(::std::ptr::null::<ContainsOpaqueInstantiation>())).opaque as *const _
+ as usize
},
0usize,
concat!(
diff --git a/tests/expectations/tests/opaque-template-instantiation.rs b/tests/expectations/tests/opaque-template-instantiation.rs
index 8fbe33ae..c3043abf 100644
--- a/tests/expectations/tests/opaque-template-instantiation.rs
+++ b/tests/expectations/tests/opaque-template-instantiation.rs
@@ -33,7 +33,9 @@ fn bindgen_test_layout_ContainsInstantiation() {
concat!("Alignment of ", stringify!(ContainsInstantiation))
);
assert_eq!(
- unsafe { &(*(0 as *const ContainsInstantiation)).not_opaque as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<ContainsInstantiation>())).not_opaque as *const _ as usize
+ },
0usize,
concat!(
"Offset of field: ",
@@ -66,7 +68,9 @@ fn bindgen_test_layout_ContainsOpaqueInstantiation() {
concat!("Alignment of ", stringify!(ContainsOpaqueInstantiation))
);
assert_eq!(
- unsafe { &(*(0 as *const ContainsOpaqueInstantiation)).opaque as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<ContainsOpaqueInstantiation>())).opaque as *const _ as usize
+ },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/opaque_in_struct.rs b/tests/expectations/tests/opaque_in_struct.rs
index e61a7005..59848581 100644
--- a/tests/expectations/tests/opaque_in_struct.rs
+++ b/tests/expectations/tests/opaque_in_struct.rs
@@ -42,7 +42,7 @@ fn bindgen_test_layout_container() {
concat!("Alignment of ", stringify!(container))
);
assert_eq!(
- unsafe { &(*(0 as *const container)).contained as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<container>())).contained as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/opaque_pointer.rs b/tests/expectations/tests/opaque_pointer.rs
index c8bbcea6..736655a4 100644
--- a/tests/expectations/tests/opaque_pointer.rs
+++ b/tests/expectations/tests/opaque_pointer.rs
@@ -50,7 +50,7 @@ fn bindgen_test_layout_WithOpaquePtr() {
concat!("Alignment of ", stringify!(WithOpaquePtr))
);
assert_eq!(
- unsafe { &(*(0 as *const WithOpaquePtr)).whatever as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<WithOpaquePtr>())).whatever as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -60,7 +60,7 @@ fn bindgen_test_layout_WithOpaquePtr() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const WithOpaquePtr)).other as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<WithOpaquePtr>())).other as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
@@ -70,7 +70,7 @@ fn bindgen_test_layout_WithOpaquePtr() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const WithOpaquePtr)).t as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<WithOpaquePtr>())).t as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/private.rs b/tests/expectations/tests/private.rs
index a63a038b..52da1ae4 100644
--- a/tests/expectations/tests/private.rs
+++ b/tests/expectations/tests/private.rs
@@ -24,7 +24,7 @@ fn bindgen_test_layout_HasPrivate() {
concat!("Alignment of ", stringify!(HasPrivate))
);
assert_eq!(
- unsafe { &(*(0 as *const HasPrivate)).mNotPrivate as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<HasPrivate>())).mNotPrivate as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -34,7 +34,7 @@ fn bindgen_test_layout_HasPrivate() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const HasPrivate)).mIsPrivate as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<HasPrivate>())).mIsPrivate as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
@@ -64,7 +64,7 @@ fn bindgen_test_layout_VeryPrivate() {
concat!("Alignment of ", stringify!(VeryPrivate))
);
assert_eq!(
- unsafe { &(*(0 as *const VeryPrivate)).mIsPrivate as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<VeryPrivate>())).mIsPrivate as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -74,7 +74,7 @@ fn bindgen_test_layout_VeryPrivate() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const VeryPrivate)).mIsAlsoPrivate as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<VeryPrivate>())).mIsAlsoPrivate as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
@@ -105,7 +105,7 @@ fn bindgen_test_layout_ContradictPrivate() {
concat!("Alignment of ", stringify!(ContradictPrivate))
);
assert_eq!(
- unsafe { &(*(0 as *const ContradictPrivate)).mNotPrivate as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<ContradictPrivate>())).mNotPrivate as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -115,7 +115,7 @@ fn bindgen_test_layout_ContradictPrivate() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const ContradictPrivate)).mIsPrivate as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<ContradictPrivate>())).mIsPrivate as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/reparented_replacement.rs b/tests/expectations/tests/reparented_replacement.rs
index 6a927c51..38f0cc22 100644
--- a/tests/expectations/tests/reparented_replacement.rs
+++ b/tests/expectations/tests/reparented_replacement.rs
@@ -30,7 +30,7 @@ pub mod root {
concat!("Alignment of ", stringify!(Bar))
);
assert_eq!(
- unsafe { &(*(0 as *const Bar)).bazz as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Bar>())).bazz as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(Bar), "::", stringify!(bazz))
);
diff --git a/tests/expectations/tests/replace_use.rs b/tests/expectations/tests/replace_use.rs
index d9f2e907..c5184b77 100644
--- a/tests/expectations/tests/replace_use.rs
+++ b/tests/expectations/tests/replace_use.rs
@@ -29,7 +29,7 @@ fn bindgen_test_layout_Test() {
concat!("Alignment of ", stringify!(Test))
);
assert_eq!(
- unsafe { &(*(0 as *const Test)).a as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Test>())).a as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(Test), "::", stringify!(a))
);
diff --git a/tests/expectations/tests/same_struct_name_in_different_namespaces.rs b/tests/expectations/tests/same_struct_name_in_different_namespaces.rs
index c7584332..03ac70b8 100644
--- a/tests/expectations/tests/same_struct_name_in_different_namespaces.rs
+++ b/tests/expectations/tests/same_struct_name_in_different_namespaces.rs
@@ -28,7 +28,7 @@ fn bindgen_test_layout_JS_shadow_Zone() {
concat!("Alignment of ", stringify!(JS_shadow_Zone))
);
assert_eq!(
- unsafe { &(*(0 as *const JS_shadow_Zone)).x as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<JS_shadow_Zone>())).x as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -38,7 +38,7 @@ fn bindgen_test_layout_JS_shadow_Zone() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const JS_shadow_Zone)).y as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<JS_shadow_Zone>())).y as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/sentry-defined-multiple-times.rs b/tests/expectations/tests/sentry-defined-multiple-times.rs
index 8fda8e62..887d84bb 100644
--- a/tests/expectations/tests/sentry-defined-multiple-times.rs
+++ b/tests/expectations/tests/sentry-defined-multiple-times.rs
@@ -39,7 +39,9 @@ pub mod root {
concat!("Alignment of ", stringify!(sentry))
);
assert_eq!(
- unsafe { &(*(0 as *const sentry)).i_am_plain_sentry as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<sentry>())).i_am_plain_sentry as *const _ as usize
+ },
0usize,
concat!(
"Offset of field: ",
@@ -86,8 +88,8 @@ pub mod root {
);
assert_eq!(
unsafe {
- &(*(0 as *const NotTemplateWrapper_sentry)).i_am_not_template_wrapper_sentry
- as *const _ as usize
+ &(*(::std::ptr::null::<NotTemplateWrapper_sentry>()))
+ .i_am_not_template_wrapper_sentry as *const _ as usize
},
0usize,
concat!(
@@ -122,7 +124,7 @@ pub mod root {
);
assert_eq!(
unsafe {
- &(*(0 as *const InlineNotTemplateWrapper_sentry))
+ &(*(::std::ptr::null::<InlineNotTemplateWrapper_sentry>()))
.i_am_inline_not_template_wrapper_sentry as *const _
as usize
},
@@ -225,7 +227,7 @@ pub mod root {
);
assert_eq!(
unsafe {
- &(*(0 as *const OuterDoubleWrapper_InnerDoubleWrapper_sentry))
+ &(*(::std::ptr::null::<OuterDoubleWrapper_InnerDoubleWrapper_sentry>()))
.i_am_double_wrapper_sentry as *const _ as usize
},
0usize,
@@ -272,7 +274,9 @@ pub mod root {
);
assert_eq!(
unsafe {
- &(*(0 as *const OuterDoubleInlineWrapper_InnerDoubleInlineWrapper_sentry))
+ &(*(::std::ptr::null::<
+ OuterDoubleInlineWrapper_InnerDoubleInlineWrapper_sentry,
+ >()))
.i_am_double_wrapper_inline_sentry as *const _ as usize
},
0usize,
@@ -345,7 +349,10 @@ pub mod root {
concat!("Alignment of ", stringify!(sentry))
);
assert_eq!(
- unsafe { &(*(0 as *const sentry)).i_am_outside_namespace_sentry as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<sentry>())).i_am_outside_namespace_sentry as *const _
+ as usize
+ },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/size_t_template.rs b/tests/expectations/tests/size_t_template.rs
index 9229723b..8bc54300 100644
--- a/tests/expectations/tests/size_t_template.rs
+++ b/tests/expectations/tests/size_t_template.rs
@@ -22,7 +22,7 @@ fn bindgen_test_layout_C() {
concat!("Alignment of ", stringify!(C))
);
assert_eq!(
- unsafe { &(*(0 as *const C)).arr as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<C>())).arr as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(C), "::", stringify!(arr))
);
diff --git a/tests/expectations/tests/struct_containing_forward_declared_struct.rs b/tests/expectations/tests/struct_containing_forward_declared_struct.rs
index dae498d4..de2efda5 100644
--- a/tests/expectations/tests/struct_containing_forward_declared_struct.rs
+++ b/tests/expectations/tests/struct_containing_forward_declared_struct.rs
@@ -22,7 +22,7 @@ fn bindgen_test_layout_a() {
concat!("Alignment of ", stringify!(a))
);
assert_eq!(
- unsafe { &(*(0 as *const a)).val_a as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<a>())).val_a as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(a), "::", stringify!(val_a))
);
@@ -50,7 +50,7 @@ fn bindgen_test_layout_b() {
concat!("Alignment of ", stringify!(b))
);
assert_eq!(
- unsafe { &(*(0 as *const b)).val_b as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<b>())).val_b as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(b), "::", stringify!(val_b))
);
diff --git a/tests/expectations/tests/struct_typedef.rs b/tests/expectations/tests/struct_typedef.rs
index 958a3c3a..d153aa08 100644
--- a/tests/expectations/tests/struct_typedef.rs
+++ b/tests/expectations/tests/struct_typedef.rs
@@ -22,7 +22,7 @@ fn bindgen_test_layout_typedef_named_struct() {
concat!("Alignment of ", stringify!(typedef_named_struct))
);
assert_eq!(
- unsafe { &(*(0 as *const typedef_named_struct)).has_name as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<typedef_named_struct>())).has_name as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -50,7 +50,7 @@ fn bindgen_test_layout__bindgen_ty_1() {
concat!("Alignment of ", stringify!(_bindgen_ty_1))
);
assert_eq!(
- unsafe { &(*(0 as *const _bindgen_ty_1)).no_name as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<_bindgen_ty_1>())).no_name as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/struct_typedef_ns.rs b/tests/expectations/tests/struct_typedef_ns.rs
index b6ef136e..42dfbb52 100644
--- a/tests/expectations/tests/struct_typedef_ns.rs
+++ b/tests/expectations/tests/struct_typedef_ns.rs
@@ -29,7 +29,7 @@ pub mod root {
concat!("Alignment of ", stringify!(typedef_struct))
);
assert_eq!(
- unsafe { &(*(0 as *const typedef_struct)).foo as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<typedef_struct>())).foo as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -66,7 +66,7 @@ pub mod root {
concat!("Alignment of ", stringify!(_bindgen_ty_1))
);
assert_eq!(
- unsafe { &(*(0 as *const _bindgen_ty_1)).foo as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<_bindgen_ty_1>())).foo as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/struct_with_anon_struct.rs b/tests/expectations/tests/struct_with_anon_struct.rs
index 046aeb69..5dcdaf8c 100644
--- a/tests/expectations/tests/struct_with_anon_struct.rs
+++ b/tests/expectations/tests/struct_with_anon_struct.rs
@@ -28,7 +28,7 @@ fn bindgen_test_layout_foo__bindgen_ty_1() {
concat!("Alignment of ", stringify!(foo__bindgen_ty_1))
);
assert_eq!(
- unsafe { &(*(0 as *const foo__bindgen_ty_1)).a as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<foo__bindgen_ty_1>())).a as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -38,7 +38,7 @@ fn bindgen_test_layout_foo__bindgen_ty_1() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const foo__bindgen_ty_1)).b as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<foo__bindgen_ty_1>())).b as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
@@ -61,7 +61,7 @@ fn bindgen_test_layout_foo() {
concat!("Alignment of ", stringify!(foo))
);
assert_eq!(
- unsafe { &(*(0 as *const foo)).bar as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<foo>())).bar as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(foo), "::", stringify!(bar))
);
diff --git a/tests/expectations/tests/struct_with_anon_struct_array.rs b/tests/expectations/tests/struct_with_anon_struct_array.rs
index 61e14cc3..7af227a1 100644
--- a/tests/expectations/tests/struct_with_anon_struct_array.rs
+++ b/tests/expectations/tests/struct_with_anon_struct_array.rs
@@ -29,7 +29,7 @@ fn bindgen_test_layout_foo__bindgen_ty_1() {
concat!("Alignment of ", stringify!(foo__bindgen_ty_1))
);
assert_eq!(
- unsafe { &(*(0 as *const foo__bindgen_ty_1)).a as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<foo__bindgen_ty_1>())).a as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -39,7 +39,7 @@ fn bindgen_test_layout_foo__bindgen_ty_1() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const foo__bindgen_ty_1)).b as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<foo__bindgen_ty_1>())).b as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
@@ -68,7 +68,7 @@ fn bindgen_test_layout_foo__bindgen_ty_2() {
concat!("Alignment of ", stringify!(foo__bindgen_ty_2))
);
assert_eq!(
- unsafe { &(*(0 as *const foo__bindgen_ty_2)).a as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<foo__bindgen_ty_2>())).a as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -78,7 +78,7 @@ fn bindgen_test_layout_foo__bindgen_ty_2() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const foo__bindgen_ty_2)).b as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<foo__bindgen_ty_2>())).b as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
@@ -101,12 +101,12 @@ fn bindgen_test_layout_foo() {
concat!("Alignment of ", stringify!(foo))
);
assert_eq!(
- unsafe { &(*(0 as *const foo)).bar as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<foo>())).bar as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(foo), "::", stringify!(bar))
);
assert_eq!(
- unsafe { &(*(0 as *const foo)).baz as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<foo>())).baz as *const _ as usize },
16usize,
concat!("Offset of field: ", stringify!(foo), "::", stringify!(baz))
);
diff --git a/tests/expectations/tests/struct_with_anon_struct_pointer.rs b/tests/expectations/tests/struct_with_anon_struct_pointer.rs
index 34bf3416..906ff469 100644
--- a/tests/expectations/tests/struct_with_anon_struct_pointer.rs
+++ b/tests/expectations/tests/struct_with_anon_struct_pointer.rs
@@ -28,7 +28,7 @@ fn bindgen_test_layout_foo__bindgen_ty_1() {
concat!("Alignment of ", stringify!(foo__bindgen_ty_1))
);
assert_eq!(
- unsafe { &(*(0 as *const foo__bindgen_ty_1)).a as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<foo__bindgen_ty_1>())).a as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -38,7 +38,7 @@ fn bindgen_test_layout_foo__bindgen_ty_1() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const foo__bindgen_ty_1)).b as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<foo__bindgen_ty_1>())).b as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
@@ -61,7 +61,7 @@ fn bindgen_test_layout_foo() {
concat!("Alignment of ", stringify!(foo))
);
assert_eq!(
- unsafe { &(*(0 as *const foo)).bar as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<foo>())).bar as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(foo), "::", stringify!(bar))
);
diff --git a/tests/expectations/tests/struct_with_anon_union.rs b/tests/expectations/tests/struct_with_anon_union.rs
index 13acc294..f7ddb358 100644
--- a/tests/expectations/tests/struct_with_anon_union.rs
+++ b/tests/expectations/tests/struct_with_anon_union.rs
@@ -29,7 +29,7 @@ fn bindgen_test_layout_foo__bindgen_ty_1() {
concat!("Alignment of ", stringify!(foo__bindgen_ty_1))
);
assert_eq!(
- unsafe { &(*(0 as *const foo__bindgen_ty_1)).a as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<foo__bindgen_ty_1>())).a as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -39,7 +39,7 @@ fn bindgen_test_layout_foo__bindgen_ty_1() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const foo__bindgen_ty_1)).b as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<foo__bindgen_ty_1>())).b as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -67,7 +67,7 @@ fn bindgen_test_layout_foo() {
concat!("Alignment of ", stringify!(foo))
);
assert_eq!(
- unsafe { &(*(0 as *const foo)).bar as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<foo>())).bar as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(foo), "::", stringify!(bar))
);
diff --git a/tests/expectations/tests/struct_with_anon_union_1_0.rs b/tests/expectations/tests/struct_with_anon_union_1_0.rs
index 0342214b..7e2855c9 100644
--- a/tests/expectations/tests/struct_with_anon_union_1_0.rs
+++ b/tests/expectations/tests/struct_with_anon_union_1_0.rs
@@ -72,7 +72,7 @@ fn bindgen_test_layout_foo__bindgen_ty_1() {
concat!("Alignment of ", stringify!(foo__bindgen_ty_1))
);
assert_eq!(
- unsafe { &(*(0 as *const foo__bindgen_ty_1)).a as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<foo__bindgen_ty_1>())).a as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -82,7 +82,7 @@ fn bindgen_test_layout_foo__bindgen_ty_1() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const foo__bindgen_ty_1)).b as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<foo__bindgen_ty_1>())).b as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -110,7 +110,7 @@ fn bindgen_test_layout_foo() {
concat!("Alignment of ", stringify!(foo))
);
assert_eq!(
- unsafe { &(*(0 as *const foo)).bar as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<foo>())).bar as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(foo), "::", stringify!(bar))
);
diff --git a/tests/expectations/tests/struct_with_anon_unnamed_struct.rs b/tests/expectations/tests/struct_with_anon_unnamed_struct.rs
index e73f01e3..b2baff93 100644
--- a/tests/expectations/tests/struct_with_anon_unnamed_struct.rs
+++ b/tests/expectations/tests/struct_with_anon_unnamed_struct.rs
@@ -28,7 +28,7 @@ fn bindgen_test_layout_foo__bindgen_ty_1() {
concat!("Alignment of ", stringify!(foo__bindgen_ty_1))
);
assert_eq!(
- unsafe { &(*(0 as *const foo__bindgen_ty_1)).a as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<foo__bindgen_ty_1>())).a as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -38,7 +38,7 @@ fn bindgen_test_layout_foo__bindgen_ty_1() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const foo__bindgen_ty_1)).b as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<foo__bindgen_ty_1>())).b as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/struct_with_anon_unnamed_union.rs b/tests/expectations/tests/struct_with_anon_unnamed_union.rs
index 0caf679f..37890019 100644
--- a/tests/expectations/tests/struct_with_anon_unnamed_union.rs
+++ b/tests/expectations/tests/struct_with_anon_unnamed_union.rs
@@ -29,7 +29,7 @@ fn bindgen_test_layout_foo__bindgen_ty_1() {
concat!("Alignment of ", stringify!(foo__bindgen_ty_1))
);
assert_eq!(
- unsafe { &(*(0 as *const foo__bindgen_ty_1)).a as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<foo__bindgen_ty_1>())).a as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -39,7 +39,7 @@ fn bindgen_test_layout_foo__bindgen_ty_1() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const foo__bindgen_ty_1)).b as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<foo__bindgen_ty_1>())).b as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/struct_with_anon_unnamed_union_1_0.rs b/tests/expectations/tests/struct_with_anon_unnamed_union_1_0.rs
index 1809dd7c..c7a73b17 100644
--- a/tests/expectations/tests/struct_with_anon_unnamed_union_1_0.rs
+++ b/tests/expectations/tests/struct_with_anon_unnamed_union_1_0.rs
@@ -72,7 +72,7 @@ fn bindgen_test_layout_foo__bindgen_ty_1() {
concat!("Alignment of ", stringify!(foo__bindgen_ty_1))
);
assert_eq!(
- unsafe { &(*(0 as *const foo__bindgen_ty_1)).a as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<foo__bindgen_ty_1>())).a as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -82,7 +82,7 @@ fn bindgen_test_layout_foo__bindgen_ty_1() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const foo__bindgen_ty_1)).b as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<foo__bindgen_ty_1>())).b as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/struct_with_bitfields.rs b/tests/expectations/tests/struct_with_bitfields.rs
index 5e6298e0..595c37b9 100644
--- a/tests/expectations/tests/struct_with_bitfields.rs
+++ b/tests/expectations/tests/struct_with_bitfields.rs
@@ -24,7 +24,7 @@ fn bindgen_test_layout_bitfield() {
concat!("Alignment of ", stringify!(bitfield))
);
assert_eq!(
- unsafe { &(*(0 as *const bitfield)).e as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<bitfield>())).e as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/struct_with_derive_debug.rs b/tests/expectations/tests/struct_with_derive_debug.rs
index 08b486fc..205e565d 100644
--- a/tests/expectations/tests/struct_with_derive_debug.rs
+++ b/tests/expectations/tests/struct_with_derive_debug.rs
@@ -22,7 +22,7 @@ fn bindgen_test_layout_LittleArray() {
concat!("Alignment of ", stringify!(LittleArray))
);
assert_eq!(
- unsafe { &(*(0 as *const LittleArray)).a as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<LittleArray>())).a as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -50,7 +50,7 @@ fn bindgen_test_layout_BigArray() {
concat!("Alignment of ", stringify!(BigArray))
);
assert_eq!(
- unsafe { &(*(0 as *const BigArray)).a as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<BigArray>())).a as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -83,7 +83,7 @@ fn bindgen_test_layout_WithLittleArray() {
concat!("Alignment of ", stringify!(WithLittleArray))
);
assert_eq!(
- unsafe { &(*(0 as *const WithLittleArray)).a as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<WithLittleArray>())).a as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -111,7 +111,7 @@ fn bindgen_test_layout_WithBigArray() {
concat!("Alignment of ", stringify!(WithBigArray))
);
assert_eq!(
- unsafe { &(*(0 as *const WithBigArray)).a as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<WithBigArray>())).a as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/struct_with_large_array.rs b/tests/expectations/tests/struct_with_large_array.rs
index 8f111926..43388eda 100644
--- a/tests/expectations/tests/struct_with_large_array.rs
+++ b/tests/expectations/tests/struct_with_large_array.rs
@@ -22,7 +22,7 @@ fn bindgen_test_layout_S() {
concat!("Alignment of ", stringify!(S))
);
assert_eq!(
- unsafe { &(*(0 as *const S)).large_array as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<S>())).large_array as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/struct_with_nesting.rs b/tests/expectations/tests/struct_with_nesting.rs
index ceb43695..f56c44a5 100644
--- a/tests/expectations/tests/struct_with_nesting.rs
+++ b/tests/expectations/tests/struct_with_nesting.rs
@@ -37,7 +37,9 @@ fn bindgen_test_layout_foo__bindgen_ty_1__bindgen_ty_1() {
concat!("Alignment of ", stringify!(foo__bindgen_ty_1__bindgen_ty_1))
);
assert_eq!(
- unsafe { &(*(0 as *const foo__bindgen_ty_1__bindgen_ty_1)).c1 as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<foo__bindgen_ty_1__bindgen_ty_1>())).c1 as *const _ as usize
+ },
0usize,
concat!(
"Offset of field: ",
@@ -47,7 +49,9 @@ fn bindgen_test_layout_foo__bindgen_ty_1__bindgen_ty_1() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const foo__bindgen_ty_1__bindgen_ty_1)).c2 as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<foo__bindgen_ty_1__bindgen_ty_1>())).c2 as *const _ as usize
+ },
2usize,
concat!(
"Offset of field: ",
@@ -78,7 +82,9 @@ fn bindgen_test_layout_foo__bindgen_ty_1__bindgen_ty_2() {
concat!("Alignment of ", stringify!(foo__bindgen_ty_1__bindgen_ty_2))
);
assert_eq!(
- unsafe { &(*(0 as *const foo__bindgen_ty_1__bindgen_ty_2)).d1 as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<foo__bindgen_ty_1__bindgen_ty_2>())).d1 as *const _ as usize
+ },
0usize,
concat!(
"Offset of field: ",
@@ -88,7 +94,9 @@ fn bindgen_test_layout_foo__bindgen_ty_1__bindgen_ty_2() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const foo__bindgen_ty_1__bindgen_ty_2)).d2 as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<foo__bindgen_ty_1__bindgen_ty_2>())).d2 as *const _ as usize
+ },
1usize,
concat!(
"Offset of field: ",
@@ -98,7 +106,9 @@ fn bindgen_test_layout_foo__bindgen_ty_1__bindgen_ty_2() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const foo__bindgen_ty_1__bindgen_ty_2)).d3 as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<foo__bindgen_ty_1__bindgen_ty_2>())).d3 as *const _ as usize
+ },
2usize,
concat!(
"Offset of field: ",
@@ -108,7 +118,9 @@ fn bindgen_test_layout_foo__bindgen_ty_1__bindgen_ty_2() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const foo__bindgen_ty_1__bindgen_ty_2)).d4 as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<foo__bindgen_ty_1__bindgen_ty_2>())).d4 as *const _ as usize
+ },
3usize,
concat!(
"Offset of field: ",
@@ -131,7 +143,7 @@ fn bindgen_test_layout_foo__bindgen_ty_1() {
concat!("Alignment of ", stringify!(foo__bindgen_ty_1))
);
assert_eq!(
- unsafe { &(*(0 as *const foo__bindgen_ty_1)).b as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<foo__bindgen_ty_1>())).b as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -159,7 +171,7 @@ fn bindgen_test_layout_foo() {
concat!("Alignment of ", stringify!(foo))
);
assert_eq!(
- unsafe { &(*(0 as *const foo)).a as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<foo>())).a as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(foo), "::", stringify!(a))
);
diff --git a/tests/expectations/tests/struct_with_nesting_1_0.rs b/tests/expectations/tests/struct_with_nesting_1_0.rs
index 3c4e9542..ff65ea03 100644
--- a/tests/expectations/tests/struct_with_nesting_1_0.rs
+++ b/tests/expectations/tests/struct_with_nesting_1_0.rs
@@ -80,7 +80,9 @@ fn bindgen_test_layout_foo__bindgen_ty_1__bindgen_ty_1() {
concat!("Alignment of ", stringify!(foo__bindgen_ty_1__bindgen_ty_1))
);
assert_eq!(
- unsafe { &(*(0 as *const foo__bindgen_ty_1__bindgen_ty_1)).c1 as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<foo__bindgen_ty_1__bindgen_ty_1>())).c1 as *const _ as usize
+ },
0usize,
concat!(
"Offset of field: ",
@@ -90,7 +92,9 @@ fn bindgen_test_layout_foo__bindgen_ty_1__bindgen_ty_1() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const foo__bindgen_ty_1__bindgen_ty_1)).c2 as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<foo__bindgen_ty_1__bindgen_ty_1>())).c2 as *const _ as usize
+ },
2usize,
concat!(
"Offset of field: ",
@@ -126,7 +130,9 @@ fn bindgen_test_layout_foo__bindgen_ty_1__bindgen_ty_2() {
concat!("Alignment of ", stringify!(foo__bindgen_ty_1__bindgen_ty_2))
);
assert_eq!(
- unsafe { &(*(0 as *const foo__bindgen_ty_1__bindgen_ty_2)).d1 as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<foo__bindgen_ty_1__bindgen_ty_2>())).d1 as *const _ as usize
+ },
0usize,
concat!(
"Offset of field: ",
@@ -136,7 +142,9 @@ fn bindgen_test_layout_foo__bindgen_ty_1__bindgen_ty_2() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const foo__bindgen_ty_1__bindgen_ty_2)).d2 as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<foo__bindgen_ty_1__bindgen_ty_2>())).d2 as *const _ as usize
+ },
1usize,
concat!(
"Offset of field: ",
@@ -146,7 +154,9 @@ fn bindgen_test_layout_foo__bindgen_ty_1__bindgen_ty_2() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const foo__bindgen_ty_1__bindgen_ty_2)).d3 as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<foo__bindgen_ty_1__bindgen_ty_2>())).d3 as *const _ as usize
+ },
2usize,
concat!(
"Offset of field: ",
@@ -156,7 +166,9 @@ fn bindgen_test_layout_foo__bindgen_ty_1__bindgen_ty_2() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const foo__bindgen_ty_1__bindgen_ty_2)).d4 as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<foo__bindgen_ty_1__bindgen_ty_2>())).d4 as *const _ as usize
+ },
3usize,
concat!(
"Offset of field: ",
@@ -184,7 +196,7 @@ fn bindgen_test_layout_foo__bindgen_ty_1() {
concat!("Alignment of ", stringify!(foo__bindgen_ty_1))
);
assert_eq!(
- unsafe { &(*(0 as *const foo__bindgen_ty_1)).b as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<foo__bindgen_ty_1>())).b as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -212,7 +224,7 @@ fn bindgen_test_layout_foo() {
concat!("Alignment of ", stringify!(foo))
);
assert_eq!(
- unsafe { &(*(0 as *const foo)).a as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<foo>())).a as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(foo), "::", stringify!(a))
);
diff --git a/tests/expectations/tests/struct_with_packing.rs b/tests/expectations/tests/struct_with_packing.rs
index c4b9e38e..410d8f4a 100644
--- a/tests/expectations/tests/struct_with_packing.rs
+++ b/tests/expectations/tests/struct_with_packing.rs
@@ -23,12 +23,12 @@ fn bindgen_test_layout_a() {
concat!("Alignment of ", stringify!(a))
);
assert_eq!(
- unsafe { &(*(0 as *const a)).b as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<a>())).b as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(a), "::", stringify!(b))
);
assert_eq!(
- unsafe { &(*(0 as *const a)).c as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<a>())).c as *const _ as usize },
1usize,
concat!("Offset of field: ", stringify!(a), "::", stringify!(c))
);
diff --git a/tests/expectations/tests/struct_with_struct.rs b/tests/expectations/tests/struct_with_struct.rs
index 8e606a0c..95d66bf8 100644
--- a/tests/expectations/tests/struct_with_struct.rs
+++ b/tests/expectations/tests/struct_with_struct.rs
@@ -28,7 +28,7 @@ fn bindgen_test_layout_foo__bindgen_ty_1() {
concat!("Alignment of ", stringify!(foo__bindgen_ty_1))
);
assert_eq!(
- unsafe { &(*(0 as *const foo__bindgen_ty_1)).x as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<foo__bindgen_ty_1>())).x as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -38,7 +38,7 @@ fn bindgen_test_layout_foo__bindgen_ty_1() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const foo__bindgen_ty_1)).y as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<foo__bindgen_ty_1>())).y as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
@@ -61,7 +61,7 @@ fn bindgen_test_layout_foo() {
concat!("Alignment of ", stringify!(foo))
);
assert_eq!(
- unsafe { &(*(0 as *const foo)).bar as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<foo>())).bar as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(foo), "::", stringify!(bar))
);
diff --git a/tests/expectations/tests/template.rs b/tests/expectations/tests/template.rs
index 1bc3d38a..70c1cdcb 100644
--- a/tests/expectations/tests/template.rs
+++ b/tests/expectations/tests/template.rs
@@ -69,12 +69,12 @@ fn bindgen_test_layout_C() {
concat!("Alignment of ", stringify!(C))
);
assert_eq!(
- unsafe { &(*(0 as *const C)).mB as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<C>())).mB as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(C), "::", stringify!(mB))
);
assert_eq!(
- unsafe { &(*(0 as *const C)).mBConstPtr as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<C>())).mBConstPtr as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
@@ -84,7 +84,7 @@ fn bindgen_test_layout_C() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const C)).mBConstStructPtr as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<C>())).mBConstStructPtr as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
@@ -94,7 +94,7 @@ fn bindgen_test_layout_C() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const C)).mBConstStructPtrArray as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<C>())).mBConstStructPtrArray as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
@@ -104,7 +104,7 @@ fn bindgen_test_layout_C() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const C)).mBConst as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<C>())).mBConst as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
@@ -114,7 +114,7 @@ fn bindgen_test_layout_C() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const C)).mBVolatile as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<C>())).mBVolatile as *const _ as usize },
36usize,
concat!(
"Offset of field: ",
@@ -124,7 +124,7 @@ fn bindgen_test_layout_C() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const C)).mBConstBool as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<C>())).mBConstBool as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
@@ -134,7 +134,7 @@ fn bindgen_test_layout_C() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const C)).mBConstChar as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<C>())).mBConstChar as *const _ as usize },
42usize,
concat!(
"Offset of field: ",
@@ -144,7 +144,7 @@ fn bindgen_test_layout_C() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const C)).mBArray as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<C>())).mBArray as *const _ as usize },
44usize,
concat!(
"Offset of field: ",
@@ -154,7 +154,7 @@ fn bindgen_test_layout_C() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const C)).mBPtrArray as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<C>())).mBPtrArray as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
@@ -164,7 +164,7 @@ fn bindgen_test_layout_C() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const C)).mBArrayPtr as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<C>())).mBArrayPtr as *const _ as usize },
56usize,
concat!(
"Offset of field: ",
@@ -174,12 +174,12 @@ fn bindgen_test_layout_C() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const C)).mBRef as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<C>())).mBRef as *const _ as usize },
64usize,
concat!("Offset of field: ", stringify!(C), "::", stringify!(mBRef))
);
assert_eq!(
- unsafe { &(*(0 as *const C)).mBConstRef as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<C>())).mBConstRef as *const _ as usize },
72usize,
concat!(
"Offset of field: ",
@@ -189,7 +189,7 @@ fn bindgen_test_layout_C() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const C)).mPtrRef as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<C>())).mPtrRef as *const _ as usize },
80usize,
concat!(
"Offset of field: ",
@@ -199,7 +199,7 @@ fn bindgen_test_layout_C() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const C)).mArrayRef as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<C>())).mArrayRef as *const _ as usize },
88usize,
concat!(
"Offset of field: ",
@@ -268,7 +268,7 @@ fn bindgen_test_layout_RootedContainer() {
concat!("Alignment of ", stringify!(RootedContainer))
);
assert_eq!(
- unsafe { &(*(0 as *const RootedContainer)).root as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<RootedContainer>())).root as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -313,7 +313,7 @@ fn bindgen_test_layout_PODButContainsDtor() {
concat!("Alignment of ", stringify!(PODButContainsDtor))
);
assert_eq!(
- unsafe { &(*(0 as *const PODButContainsDtor)).member as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<PODButContainsDtor>())).member as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -352,7 +352,7 @@ fn bindgen_test_layout_POD() {
concat!("Alignment of ", stringify!(POD))
);
assert_eq!(
- unsafe { &(*(0 as *const POD)).opaque_member as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<POD>())).opaque_member as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/test_multiple_header_calls_in_builder.rs b/tests/expectations/tests/test_multiple_header_calls_in_builder.rs
index c9ef7de6..94504951 100644
--- a/tests/expectations/tests/test_multiple_header_calls_in_builder.rs
+++ b/tests/expectations/tests/test_multiple_header_calls_in_builder.rs
@@ -40,7 +40,7 @@ fn bindgen_test_layout_Test() {
concat!("Alignment of ", stringify!(Test))
);
assert_eq!(
- unsafe { &(*(0 as *const Test)).ch as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Test>())).ch as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -50,7 +50,7 @@ fn bindgen_test_layout_Test() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const Test)).u as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Test>())).u as *const _ as usize },
1usize,
concat!(
"Offset of field: ",
@@ -60,7 +60,7 @@ fn bindgen_test_layout_Test() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const Test)).d as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Test>())).d as *const _ as usize },
2usize,
concat!(
"Offset of field: ",
@@ -70,7 +70,7 @@ fn bindgen_test_layout_Test() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const Test)).cch as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Test>())).cch as *const _ as usize },
3usize,
concat!(
"Offset of field: ",
@@ -80,7 +80,7 @@ fn bindgen_test_layout_Test() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const Test)).cu as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Test>())).cu as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
@@ -90,7 +90,7 @@ fn bindgen_test_layout_Test() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const Test)).cd as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Test>())).cd as *const _ as usize },
5usize,
concat!(
"Offset of field: ",
@@ -100,7 +100,7 @@ fn bindgen_test_layout_Test() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const Test)).Cch as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Test>())).Cch as *const _ as usize },
6usize,
concat!(
"Offset of field: ",
@@ -110,7 +110,7 @@ fn bindgen_test_layout_Test() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const Test)).Cu as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Test>())).Cu as *const _ as usize },
7usize,
concat!(
"Offset of field: ",
@@ -120,7 +120,7 @@ fn bindgen_test_layout_Test() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const Test)).Cd as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Test>())).Cd as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
@@ -130,7 +130,7 @@ fn bindgen_test_layout_Test() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const Test)).Ccch as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Test>())).Ccch as *const _ as usize },
9usize,
concat!(
"Offset of field: ",
@@ -140,7 +140,7 @@ fn bindgen_test_layout_Test() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const Test)).Ccu as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Test>())).Ccu as *const _ as usize },
10usize,
concat!(
"Offset of field: ",
@@ -150,7 +150,7 @@ fn bindgen_test_layout_Test() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const Test)).Ccd as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Test>())).Ccd as *const _ as usize },
11usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/type-referenced-by-whitelisted-function.rs b/tests/expectations/tests/type-referenced-by-whitelisted-function.rs
index 04aac65d..712a8508 100644
--- a/tests/expectations/tests/type-referenced-by-whitelisted-function.rs
+++ b/tests/expectations/tests/type-referenced-by-whitelisted-function.rs
@@ -22,7 +22,7 @@ fn bindgen_test_layout_dl_phdr_info() {
concat!("Alignment of ", stringify!(dl_phdr_info))
);
assert_eq!(
- unsafe { &(*(0 as *const dl_phdr_info)).x as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<dl_phdr_info>())).x as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/typeref.rs b/tests/expectations/tests/typeref.rs
index fd810204..d533b9fb 100644
--- a/tests/expectations/tests/typeref.rs
+++ b/tests/expectations/tests/typeref.rs
@@ -22,7 +22,9 @@ fn bindgen_test_layout_mozilla_FragmentOrURL() {
concat!("Alignment of ", stringify!(mozilla_FragmentOrURL))
);
assert_eq!(
- unsafe { &(*(0 as *const mozilla_FragmentOrURL)).mIsLocalRef as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<mozilla_FragmentOrURL>())).mIsLocalRef as *const _ as usize
+ },
0usize,
concat!(
"Offset of field: ",
@@ -88,7 +90,7 @@ fn bindgen_test_layout_Bar() {
concat!("Alignment of ", stringify!(Bar))
);
assert_eq!(
- unsafe { &(*(0 as *const Bar)).mFoo as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Bar>())).mFoo as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(Bar), "::", stringify!(mFoo))
);
@@ -115,7 +117,7 @@ fn bindgen_test_layout_nsFoo() {
concat!("Alignment of ", stringify!(nsFoo))
);
assert_eq!(
- unsafe { &(*(0 as *const nsFoo)).mBar as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<nsFoo>())).mBar as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/typeref_1_0.rs b/tests/expectations/tests/typeref_1_0.rs
index b2bd25d5..649d41fa 100644
--- a/tests/expectations/tests/typeref_1_0.rs
+++ b/tests/expectations/tests/typeref_1_0.rs
@@ -65,7 +65,9 @@ fn bindgen_test_layout_mozilla_FragmentOrURL() {
concat!("Alignment of ", stringify!(mozilla_FragmentOrURL))
);
assert_eq!(
- unsafe { &(*(0 as *const mozilla_FragmentOrURL)).mIsLocalRef as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<mozilla_FragmentOrURL>())).mIsLocalRef as *const _ as usize
+ },
0usize,
concat!(
"Offset of field: ",
@@ -133,7 +135,7 @@ fn bindgen_test_layout_Bar() {
concat!("Alignment of ", stringify!(Bar))
);
assert_eq!(
- unsafe { &(*(0 as *const Bar)).mFoo as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Bar>())).mFoo as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(Bar), "::", stringify!(mFoo))
);
@@ -166,7 +168,7 @@ fn bindgen_test_layout_nsFoo() {
concat!("Alignment of ", stringify!(nsFoo))
);
assert_eq!(
- unsafe { &(*(0 as *const nsFoo)).mBar as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<nsFoo>())).mBar as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/underscore.rs b/tests/expectations/tests/underscore.rs
index 082bad9a..c4bd288c 100644
--- a/tests/expectations/tests/underscore.rs
+++ b/tests/expectations/tests/underscore.rs
@@ -23,7 +23,7 @@ fn bindgen_test_layout_ptr_t() {
concat!("Alignment of ", stringify!(ptr_t))
);
assert_eq!(
- unsafe { &(*(0 as *const ptr_t)).__ as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<ptr_t>())).__ as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(ptr_t), "::", stringify!(__))
);
diff --git a/tests/expectations/tests/union-in-ns.rs b/tests/expectations/tests/union-in-ns.rs
index 83207187..ee4ac07c 100644
--- a/tests/expectations/tests/union-in-ns.rs
+++ b/tests/expectations/tests/union-in-ns.rs
@@ -27,7 +27,7 @@ pub mod root {
concat!("Alignment of ", stringify!(bar))
);
assert_eq!(
- unsafe { &(*(0 as *const bar)).baz as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<bar>())).baz as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(bar), "::", stringify!(baz))
);
diff --git a/tests/expectations/tests/union-in-ns_1_0.rs b/tests/expectations/tests/union-in-ns_1_0.rs
index 8f5c115d..8635727f 100644
--- a/tests/expectations/tests/union-in-ns_1_0.rs
+++ b/tests/expectations/tests/union-in-ns_1_0.rs
@@ -70,7 +70,7 @@ pub mod root {
concat!("Alignment of ", stringify!(bar))
);
assert_eq!(
- unsafe { &(*(0 as *const bar)).baz as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<bar>())).baz as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(bar), "::", stringify!(baz))
);
diff --git a/tests/expectations/tests/union_dtor.rs b/tests/expectations/tests/union_dtor.rs
index d21ed0da..69359e64 100644
--- a/tests/expectations/tests/union_dtor.rs
+++ b/tests/expectations/tests/union_dtor.rs
@@ -23,7 +23,7 @@ fn bindgen_test_layout_UnionWithDtor() {
concat!("Alignment of ", stringify!(UnionWithDtor))
);
assert_eq!(
- unsafe { &(*(0 as *const UnionWithDtor)).mFoo as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<UnionWithDtor>())).mFoo as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -33,7 +33,7 @@ fn bindgen_test_layout_UnionWithDtor() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const UnionWithDtor)).mBar as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<UnionWithDtor>())).mBar as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/union_dtor_1_0.rs b/tests/expectations/tests/union_dtor_1_0.rs
index 60cd6e2b..77a73427 100644
--- a/tests/expectations/tests/union_dtor_1_0.rs
+++ b/tests/expectations/tests/union_dtor_1_0.rs
@@ -67,7 +67,7 @@ fn bindgen_test_layout_UnionWithDtor() {
concat!("Alignment of ", stringify!(UnionWithDtor))
);
assert_eq!(
- unsafe { &(*(0 as *const UnionWithDtor)).mFoo as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<UnionWithDtor>())).mFoo as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -77,7 +77,7 @@ fn bindgen_test_layout_UnionWithDtor() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const UnionWithDtor)).mBar as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<UnionWithDtor>())).mBar as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/union_fields.rs b/tests/expectations/tests/union_fields.rs
index 83cd47e3..38657d05 100644
--- a/tests/expectations/tests/union_fields.rs
+++ b/tests/expectations/tests/union_fields.rs
@@ -25,7 +25,7 @@ fn bindgen_test_layout_nsStyleUnion() {
concat!("Alignment of ", stringify!(nsStyleUnion))
);
assert_eq!(
- unsafe { &(*(0 as *const nsStyleUnion)).mInt as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<nsStyleUnion>())).mInt as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -35,7 +35,7 @@ fn bindgen_test_layout_nsStyleUnion() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const nsStyleUnion)).mFloat as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<nsStyleUnion>())).mFloat as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -45,7 +45,7 @@ fn bindgen_test_layout_nsStyleUnion() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const nsStyleUnion)).mPointer as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<nsStyleUnion>())).mPointer as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/union_fields_1_0.rs b/tests/expectations/tests/union_fields_1_0.rs
index 1a2a735f..090f1662 100644
--- a/tests/expectations/tests/union_fields_1_0.rs
+++ b/tests/expectations/tests/union_fields_1_0.rs
@@ -68,7 +68,7 @@ fn bindgen_test_layout_nsStyleUnion() {
concat!("Alignment of ", stringify!(nsStyleUnion))
);
assert_eq!(
- unsafe { &(*(0 as *const nsStyleUnion)).mInt as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<nsStyleUnion>())).mInt as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -78,7 +78,7 @@ fn bindgen_test_layout_nsStyleUnion() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const nsStyleUnion)).mFloat as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<nsStyleUnion>())).mFloat as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -88,7 +88,7 @@ fn bindgen_test_layout_nsStyleUnion() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const nsStyleUnion)).mPointer as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<nsStyleUnion>())).mPointer as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/union_with_anon_struct.rs b/tests/expectations/tests/union_with_anon_struct.rs
index e512b6fc..dbffb17c 100644
--- a/tests/expectations/tests/union_with_anon_struct.rs
+++ b/tests/expectations/tests/union_with_anon_struct.rs
@@ -29,7 +29,7 @@ fn bindgen_test_layout_foo__bindgen_ty_1() {
concat!("Alignment of ", stringify!(foo__bindgen_ty_1))
);
assert_eq!(
- unsafe { &(*(0 as *const foo__bindgen_ty_1)).a as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<foo__bindgen_ty_1>())).a as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -39,7 +39,7 @@ fn bindgen_test_layout_foo__bindgen_ty_1() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const foo__bindgen_ty_1)).b as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<foo__bindgen_ty_1>())).b as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
@@ -62,7 +62,7 @@ fn bindgen_test_layout_foo() {
concat!("Alignment of ", stringify!(foo))
);
assert_eq!(
- unsafe { &(*(0 as *const foo)).bar as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<foo>())).bar as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(foo), "::", stringify!(bar))
);
diff --git a/tests/expectations/tests/union_with_anon_struct_1_0.rs b/tests/expectations/tests/union_with_anon_struct_1_0.rs
index be230431..cdd17136 100644
--- a/tests/expectations/tests/union_with_anon_struct_1_0.rs
+++ b/tests/expectations/tests/union_with_anon_struct_1_0.rs
@@ -72,7 +72,7 @@ fn bindgen_test_layout_foo__bindgen_ty_1() {
concat!("Alignment of ", stringify!(foo__bindgen_ty_1))
);
assert_eq!(
- unsafe { &(*(0 as *const foo__bindgen_ty_1)).a as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<foo__bindgen_ty_1>())).a as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -82,7 +82,7 @@ fn bindgen_test_layout_foo__bindgen_ty_1() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const foo__bindgen_ty_1)).b as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<foo__bindgen_ty_1>())).b as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
@@ -110,7 +110,7 @@ fn bindgen_test_layout_foo() {
concat!("Alignment of ", stringify!(foo))
);
assert_eq!(
- unsafe { &(*(0 as *const foo)).bar as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<foo>())).bar as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(foo), "::", stringify!(bar))
);
diff --git a/tests/expectations/tests/union_with_anon_struct_bitfield.rs b/tests/expectations/tests/union_with_anon_struct_bitfield.rs
index 0e12a1ca..829694b2 100644
--- a/tests/expectations/tests/union_with_anon_struct_bitfield.rs
+++ b/tests/expectations/tests/union_with_anon_struct_bitfield.rs
@@ -122,7 +122,7 @@ fn bindgen_test_layout_foo() {
concat!("Alignment of ", stringify!(foo))
);
assert_eq!(
- unsafe { &(*(0 as *const foo)).a as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<foo>())).a as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(foo), "::", stringify!(a))
);
diff --git a/tests/expectations/tests/union_with_anon_struct_bitfield_1_0.rs b/tests/expectations/tests/union_with_anon_struct_bitfield_1_0.rs
index 3a445a37..c08c6b2c 100644
--- a/tests/expectations/tests/union_with_anon_struct_bitfield_1_0.rs
+++ b/tests/expectations/tests/union_with_anon_struct_bitfield_1_0.rs
@@ -170,7 +170,7 @@ fn bindgen_test_layout_foo() {
concat!("Alignment of ", stringify!(foo))
);
assert_eq!(
- unsafe { &(*(0 as *const foo)).a as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<foo>())).a as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(foo), "::", stringify!(a))
);
diff --git a/tests/expectations/tests/union_with_anon_union.rs b/tests/expectations/tests/union_with_anon_union.rs
index 4e35267b..43581d8b 100644
--- a/tests/expectations/tests/union_with_anon_union.rs
+++ b/tests/expectations/tests/union_with_anon_union.rs
@@ -30,7 +30,7 @@ fn bindgen_test_layout_foo__bindgen_ty_1() {
concat!("Alignment of ", stringify!(foo__bindgen_ty_1))
);
assert_eq!(
- unsafe { &(*(0 as *const foo__bindgen_ty_1)).a as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<foo__bindgen_ty_1>())).a as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -40,7 +40,7 @@ fn bindgen_test_layout_foo__bindgen_ty_1() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const foo__bindgen_ty_1)).b as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<foo__bindgen_ty_1>())).b as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -68,7 +68,7 @@ fn bindgen_test_layout_foo() {
concat!("Alignment of ", stringify!(foo))
);
assert_eq!(
- unsafe { &(*(0 as *const foo)).bar as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<foo>())).bar as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(foo), "::", stringify!(bar))
);
diff --git a/tests/expectations/tests/union_with_anon_union_1_0.rs b/tests/expectations/tests/union_with_anon_union_1_0.rs
index 22f254cf..2ccf1739 100644
--- a/tests/expectations/tests/union_with_anon_union_1_0.rs
+++ b/tests/expectations/tests/union_with_anon_union_1_0.rs
@@ -73,7 +73,7 @@ fn bindgen_test_layout_foo__bindgen_ty_1() {
concat!("Alignment of ", stringify!(foo__bindgen_ty_1))
);
assert_eq!(
- unsafe { &(*(0 as *const foo__bindgen_ty_1)).a as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<foo__bindgen_ty_1>())).a as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -83,7 +83,7 @@ fn bindgen_test_layout_foo__bindgen_ty_1() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const foo__bindgen_ty_1)).b as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<foo__bindgen_ty_1>())).b as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -111,7 +111,7 @@ fn bindgen_test_layout_foo() {
concat!("Alignment of ", stringify!(foo))
);
assert_eq!(
- unsafe { &(*(0 as *const foo)).bar as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<foo>())).bar as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(foo), "::", stringify!(bar))
);
diff --git a/tests/expectations/tests/union_with_anon_unnamed_struct.rs b/tests/expectations/tests/union_with_anon_unnamed_struct.rs
index 50d749c2..738aade3 100644
--- a/tests/expectations/tests/union_with_anon_unnamed_struct.rs
+++ b/tests/expectations/tests/union_with_anon_unnamed_struct.rs
@@ -32,7 +32,7 @@ fn bindgen_test_layout_pixel__bindgen_ty_1() {
concat!("Alignment of ", stringify!(pixel__bindgen_ty_1))
);
assert_eq!(
- unsafe { &(*(0 as *const pixel__bindgen_ty_1)).r as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<pixel__bindgen_ty_1>())).r as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -42,7 +42,7 @@ fn bindgen_test_layout_pixel__bindgen_ty_1() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const pixel__bindgen_ty_1)).g as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<pixel__bindgen_ty_1>())).g as *const _ as usize },
1usize,
concat!(
"Offset of field: ",
@@ -52,7 +52,7 @@ fn bindgen_test_layout_pixel__bindgen_ty_1() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const pixel__bindgen_ty_1)).b as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<pixel__bindgen_ty_1>())).b as *const _ as usize },
2usize,
concat!(
"Offset of field: ",
@@ -62,7 +62,7 @@ fn bindgen_test_layout_pixel__bindgen_ty_1() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const pixel__bindgen_ty_1)).a as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<pixel__bindgen_ty_1>())).a as *const _ as usize },
3usize,
concat!(
"Offset of field: ",
@@ -85,7 +85,7 @@ fn bindgen_test_layout_pixel() {
concat!("Alignment of ", stringify!(pixel))
);
assert_eq!(
- unsafe { &(*(0 as *const pixel)).rgba as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<pixel>())).rgba as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/union_with_anon_unnamed_struct_1_0.rs b/tests/expectations/tests/union_with_anon_unnamed_struct_1_0.rs
index c72b9240..cbfd4702 100644
--- a/tests/expectations/tests/union_with_anon_unnamed_struct_1_0.rs
+++ b/tests/expectations/tests/union_with_anon_unnamed_struct_1_0.rs
@@ -75,7 +75,7 @@ fn bindgen_test_layout_pixel__bindgen_ty_1() {
concat!("Alignment of ", stringify!(pixel__bindgen_ty_1))
);
assert_eq!(
- unsafe { &(*(0 as *const pixel__bindgen_ty_1)).r as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<pixel__bindgen_ty_1>())).r as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -85,7 +85,7 @@ fn bindgen_test_layout_pixel__bindgen_ty_1() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const pixel__bindgen_ty_1)).g as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<pixel__bindgen_ty_1>())).g as *const _ as usize },
1usize,
concat!(
"Offset of field: ",
@@ -95,7 +95,7 @@ fn bindgen_test_layout_pixel__bindgen_ty_1() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const pixel__bindgen_ty_1)).b as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<pixel__bindgen_ty_1>())).b as *const _ as usize },
2usize,
concat!(
"Offset of field: ",
@@ -105,7 +105,7 @@ fn bindgen_test_layout_pixel__bindgen_ty_1() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const pixel__bindgen_ty_1)).a as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<pixel__bindgen_ty_1>())).a as *const _ as usize },
3usize,
concat!(
"Offset of field: ",
@@ -133,7 +133,7 @@ fn bindgen_test_layout_pixel() {
concat!("Alignment of ", stringify!(pixel))
);
assert_eq!(
- unsafe { &(*(0 as *const pixel)).rgba as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<pixel>())).rgba as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/union_with_anon_unnamed_union.rs b/tests/expectations/tests/union_with_anon_unnamed_union.rs
index bc53aecc..35c90285 100644
--- a/tests/expectations/tests/union_with_anon_unnamed_union.rs
+++ b/tests/expectations/tests/union_with_anon_unnamed_union.rs
@@ -31,7 +31,7 @@ fn bindgen_test_layout_foo__bindgen_ty_1() {
concat!("Alignment of ", stringify!(foo__bindgen_ty_1))
);
assert_eq!(
- unsafe { &(*(0 as *const foo__bindgen_ty_1)).b as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<foo__bindgen_ty_1>())).b as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -41,7 +41,7 @@ fn bindgen_test_layout_foo__bindgen_ty_1() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const foo__bindgen_ty_1)).c as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<foo__bindgen_ty_1>())).c as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -69,7 +69,7 @@ fn bindgen_test_layout_foo() {
concat!("Alignment of ", stringify!(foo))
);
assert_eq!(
- unsafe { &(*(0 as *const foo)).a as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<foo>())).a as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(foo), "::", stringify!(a))
);
diff --git a/tests/expectations/tests/union_with_anon_unnamed_union_1_0.rs b/tests/expectations/tests/union_with_anon_unnamed_union_1_0.rs
index 07f1054b..45054739 100644
--- a/tests/expectations/tests/union_with_anon_unnamed_union_1_0.rs
+++ b/tests/expectations/tests/union_with_anon_unnamed_union_1_0.rs
@@ -74,7 +74,7 @@ fn bindgen_test_layout_foo__bindgen_ty_1() {
concat!("Alignment of ", stringify!(foo__bindgen_ty_1))
);
assert_eq!(
- unsafe { &(*(0 as *const foo__bindgen_ty_1)).b as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<foo__bindgen_ty_1>())).b as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -84,7 +84,7 @@ fn bindgen_test_layout_foo__bindgen_ty_1() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const foo__bindgen_ty_1)).c as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<foo__bindgen_ty_1>())).c as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -112,7 +112,7 @@ fn bindgen_test_layout_foo() {
concat!("Alignment of ", stringify!(foo))
);
assert_eq!(
- unsafe { &(*(0 as *const foo)).a as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<foo>())).a as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(foo), "::", stringify!(a))
);
diff --git a/tests/expectations/tests/union_with_big_member.rs b/tests/expectations/tests/union_with_big_member.rs
index 77a1c9b4..64ce4d0f 100644
--- a/tests/expectations/tests/union_with_big_member.rs
+++ b/tests/expectations/tests/union_with_big_member.rs
@@ -24,7 +24,7 @@ fn bindgen_test_layout_WithBigArray() {
concat!("Alignment of ", stringify!(WithBigArray))
);
assert_eq!(
- unsafe { &(*(0 as *const WithBigArray)).a as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<WithBigArray>())).a as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -34,7 +34,7 @@ fn bindgen_test_layout_WithBigArray() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const WithBigArray)).b as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<WithBigArray>())).b as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -69,7 +69,7 @@ fn bindgen_test_layout_WithBigArray2() {
concat!("Alignment of ", stringify!(WithBigArray2))
);
assert_eq!(
- unsafe { &(*(0 as *const WithBigArray2)).a as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<WithBigArray2>())).a as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -79,7 +79,7 @@ fn bindgen_test_layout_WithBigArray2() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const WithBigArray2)).b as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<WithBigArray2>())).b as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -114,7 +114,7 @@ fn bindgen_test_layout_WithBigMember() {
concat!("Alignment of ", stringify!(WithBigMember))
);
assert_eq!(
- unsafe { &(*(0 as *const WithBigMember)).a as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<WithBigMember>())).a as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -124,7 +124,7 @@ fn bindgen_test_layout_WithBigMember() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const WithBigMember)).b as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<WithBigMember>())).b as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/union_with_big_member_1_0.rs b/tests/expectations/tests/union_with_big_member_1_0.rs
index 037720b9..c41e64e2 100644
--- a/tests/expectations/tests/union_with_big_member_1_0.rs
+++ b/tests/expectations/tests/union_with_big_member_1_0.rs
@@ -67,7 +67,7 @@ fn bindgen_test_layout_WithBigArray() {
concat!("Alignment of ", stringify!(WithBigArray))
);
assert_eq!(
- unsafe { &(*(0 as *const WithBigArray)).a as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<WithBigArray>())).a as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -77,7 +77,7 @@ fn bindgen_test_layout_WithBigArray() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const WithBigArray)).b as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<WithBigArray>())).b as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -117,7 +117,7 @@ fn bindgen_test_layout_WithBigArray2() {
concat!("Alignment of ", stringify!(WithBigArray2))
);
assert_eq!(
- unsafe { &(*(0 as *const WithBigArray2)).a as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<WithBigArray2>())).a as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -127,7 +127,7 @@ fn bindgen_test_layout_WithBigArray2() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const WithBigArray2)).b as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<WithBigArray2>())).b as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -162,7 +162,7 @@ fn bindgen_test_layout_WithBigMember() {
concat!("Alignment of ", stringify!(WithBigMember))
);
assert_eq!(
- unsafe { &(*(0 as *const WithBigMember)).a as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<WithBigMember>())).a as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -172,7 +172,7 @@ fn bindgen_test_layout_WithBigMember() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const WithBigMember)).b as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<WithBigMember>())).b as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/union_with_nesting.rs b/tests/expectations/tests/union_with_nesting.rs
index 0375996c..631005f8 100644
--- a/tests/expectations/tests/union_with_nesting.rs
+++ b/tests/expectations/tests/union_with_nesting.rs
@@ -37,7 +37,9 @@ fn bindgen_test_layout_foo__bindgen_ty_1__bindgen_ty_1() {
concat!("Alignment of ", stringify!(foo__bindgen_ty_1__bindgen_ty_1))
);
assert_eq!(
- unsafe { &(*(0 as *const foo__bindgen_ty_1__bindgen_ty_1)).b1 as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<foo__bindgen_ty_1__bindgen_ty_1>())).b1 as *const _ as usize
+ },
0usize,
concat!(
"Offset of field: ",
@@ -47,7 +49,9 @@ fn bindgen_test_layout_foo__bindgen_ty_1__bindgen_ty_1() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const foo__bindgen_ty_1__bindgen_ty_1)).b2 as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<foo__bindgen_ty_1__bindgen_ty_1>())).b2 as *const _ as usize
+ },
0usize,
concat!(
"Offset of field: ",
@@ -82,7 +86,9 @@ fn bindgen_test_layout_foo__bindgen_ty_1__bindgen_ty_2() {
concat!("Alignment of ", stringify!(foo__bindgen_ty_1__bindgen_ty_2))
);
assert_eq!(
- unsafe { &(*(0 as *const foo__bindgen_ty_1__bindgen_ty_2)).c1 as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<foo__bindgen_ty_1__bindgen_ty_2>())).c1 as *const _ as usize
+ },
0usize,
concat!(
"Offset of field: ",
@@ -92,7 +98,9 @@ fn bindgen_test_layout_foo__bindgen_ty_1__bindgen_ty_2() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const foo__bindgen_ty_1__bindgen_ty_2)).c2 as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<foo__bindgen_ty_1__bindgen_ty_2>())).c2 as *const _ as usize
+ },
0usize,
concat!(
"Offset of field: ",
@@ -138,7 +146,7 @@ fn bindgen_test_layout_foo() {
concat!("Alignment of ", stringify!(foo))
);
assert_eq!(
- unsafe { &(*(0 as *const foo)).a as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<foo>())).a as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(foo), "::", stringify!(a))
);
diff --git a/tests/expectations/tests/union_with_nesting_1_0.rs b/tests/expectations/tests/union_with_nesting_1_0.rs
index e75a1bc7..9c7956ea 100644
--- a/tests/expectations/tests/union_with_nesting_1_0.rs
+++ b/tests/expectations/tests/union_with_nesting_1_0.rs
@@ -80,7 +80,9 @@ fn bindgen_test_layout_foo__bindgen_ty_1__bindgen_ty_1() {
concat!("Alignment of ", stringify!(foo__bindgen_ty_1__bindgen_ty_1))
);
assert_eq!(
- unsafe { &(*(0 as *const foo__bindgen_ty_1__bindgen_ty_1)).b1 as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<foo__bindgen_ty_1__bindgen_ty_1>())).b1 as *const _ as usize
+ },
0usize,
concat!(
"Offset of field: ",
@@ -90,7 +92,9 @@ fn bindgen_test_layout_foo__bindgen_ty_1__bindgen_ty_1() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const foo__bindgen_ty_1__bindgen_ty_1)).b2 as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<foo__bindgen_ty_1__bindgen_ty_1>())).b2 as *const _ as usize
+ },
0usize,
concat!(
"Offset of field: ",
@@ -125,7 +129,9 @@ fn bindgen_test_layout_foo__bindgen_ty_1__bindgen_ty_2() {
concat!("Alignment of ", stringify!(foo__bindgen_ty_1__bindgen_ty_2))
);
assert_eq!(
- unsafe { &(*(0 as *const foo__bindgen_ty_1__bindgen_ty_2)).c1 as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<foo__bindgen_ty_1__bindgen_ty_2>())).c1 as *const _ as usize
+ },
0usize,
concat!(
"Offset of field: ",
@@ -135,7 +141,9 @@ fn bindgen_test_layout_foo__bindgen_ty_1__bindgen_ty_2() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const foo__bindgen_ty_1__bindgen_ty_2)).c2 as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<foo__bindgen_ty_1__bindgen_ty_2>())).c2 as *const _ as usize
+ },
0usize,
concat!(
"Offset of field: ",
@@ -181,7 +189,7 @@ fn bindgen_test_layout_foo() {
concat!("Alignment of ", stringify!(foo))
);
assert_eq!(
- unsafe { &(*(0 as *const foo)).a as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<foo>())).a as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(foo), "::", stringify!(a))
);
diff --git a/tests/expectations/tests/unknown_attr.rs b/tests/expectations/tests/unknown_attr.rs
index fe5d046d..5040465f 100644
--- a/tests/expectations/tests/unknown_attr.rs
+++ b/tests/expectations/tests/unknown_attr.rs
@@ -20,7 +20,9 @@ fn bindgen_test_layout_max_align_t() {
concat!("Size of: ", stringify!(max_align_t))
);
assert_eq!(
- unsafe { &(*(0 as *const max_align_t)).__clang_max_align_nonce1 as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<max_align_t>())).__clang_max_align_nonce1 as *const _ as usize
+ },
0usize,
concat!(
"Offset of field: ",
@@ -30,7 +32,9 @@ fn bindgen_test_layout_max_align_t() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const max_align_t)).__clang_max_align_nonce2 as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<max_align_t>())).__clang_max_align_nonce2 as *const _ as usize
+ },
16usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/use-core.rs b/tests/expectations/tests/use-core.rs
index ded9b9d4..d4e53ef1 100644
--- a/tests/expectations/tests/use-core.rs
+++ b/tests/expectations/tests/use-core.rs
@@ -25,17 +25,17 @@ fn bindgen_test_layout_foo() {
concat!("Alignment of ", stringify!(foo))
);
assert_eq!(
- unsafe { &(*(0 as *const foo)).a as *const _ as usize },
+ unsafe { &(*(::core::ptr::null::<foo>())).a as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(foo), "::", stringify!(a))
);
assert_eq!(
- unsafe { &(*(0 as *const foo)).b as *const _ as usize },
+ unsafe { &(*(::core::ptr::null::<foo>())).b as *const _ as usize },
4usize,
concat!("Offset of field: ", stringify!(foo), "::", stringify!(b))
);
assert_eq!(
- unsafe { &(*(0 as *const foo)).bar as *const _ as usize },
+ unsafe { &(*(::core::ptr::null::<foo>())).bar as *const _ as usize },
8usize,
concat!("Offset of field: ", stringify!(foo), "::", stringify!(bar))
);
@@ -65,7 +65,7 @@ fn bindgen_test_layout__bindgen_ty_1() {
concat!("Alignment of ", stringify!(_bindgen_ty_1))
);
assert_eq!(
- unsafe { &(*(0 as *const _bindgen_ty_1)).bar as *const _ as usize },
+ unsafe { &(*(::core::ptr::null::<_bindgen_ty_1>())).bar as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -75,7 +75,7 @@ fn bindgen_test_layout__bindgen_ty_1() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const _bindgen_ty_1)).baz as *const _ as usize },
+ unsafe { &(*(::core::ptr::null::<_bindgen_ty_1>())).baz as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/use-core_1_0.rs b/tests/expectations/tests/use-core_1_0.rs
index 5ddf17fe..8a867817 100644
--- a/tests/expectations/tests/use-core_1_0.rs
+++ b/tests/expectations/tests/use-core_1_0.rs
@@ -68,17 +68,17 @@ fn bindgen_test_layout_foo() {
concat!("Alignment of ", stringify!(foo))
);
assert_eq!(
- unsafe { &(*(0 as *const foo)).a as *const _ as usize },
+ unsafe { &(*(::core::ptr::null::<foo>())).a as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(foo), "::", stringify!(a))
);
assert_eq!(
- unsafe { &(*(0 as *const foo)).b as *const _ as usize },
+ unsafe { &(*(::core::ptr::null::<foo>())).b as *const _ as usize },
4usize,
concat!("Offset of field: ", stringify!(foo), "::", stringify!(b))
);
assert_eq!(
- unsafe { &(*(0 as *const foo)).bar as *const _ as usize },
+ unsafe { &(*(::core::ptr::null::<foo>())).bar as *const _ as usize },
8usize,
concat!("Offset of field: ", stringify!(foo), "::", stringify!(bar))
);
@@ -113,7 +113,7 @@ fn bindgen_test_layout__bindgen_ty_1() {
concat!("Alignment of ", stringify!(_bindgen_ty_1))
);
assert_eq!(
- unsafe { &(*(0 as *const _bindgen_ty_1)).bar as *const _ as usize },
+ unsafe { &(*(::core::ptr::null::<_bindgen_ty_1>())).bar as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -123,7 +123,7 @@ fn bindgen_test_layout__bindgen_ty_1() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const _bindgen_ty_1)).baz as *const _ as usize },
+ unsafe { &(*(::core::ptr::null::<_bindgen_ty_1>())).baz as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/var-tracing.rs b/tests/expectations/tests/var-tracing.rs
index ec5e6871..03b23ead 100644
--- a/tests/expectations/tests/var-tracing.rs
+++ b/tests/expectations/tests/var-tracing.rs
@@ -22,7 +22,7 @@ fn bindgen_test_layout_Bar() {
concat!("Alignment of ", stringify!(Bar))
);
assert_eq!(
- unsafe { &(*(0 as *const Bar)).m_baz as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Bar>())).m_baz as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/vector.rs b/tests/expectations/tests/vector.rs
index 4ad9a626..357b9ef4 100644
--- a/tests/expectations/tests/vector.rs
+++ b/tests/expectations/tests/vector.rs
@@ -22,7 +22,7 @@ fn bindgen_test_layout_foo() {
concat!("Alignment of ", stringify!(foo))
);
assert_eq!(
- unsafe { &(*(0 as *const foo)).mMember as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<foo>())).mMember as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/virtual_inheritance.rs b/tests/expectations/tests/virtual_inheritance.rs
index 023d703b..ed5d1151 100644
--- a/tests/expectations/tests/virtual_inheritance.rs
+++ b/tests/expectations/tests/virtual_inheritance.rs
@@ -22,7 +22,7 @@ fn bindgen_test_layout_A() {
concat!("Alignment of ", stringify!(A))
);
assert_eq!(
- unsafe { &(*(0 as *const A)).foo as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<A>())).foo as *const _ as usize },
0usize,
concat!("Offset of field: ", stringify!(A), "::", stringify!(foo))
);
@@ -48,7 +48,7 @@ fn bindgen_test_layout_B() {
concat!("Alignment of ", stringify!(B))
);
assert_eq!(
- unsafe { &(*(0 as *const B)).bar as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<B>())).bar as *const _ as usize },
8usize,
concat!("Offset of field: ", stringify!(B), "::", stringify!(bar))
);
@@ -79,7 +79,7 @@ fn bindgen_test_layout_C() {
concat!("Alignment of ", stringify!(C))
);
assert_eq!(
- unsafe { &(*(0 as *const C)).baz as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<C>())).baz as *const _ as usize },
8usize,
concat!("Offset of field: ", stringify!(C), "::", stringify!(baz))
);
diff --git a/tests/expectations/tests/weird_bitfields.rs b/tests/expectations/tests/weird_bitfields.rs
index ce54e743..2b7d2883 100644
--- a/tests/expectations/tests/weird_bitfields.rs
+++ b/tests/expectations/tests/weird_bitfields.rs
@@ -43,7 +43,7 @@ fn bindgen_test_layout_Weird() {
concat!("Alignment of ", stringify!(Weird))
);
assert_eq!(
- unsafe { &(*(0 as *const Weird)).mStrokeDasharrayLength as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Weird>())).mStrokeDasharrayLength as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -53,7 +53,7 @@ fn bindgen_test_layout_Weird() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const Weird)).mClipRule as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Weird>())).mClipRule as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
@@ -63,7 +63,7 @@ fn bindgen_test_layout_Weird() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const Weird)).mColorInterpolation as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Weird>())).mColorInterpolation as *const _ as usize },
9usize,
concat!(
"Offset of field: ",
@@ -73,7 +73,9 @@ fn bindgen_test_layout_Weird() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const Weird)).mColorInterpolationFilters as *const _ as usize },
+ unsafe {
+ &(*(::std::ptr::null::<Weird>())).mColorInterpolationFilters as *const _ as usize
+ },
10usize,
concat!(
"Offset of field: ",
@@ -83,7 +85,7 @@ fn bindgen_test_layout_Weird() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const Weird)).mFillRule as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Weird>())).mFillRule as *const _ as usize },
11usize,
concat!(
"Offset of field: ",
@@ -93,7 +95,7 @@ fn bindgen_test_layout_Weird() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const Weird)).mImageRendering as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Weird>())).mImageRendering as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
@@ -103,7 +105,7 @@ fn bindgen_test_layout_Weird() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const Weird)).mPaintOrder as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Weird>())).mPaintOrder as *const _ as usize },
13usize,
concat!(
"Offset of field: ",
@@ -113,7 +115,7 @@ fn bindgen_test_layout_Weird() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const Weird)).mShapeRendering as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Weird>())).mShapeRendering as *const _ as usize },
14usize,
concat!(
"Offset of field: ",
@@ -123,7 +125,7 @@ fn bindgen_test_layout_Weird() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const Weird)).mStrokeLinecap as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Weird>())).mStrokeLinecap as *const _ as usize },
15usize,
concat!(
"Offset of field: ",
@@ -133,7 +135,7 @@ fn bindgen_test_layout_Weird() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const Weird)).mStrokeLinejoin as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Weird>())).mStrokeLinejoin as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
@@ -143,7 +145,7 @@ fn bindgen_test_layout_Weird() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const Weird)).mTextAnchor as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Weird>())).mTextAnchor as *const _ as usize },
17usize,
concat!(
"Offset of field: ",
@@ -153,7 +155,7 @@ fn bindgen_test_layout_Weird() {
)
);
assert_eq!(
- unsafe { &(*(0 as *const Weird)).mTextRendering as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Weird>())).mTextRendering as *const _ as usize },
18usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/whitelist-namespaces.rs b/tests/expectations/tests/whitelist-namespaces.rs
index bb514f08..cd179ca7 100644
--- a/tests/expectations/tests/whitelist-namespaces.rs
+++ b/tests/expectations/tests/whitelist-namespaces.rs
@@ -51,7 +51,7 @@ pub mod root {
concat!("Alignment of ", stringify!(Test))
);
assert_eq!(
- unsafe { &(*(0 as *const Test)).helper as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<Test>())).helper as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/whitelisted-item-references-no-hash.rs b/tests/expectations/tests/whitelisted-item-references-no-hash.rs
index 6616957a..bf6eda64 100644
--- a/tests/expectations/tests/whitelisted-item-references-no-hash.rs
+++ b/tests/expectations/tests/whitelisted-item-references-no-hash.rs
@@ -40,7 +40,7 @@ fn bindgen_test_layout_WhitelistMe() {
concat!("Alignment of ", stringify!(WhitelistMe))
);
assert_eq!(
- unsafe { &(*(0 as *const WhitelistMe)).a as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<WhitelistMe>())).a as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/whitelisted-item-references-no-partialeq.rs b/tests/expectations/tests/whitelisted-item-references-no-partialeq.rs
index b85c34de..cfcbf5a4 100644
--- a/tests/expectations/tests/whitelisted-item-references-no-partialeq.rs
+++ b/tests/expectations/tests/whitelisted-item-references-no-partialeq.rs
@@ -40,7 +40,7 @@ fn bindgen_test_layout_WhitelistMe() {
concat!("Alignment of ", stringify!(WhitelistMe))
);
assert_eq!(
- unsafe { &(*(0 as *const WhitelistMe)).a as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<WhitelistMe>())).a as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/whitelisted_item_references_no_copy.rs b/tests/expectations/tests/whitelisted_item_references_no_copy.rs
index 7ce20a29..2e635dc2 100644
--- a/tests/expectations/tests/whitelisted_item_references_no_copy.rs
+++ b/tests/expectations/tests/whitelisted_item_references_no_copy.rs
@@ -40,7 +40,7 @@ fn bindgen_test_layout_WhitelistMe() {
concat!("Alignment of ", stringify!(WhitelistMe))
);
assert_eq!(
- unsafe { &(*(0 as *const WhitelistMe)).a as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<WhitelistMe>())).a as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
diff --git a/tests/expectations/tests/zero-sized-array.rs b/tests/expectations/tests/zero-sized-array.rs
index 0c4620e4..fe78ae86 100644
--- a/tests/expectations/tests/zero-sized-array.rs
+++ b/tests/expectations/tests/zero-sized-array.rs
@@ -60,7 +60,7 @@ fn bindgen_test_layout_ZeroSizedArray() {
concat!("Alignment of ", stringify!(ZeroSizedArray))
);
assert_eq!(
- unsafe { &(*(0 as *const ZeroSizedArray)).arr as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<ZeroSizedArray>())).arr as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -89,7 +89,7 @@ fn bindgen_test_layout_ContainsZeroSizedArray() {
concat!("Alignment of ", stringify!(ContainsZeroSizedArray))
);
assert_eq!(
- unsafe { &(*(0 as *const ContainsZeroSizedArray)).zsa as *const _ as usize },
+ unsafe { &(*(::std::ptr::null::<ContainsZeroSizedArray>())).zsa as *const _ as usize },
0usize,
concat!(
"Offset of field: ",