Skip to content

Instantly share code, notes, and snippets.

@glyn
Created September 7, 2017 09:42
Show Gist options
  • Save glyn/4b0d415fbae36dba3bb5961c188829d4 to your computer and use it in GitHub Desktop.
Save glyn/4b0d415fbae36dba3bb5961c188829d4 to your computer and use it in GitHub Desktop.
Unexpected reformatting when running bindgen tests
➜ rust-bindgen git:(no-syntex) git st
On branch no-syntex
Your branch is up-to-date with 'fitzgen/no-syntex'.
nothing to commit, working tree clean
➜ rust-bindgen git:(no-syntex) rustup run nightly cargo install rustfmt --force
Updating registry `https://github.com/rust-lang/crates.io-index`
Installing rustfmt v0.9.0
Compiling unicode-segmentation v1.2.0
Compiling getopts v0.2.15
Compiling bitflags v0.9.1
Compiling lazy_static v0.2.8
Compiling log v0.3.8
Compiling dtoa v0.4.2
Compiling itoa v0.3.3
Compiling void v1.0.2
Compiling unicode-xid v0.0.4
Compiling libc v0.2.30
Compiling unicode-xid v0.1.0
Compiling diff v0.1.10
Compiling regex-syntax v0.4.1
Compiling rustfmt v0.9.0
Compiling term v0.4.6
Compiling utf8-ranges v1.0.0
Compiling semver-parser v0.7.0
Compiling num-traits v0.1.40
Compiling quote v0.3.15
Compiling unreachable v1.0.0
Compiling synom v0.11.3
Compiling strings v0.1.0
Compiling memchr v1.0.1
Compiling rand v0.3.16
Compiling thread_local v0.3.4
Compiling syn v0.11.11
Compiling aho-corasick v0.6.3
Compiling semver v0.6.0
Compiling rustc_version v0.2.1
Compiling extprim v1.4.0
Compiling regex v0.2.2
Compiling serde_derive_internals v0.15.1
Compiling serde_derive v1.0.12
Compiling env_logger v0.4.3
Compiling serde v1.0.12
Compiling syntex_pos v0.59.1
Compiling serde_json v1.0.3
Compiling toml v0.4.5
Compiling syntex_errors v0.59.1
Compiling syntex_syntax v0.59.1
Finished release [optimized] target(s) in 262.80 secs
Replacing /Users/gnormington/.cargo/bin/cargo-fmt
Replacing /Users/gnormington/.cargo/bin/rustfmt
➜ rust-bindgen git:(no-syntex) cargo test --features testing_only_libclang_4
Compiling bindgen v0.30.0 (file:///Users/gnormington/dev/cf/rust-bindgen)
Finished dev [unoptimized + debuginfo] target(s) in 24.23 secs
Running target/debug/deps/bindgen-ddd33e440c8a8c61
running 17 tests
test codegen::struct_layout::test_align_to ... ok
test codegen::struct_layout::test_bytes_from_bits_pow2 ... ok
test features::test::str_to_target ... ok
test ir::comment::test::picks_up_single_and_multi_line_doc_comments ... ok
test ir::layout::test_layout_for_size ... ok
test ir::comment::test::processes_single_lines_correctly ... ok
test ir::traversal::tests::traversal_predicate_is_object_safe ... ok
test ir::comment::test::processes_multi_lines_correctly ... ok
test ir::ty::is_invalid_type_param_empty_name ... ok
test ir::ty::is_invalid_type_param_invalid_remaing ... ok
test commandline_flag_unit_test_function ... ok
test ir::ty::is_invalid_type_param_invalid_start ... ok
test ir::ty::is_invalid_type_param_valid ... ok
test ir::ty::is_invalid_type_param_valid_underscore_and_numbers ... ok
test ir::ty::is_invalid_type_param_valid_unnamed_kind ... ok
test ir::ty::is_invalid_type_param_unnamed ... ok
test ir::analysis::tests::monotone ... ok
test result: ok. 17 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
Running target/debug/deps/bindgen-590ddd6115b9c9df
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
Running target/debug/deps/stylo_sanity-a2b8d456e971580d
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
Running target/debug/deps/tests-96f1147ac544781d
running 348 tests
test dump_preprocessed_input ... ok
test header_381_decltype_alias_hpp ... ok
test header_annotation_hide_hpp ... ok
test header_anon_enum_trait_hpp ... ok
test header_anon_enum_hpp ... ok
test header_16_byte_alignment_1_0_h ... ok
test header_accessors_hpp ... ok
test header_anon_enum_whitelist_h ... ok
test header_anon_struct_in_union_1_0_h ... ok
test header_anon_struct_in_union_h ... FAILED
test header_anonymous_template_types_hpp ... ok
test header_16_byte_alignment_h ... FAILED
test header_anon_union_1_0_hpp ... ok
test header_anon_union_hpp ... FAILED
test header_arg_keyword_hpp ... FAILED
test header_auto_hpp ... FAILED
test header_bad_namespace_parenthood_inheritance_hpp ... ok
test header_base_to_derived_hpp ... ok
test header_bitfield_align_2_h ... ok
test header_bitfield_enum_basic_hpp ... ok
test header_bitfield_large_hpp ... ok
test header_call_conv_field_h ... ok
test header_bitfield_align_h ... ok
test header_bitfield_method_mangling_h ... ok
test header_builtin_template_hpp ... ok
test header_canonical_path_without_namespacing_hpp ... FAILED
test header_c_empty_layout_h ... ok
test header_blocks_h ... ok
test header_bitfield_method_same_name_hpp ... FAILED
test header_char_h ... ok
test header_class_no_members_hpp ... ok
test header_class_static_const_hpp ... ok
test header_class_static_hpp ... FAILED
test header_class_use_as_hpp ... ok
test header_class_1_0_hpp ... FAILED
test header_class_nested_hpp ... FAILED
test header_class_hpp ... FAILED
test header_class_with_dtor_hpp ... ok
test header_complex_global_h ... FAILED
test header_class_with_inner_struct_1_0_hpp ... ok
test header_comment_indent_hpp ... ok
test header_class_with_typedef_hpp ... FAILED
test header_class_with_inner_struct_hpp ... FAILED
test header_complex_h ... ok
test header_const_array_fn_arg_h ... ok
test header_const_bool_hpp ... ok
test header_const_enum_unnamed_hpp ... ok
test header_const_ptr_hpp ... ok
test header_const_resolved_ty_h ... ok
test header_const_tparam_hpp ... ok
test header_constant_evaluate_h ... ok
test header_constant_non_specialized_tp_hpp ... ok
test header_constify_all_enums_h ... ok
test header_constify_enum_h ... ok
test header_constify_module_enums_basic_h ... ok
test header_constify_module_enums_namespace_hpp ... ok
test header_constify_module_enums_simple_alias_hpp ... ok
test header_constify_module_enums_shadow_name_h ... ok
test header_constify_module_enums_simple_nonamespace_hpp ... ok
test header_constructor_tp_hpp ... FAILED
test header_convert_cpp_comment_to_rust_hpp ... ok
test header_constructors_hpp ... FAILED
test header_constify_module_enums_types_hpp ... FAILED
test header_cpp_empty_layout_hpp ... ok
test header_convert_floats_h ... ok
test header_crtp_hpp ... FAILED
test header_dash_language_h ... ok
test header_decl_ptr_to_array_h ... FAILED
test header_decl_extern_int_twice_h ... FAILED
test header_default_template_parameter_hpp ... FAILED
test header_derive_debug_bitfield_hpp ... ok
test header_derive_debug_function_pointer_hpp ... ok
test header_derive_debug_generic_hpp ... ok
test header_derive_debug_opaque_hpp ... ok
test header_derive_debug_opaque_template_instantiation_hpp ... ok
test header_derive_hash_blacklisting_hpp ... ok
test header_derive_fn_ptr_h ... ok
test header_derive_hash_struct_with_anon_struct_float_h ... ok
test header_derive_hash_struct_with_float_array_h ... ok
test header_derive_hash_template_def_float_hpp ... ok
test header_derive_hash_struct_with_pointer_h ... ok
test header_disable_namespacing_hpp ... ok
test header_derive_hash_template_inst_float_hpp ... ok
test header_duplicated_constants_in_ns_hpp ... ok
test header_duplicated_namespaces_definitions_hpp ... ok
test header_duplicated_namespaces_hpp ... ok
test header_empty_template_param_name_hpp ... ok
test header_elaborated_hpp ... FAILED
test header_enum_alias_hpp ... ok
test header_enum_dupe_h ... ok
test header_enum_and_vtable_mangling_hpp ... FAILED
test header_enum_explicit_type_hpp ... ok
test header_enum_h ... ok
test header_enum_negative_h ... ok
test header_enum_in_template_with_typedef_hpp ... ok
test header_eval_variadic_template_parameter_hpp ... ok
test header_enum_packed_h ... ok
test header_extern_hpp ... ok
test header_float128_hpp ... ok
test header_forward_declaration_autoptr_hpp ... ok
test header_forward_declared_complex_types_1_0_hpp ... FAILED
test header_forward_declared_complex_types_hpp ... FAILED
test header_forward_enum_decl_hpp ... ok
test header_forward_declared_struct_h ... ok
test header_forward_inherit_struct_hpp ... ok
test header_forward_inherit_struct_with_fields_hpp ... ok
test header_func_proto_h ... ok
test header_func_ptr_h ... FAILED
test header_func_ptr_in_struct_h ... ok
test header_func_with_func_ptr_arg_h ... ok
test header_func_with_array_arg_h ... ok
test header_gen_constructors_hpp ... FAILED
test header_gen_constructors_neg_hpp ... ok
test header_gen_destructors_hpp ... FAILED
test header_gen_destructors_neg_hpp ... ok
test header_generate_inline_hpp ... FAILED
test header_inherit_named_hpp ... ok
test header_infinite_macro_h ... ok
test header_in_class_typedef_hpp ... ok
test header_inherit_namespaced_hpp ... ok
test header_inline_function_h ... ok
test header_inherit_typedef_hpp ... ok
test header_inline_namespace_conservative_hpp ... ok
test header_inline_namespace_hpp ... ok
test header_inline_namespace_no_ns_enabled_hpp ... ok
test header_inline_namespace_whitelist_hpp ... ok
test header_inner_const_hpp ... FAILED
test header_inner_template_self_hpp ... ok
test header_int128_t_h ... ok
test header_issue_311_hpp ... ok
test header_issue_315_hpp ... ok
test header_issue_358_hpp ... ok
test header_issue_372_hpp ... ok
test header_issue_446_hpp ... ok
test header_issue_410_hpp ... FAILED
test header_issue_447_hpp ... FAILED
test header_issue_493_1_0_hpp ... ok
test header_issue_544_stylo_creduce_2_hpp ... ok
test header_issue_544_stylo_creduce_hpp ... ok
test header_issue_493_hpp ... FAILED
test header_issue_574_assertion_failure_in_codegen_hpp ... FAILED
test header_issue_569_non_type_template_params_causing_layout_test_failures_hpp ... ok
test header_issue_573_layout_test_failures_hpp ... ok
test header_issue_639_typedef_anon_field_hpp ... ok
test header_issue_638_stylo_cannot_find_t_in_this_scope_hpp ... ok
test header_issue_584_stylo_template_analysis_panic_hpp ... FAILED
test header_issue_643_inner_struct_h ... ok
test header_issue_654_struct_fn_collision_h ... ok
test header_issue_645_cannot_find_type_t_in_this_scope_hpp ... ok
test header_issue_648_derive_debug_with_padding_h ... ok
test header_issue_662_cannot_find_t_in_this_scope_hpp ... ok
test header_issue_662_part_2_hpp ... ok
test header_issue_674_2_hpp ... ok
test header_issue_674_1_hpp ... ok
test header_issue_677_nested_ns_specifier_hpp ... ok
test header_issue_674_3_hpp ... ok
test header_issue_691_template_parameter_virtual_hpp ... ok
test header_issue_739_pointer_wide_bitfield_h ... ok
test header_issue_769_bad_instantiation_test_hpp ... FAILED
test header_issue_807_opaque_types_methods_being_generated_hpp ... FAILED
test header_issue_801_opaque_sloppiness_hpp ... FAILED
test header_issue_833_2_hpp ... ok
test header_issue_833_1_hpp ... ok
test header_issue_826_generating_methods_when_asked_not_to_hpp ... ok
test header_issue_820_unused_template_param_in_alias_hpp ... ok
test header_issue_833_hpp ... ok
test header_issue_834_hpp ... ok
test header_issue_848_replacement_system_include_hpp ... ok
test header_issue_888_enum_var_decl_jump_hpp ... FAILED
test header_layout_align_h ... ok
test header_jsval_layout_opaque_1_0_hpp ... ok
test header_layout_arp_h ... ok
test header_layout_array_h ... ok
test header_keywords_h ... FAILED
test header_jsval_layout_opaque_hpp ... FAILED
test header_layout_cmdline_token_h ... ok
test header_layout_array_too_long_h ... ok
test header_layout_h ... ok
test header_layout_kni_mbuf_h ... ok
test header_layout_large_align_field_h ... ok
test header_layout_eth_conf_1_0_h ... ok
test header_layout_eth_conf_h ... FAILED
test header_macro_const_h ... ok
test header_layout_mbuf_1_0_h ... ok
test header_macro_expr_basic_h ... ok
test header_macro_expr_uncommon_token_h ... ok
test header_macro_redef_h ... ok
test header_maddness_is_avoidable_hpp ... ok
test header_mangling_ios_h ... ok
test header_mangling_linux32_hpp ... FAILED
test header_mangling_linux64_hpp ... FAILED
test header_mangling_macos_hpp ... FAILED
test header_mangling_win32_hpp ... FAILED
test header_mangling_win64_hpp ... FAILED
test header_method_mangling_hpp ... FAILED
test header_module_whitelisted_hpp ... ok
test header_msvc_no_usr_hpp ... ok
test header_multiple_inherit_empty_correct_layout_hpp ... ok
test header_mutable_hpp ... ok
test header_nested_vtable_hpp ... FAILED
test header_nested_within_namespace_hpp ... ok
test header_nested_hpp ... ok
test header_no_comments_h ... ok
test header_namespace_hpp ... FAILED
test header_no_copy_hpp ... ok
test header_no_recursive_whitelisting_h ... ok
test header_no_std_h ... ok
test header_non_type_params_hpp ... ok
test header_no_derive_default_h ... ok
test header_no_derive_debug_h ... ok
test header_nsbasehashtable_hpp ... ok
test header_objc_class_h ... FAILED
test header_nsstyleautoarray_hpp ... ok
test header_objc_category_h ... FAILED
test header_objc_class_method_h ... FAILED
test header_objc_interface_h ... FAILED
test header_objc_interface_type_h ... FAILED
test header_objc_method_clash_h ... FAILED
test header_objc_property_fnptr_h ... FAILED
test header_objc_method_h ... FAILED
test header_objc_protocol_h ... FAILED
test header_objc_sel_and_id_h ... FAILED
test header_objc_template_h ... FAILED
test header_opaque_pointer_hpp ... ok
test header_objc_whitelist_h ... FAILED
test header_only_bitfields_hpp ... ok
test header_opaque_in_struct_hpp ... ok
test header_opaque_template_inst_member_2_hpp ... ok
test header_opaque_template_inst_member_hpp ... ok
test header_layout_mbuf_h ... FAILED
test header_opaque_tracing_hpp ... FAILED
test header_opaque_template_instantiation_namespaced_hpp ... ok
test header_opaque_typedef_hpp ... ok
test header_opaque_template_instantiation_hpp ... ok
test header_overflowed_enum_hpp ... ok
test header_overloading_hpp ... FAILED
test header_partial_specialization_and_inheritance_hpp ... FAILED
test header_private_hpp ... ok
test header_prepend_enum_constified_variant_h ... ok
test header_prepend_enum_name_hpp ... ok
test header_ref_argument_array_hpp ... FAILED
test header_public_dtor_hpp ... FAILED
test header_redeclaration_hpp ... ok
test header_reparented_replacement_hpp ... ok
test header_replace_use_hpp ... ok
test header_replace_template_alias_hpp ... ok
test header_resolved_type_def_function_h ... ok
test header_replaces_double_hpp ... ok
test header_same_struct_name_in_different_namespaces_hpp ... ok
test header_short_enums_hpp ... ok
test header_size_t_template_hpp ... ok
test header_struct_containing_forward_declared_struct_h ... ok
test header_struct_typedef_h ... ok
test header_struct_with_anon_struct_h ... ok
test header_struct_with_anon_struct_pointer_h ... ok
test header_struct_typedef_ns_hpp ... ok
test header_struct_with_anon_struct_array_h ... ok
test header_struct_with_anon_union_1_0_h ... ok
test header_struct_with_anon_union_h ... FAILED
test header_struct_with_bitfields_h ... ok
test header_struct_with_anon_unnamed_union_h ... FAILED
test header_struct_with_anon_unnamed_struct_h ... ok
test header_struct_with_anon_unnamed_union_1_0_h ... ok
test header_struct_with_derive_debug_h ... ok
test header_struct_with_large_array_hpp ... ok
test header_struct_with_typedef_template_arg_hpp ... ok
test header_struct_with_packing_h ... ok
test header_struct_with_nesting_h ... FAILED
test header_template_alias_basic_hpp ... ok
test header_struct_with_struct_h ... ok
test header_struct_with_nesting_1_0_h ... ok
test header_template_alias_hpp ... ok
test header_template_fun_ty_hpp ... ok
test header_template_alias_namespace_hpp ... ok
test header_template_param_usage_0_hpp ... ok
test header_template_param_usage_10_hpp ... ok
test header_template_param_usage_11_hpp ... ok
test header_template_hpp ... FAILED
test header_template_param_usage_12_hpp ... ok
test header_template_param_usage_14_hpp ... ok
test header_template_param_usage_13_hpp ... ok
test header_template_param_usage_15_hpp ... ok
test header_template_param_usage_1_hpp ... ok
test header_template_param_usage_2_hpp ... ok
test header_template_param_usage_3_hpp ... ok
test header_template_param_usage_4_hpp ... ok
test header_template_param_usage_5_hpp ... ok
test header_template_param_usage_6_hpp ... ok
test header_template_param_usage_7_hpp ... ok
test header_template_param_usage_8_hpp ... ok
test header_template_param_usage_9_hpp ... ok
test header_template_partial_specification_hpp ... ok
test header_template_typedef_transitive_param_hpp ... ok
test header_template_typedefs_hpp ... ok
test header_template_with_var_hpp ... ok
test header_templateref_opaque_hpp ... ok
test header_type_alias_empty_hpp ... ok
test header_type_alias_partial_template_especialization_hpp ... ok
test header_type_alias_template_specialized_hpp ... FAILED
test header_typedefd_array_as_function_arg_h ... ok
test header_type_referenced_by_whitelisted_function_h ... ok
test header_union_dtor_1_0_hpp ... FAILED
test header_typeref_1_0_hpp ... ok
test header_typeref_hpp ... FAILED
test header_union_dtor_hpp ... FAILED
test header_union_fields_1_0_hpp ... ok
test header_bitfield_32bit_overflow_h has been running for over 60 seconds
test header_union_fields_hpp ... FAILED
test header_union_in_ns_1_0_hpp ... ok
test header_union_in_ns_hpp ... FAILED
test header_union_with_anon_struct_1_0_h ... ok
test header_union_template_1_0_hpp ... ok
test header_union_template_hpp ... FAILED
test header_union_with_anon_struct_bitfield_1_0_h ... ok
test header_union_with_anon_struct_h ... FAILED
test header_union_with_anon_struct_bitfield_h ... FAILED
test header_union_with_anon_union_1_0_h ... ok
test header_union_with_anon_union_h ... FAILED
test header_union_with_anon_unnamed_struct_1_0_h ... ok
test header_union_with_anon_unnamed_struct_h ... FAILED
test header_union_with_anon_unnamed_union_1_0_h ... ok
test header_union_with_big_member_1_0_h ... ok
test header_union_with_anon_unnamed_union_h ... FAILED
test header_union_with_big_member_h ... FAILED
test header_unknown_attr_h ... ok
test header_union_with_nesting_1_0_h ... ok
test header_union_with_nesting_h ... FAILED
test header_use_core_1_0_h ... FAILED
test header_using_hpp ... ok
test header_variadic_method_hpp ... FAILED
test header_use_core_h ... FAILED
test header_var_tracing_hpp ... FAILED
test header_variadic_template_function_hpp ... ok
test header_vector_hpp ... ok
test header_virtual_dtor_hpp ... FAILED
test header_what_is_going_on_hpp ... ok
test header_vtable_recursive_sig_hpp ... FAILED
test header_virtual_overloaded_hpp ... FAILED
test header_virtual_inheritance_hpp ... ok
test header_weird_bitfields_hpp ... ok
Checking for #include directives of system headers...
Found none; OK!
test no_system_header_includes ... ok
test header_whitelist_basic_hpp ... ok
test header_whitelist_fix_hpp ... ok
test header_whitelist_vars_h ... ok
test header_whitelist_namespaces_hpp ... ok
test header_whitelist_namespaces_basic_hpp ... ok
test test_header_contents ... ok
test test_multiple_header_calls_in_builder ... FAILED
// tests seem to hang here!
^C
➜ rust-bindgen git:(no-syntex) ✗ git st
On branch no-syntex
Your branch is up-to-date with 'fitzgen/no-syntex'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: tests/expectations/tests/16-byte-alignment.rs
modified: tests/expectations/tests/anon_struct_in_union.rs
modified: tests/expectations/tests/anon_union.rs
modified: tests/expectations/tests/arg_keyword.rs
modified: tests/expectations/tests/bitfield-method-same-name.rs
modified: tests/expectations/tests/canonical_path_without_namespacing.rs
modified: tests/expectations/tests/class.rs
modified: tests/expectations/tests/class_1_0.rs
modified: tests/expectations/tests/class_nested.rs
modified: tests/expectations/tests/class_static.rs
modified: tests/expectations/tests/class_with_inner_struct.rs
modified: tests/expectations/tests/class_with_typedef.rs
modified: tests/expectations/tests/complex_global.rs
modified: tests/expectations/tests/constify-module-enums-types.rs
modified: tests/expectations/tests/constructor-tp.rs
modified: tests/expectations/tests/constructors.rs
modified: tests/expectations/tests/crtp.rs
modified: tests/expectations/tests/decl_extern_int_twice.rs
modified: tests/expectations/tests/decl_ptr_to_array.rs
modified: tests/expectations/tests/default-template-parameter.rs
modified: tests/expectations/tests/elaborated.rs
modified: tests/expectations/tests/enum_and_vtable_mangling.rs
modified: tests/expectations/tests/forward_declared_complex_types.rs
modified: tests/expectations/tests/forward_declared_complex_types_1_0.rs
modified: tests/expectations/tests/func_ptr.rs
modified: tests/expectations/tests/gen-constructors.rs
modified: tests/expectations/tests/gen-destructors.rs
modified: tests/expectations/tests/generate-inline.rs
modified: tests/expectations/tests/inner_const.rs
modified: tests/expectations/tests/issue-410.rs
modified: tests/expectations/tests/issue-447.rs
modified: tests/expectations/tests/issue-493.rs
modified: tests/expectations/tests/issue-574-assertion-failure-in-codegen.rs
modified: tests/expectations/tests/issue-584-stylo-template-analysis-panic.rs
modified: tests/expectations/tests/issue-801-opaque-sloppiness.rs
modified: tests/expectations/tests/issue-807-opaque-types-methods-being-generated.rs
modified: tests/expectations/tests/issue-888-enum-var-decl-jump.rs
modified: tests/expectations/tests/jsval_layout_opaque.rs
modified: tests/expectations/tests/keywords.rs
modified: tests/expectations/tests/layout_eth_conf.rs
modified: tests/expectations/tests/layout_mbuf.rs
modified: tests/expectations/tests/libclang-4/auto.rs
modified: tests/expectations/tests/libclang-4/issue-769-bad-instantiation-test.rs
modified: tests/expectations/tests/libclang-4/objc_template.rs
modified: tests/expectations/tests/libclang-4/partial-specialization-and-inheritance.rs
modified: tests/expectations/tests/libclang-4/type_alias_template_specialized.rs
modified: tests/expectations/tests/mangling-linux32.rs
modified: tests/expectations/tests/mangling-linux64.rs
modified: tests/expectations/tests/mangling-macos.rs
modified: tests/expectations/tests/mangling-win32.rs
modified: tests/expectations/tests/mangling-win64.rs
modified: tests/expectations/tests/method-mangling.rs
modified: tests/expectations/tests/namespace.rs
modified: tests/expectations/tests/nested_vtable.rs
modified: tests/expectations/tests/objc_category.rs
modified: tests/expectations/tests/objc_class.rs
modified: tests/expectations/tests/objc_class_method.rs
modified: tests/expectations/tests/objc_interface.rs
modified: tests/expectations/tests/objc_interface_type.rs
modified: tests/expectations/tests/objc_method.rs
modified: tests/expectations/tests/objc_method_clash.rs
modified: tests/expectations/tests/objc_property_fnptr.rs
modified: tests/expectations/tests/objc_protocol.rs
modified: tests/expectations/tests/objc_sel_and_id.rs
modified: tests/expectations/tests/objc_whitelist.rs
modified: tests/expectations/tests/opaque-tracing.rs
modified: tests/expectations/tests/overloading.rs
modified: tests/expectations/tests/public-dtor.rs
modified: tests/expectations/tests/ref_argument_array.rs
modified: tests/expectations/tests/struct_with_anon_union.rs
modified: tests/expectations/tests/struct_with_anon_unnamed_union.rs
modified: tests/expectations/tests/struct_with_nesting.rs
modified: tests/expectations/tests/template.rs
modified: tests/expectations/tests/typeref.rs
modified: tests/expectations/tests/union-in-ns.rs
modified: tests/expectations/tests/union_dtor.rs
modified: tests/expectations/tests/union_dtor_1_0.rs
modified: tests/expectations/tests/union_fields.rs
modified: tests/expectations/tests/union_template.rs
modified: tests/expectations/tests/union_with_anon_struct.rs
modified: tests/expectations/tests/union_with_anon_struct_bitfield.rs
modified: tests/expectations/tests/union_with_anon_union.rs
modified: tests/expectations/tests/union_with_anon_unnamed_struct.rs
modified: tests/expectations/tests/union_with_anon_unnamed_union.rs
modified: tests/expectations/tests/union_with_big_member.rs
modified: tests/expectations/tests/union_with_nesting.rs
modified: tests/expectations/tests/use-core.rs
modified: tests/expectations/tests/use-core_1_0.rs
modified: tests/expectations/tests/var-tracing.rs
modified: tests/expectations/tests/variadic-method.rs
modified: tests/expectations/tests/virtual_dtor.rs
modified: tests/expectations/tests/virtual_overloaded.rs
modified: tests/expectations/tests/vtable_recursive_sig.rs
no changes added to commit (use "git add" and/or "git commit -a")
➜ rust-bindgen git:(no-syntex) ✗ git --no-pager diff --no-color tests/expectations/tests/16-byte-alignment.rs
diff --git a/tests/expectations/tests/16-byte-alignment.rs b/tests/expectations/tests/16-byte-alignment.rs
index 8610365..cb2d789 100644
--- a/tests/expectations/tests/16-byte-alignment.rs
+++ b/tests/expectations/tests/16-byte-alignment.rs
@@ -12,13 +12,7 @@ pub struct rte_ipv4_tuple {
pub __bindgen_anon_1: rte_ipv4_tuple__bindgen_ty_1,
}
#[repr(C)]
-#[derive(Copy)]
-pub union rte_ipv4_tuple__bindgen_ty_1 {
- pub __bindgen_anon_1: rte_ipv4_tuple__bindgen_ty_1__bindgen_ty_1,
- pub sctp_tag: u32,
- _bindgen_union_align: u32,
-}
-#[repr(C)]
+#[derive(Copy)]pub union rte_ipv4_tuple__bindgen_ty_1 { pub __bindgen_anon_1 : rte_ipv4_tuple__bindgen_ty_1__bindgen_ty_1 , pub sctp_tag : u32 , _bindgen_union_align : u32 , }#[repr(C)]
#[derive(Debug, Default, Copy, Hash, PartialEq, Eq)]
pub struct rte_ipv4_tuple__bindgen_ty_1__bindgen_ty_1 {
pub dport: u16,
@@ -26,76 +20,127 @@ pub struct rte_ipv4_tuple__bindgen_ty_1__bindgen_ty_1 {
}
#[test]
fn bindgen_test_layout_rte_ipv4_tuple__bindgen_ty_1__bindgen_ty_1() {
- assert_eq!(::std::mem::size_of::<rte_ipv4_tuple__bindgen_ty_1__bindgen_ty_1>()
- , 4usize , concat ! (
- "Size of: " , stringify ! (
- rte_ipv4_tuple__bindgen_ty_1__bindgen_ty_1 ) ));
- assert_eq! (::std::mem::align_of::<rte_ipv4_tuple__bindgen_ty_1__bindgen_ty_1>()
- , 2usize , concat ! (
- "Alignment of " , stringify ! (
- 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 } , 0usize , concat ! (
- "Alignment of field: " , stringify ! (
- rte_ipv4_tuple__bindgen_ty_1__bindgen_ty_1 ) , "::" ,
- stringify ! ( dport ) ));
- assert_eq! (unsafe {
- & (
- * ( 0 as * const rte_ipv4_tuple__bindgen_ty_1__bindgen_ty_1 )
- ) . sport as * const _ as usize } , 2usize , concat ! (
- "Alignment of field: " , stringify ! (
- rte_ipv4_tuple__bindgen_ty_1__bindgen_ty_1 ) , "::" ,
- stringify ! ( sport ) ));
+ assert_eq!(
+ ::std::mem::size_of::<rte_ipv4_tuple__bindgen_ty_1__bindgen_ty_1>(),
+ 4usize,
+ concat!(
+ "Size of: ",
+ stringify!(rte_ipv4_tuple__bindgen_ty_1__bindgen_ty_1)
+ )
+ );
+ assert_eq!(
+ ::std::mem::align_of::<rte_ipv4_tuple__bindgen_ty_1__bindgen_ty_1>(),
+ 2usize,
+ concat!(
+ "Alignment of ",
+ stringify!(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
+ },
+ 0usize,
+ concat!(
+ "Alignment of field: ",
+ stringify!(rte_ipv4_tuple__bindgen_ty_1__bindgen_ty_1),
+ "::",
+ stringify!(dport)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(0 as *const rte_ipv4_tuple__bindgen_ty_1__bindgen_ty_1)).sport as *const _ as usize
+ },
+ 2usize,
+ concat!(
+ "Alignment of field: ",
+ stringify!(rte_ipv4_tuple__bindgen_ty_1__bindgen_ty_1),
+ "::",
+ stringify!(sport)
+ )
+ );
}
impl Clone for rte_ipv4_tuple__bindgen_ty_1__bindgen_ty_1 {
- fn clone(&self) -> Self { *self }
+ fn clone(&self) -> Self {
+ *self
+ }
}
#[test]
fn bindgen_test_layout_rte_ipv4_tuple__bindgen_ty_1() {
- assert_eq!(::std::mem::size_of::<rte_ipv4_tuple__bindgen_ty_1>() , 4usize
- , concat ! (
- "Size of: " , stringify ! ( rte_ipv4_tuple__bindgen_ty_1 ) ));
- assert_eq! (::std::mem::align_of::<rte_ipv4_tuple__bindgen_ty_1>() ,
- 4usize , 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 } , 0usize , concat ! (
- "Alignment of field: " , stringify ! (
- rte_ipv4_tuple__bindgen_ty_1 ) , "::" , stringify ! ( sctp_tag
- ) ));
+ assert_eq!(
+ ::std::mem::size_of::<rte_ipv4_tuple__bindgen_ty_1>(),
+ 4usize,
+ concat!("Size of: ", stringify!(rte_ipv4_tuple__bindgen_ty_1))
+ );
+ assert_eq!(
+ ::std::mem::align_of::<rte_ipv4_tuple__bindgen_ty_1>(),
+ 4usize,
+ 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 },
+ 0usize,
+ concat!(
+ "Alignment of field: ",
+ stringify!(rte_ipv4_tuple__bindgen_ty_1),
+ "::",
+ stringify!(sctp_tag)
+ )
+ );
}
impl Clone for rte_ipv4_tuple__bindgen_ty_1 {
- fn clone(&self) -> Self { *self }
+ fn clone(&self) -> Self {
+ *self
+ }
}
impl Default for rte_ipv4_tuple__bindgen_ty_1 {
- fn default() -> Self { unsafe { ::std::mem::zeroed() } }
+ fn default() -> Self {
+ unsafe { ::std::mem::zeroed() }
+ }
}
#[test]
fn bindgen_test_layout_rte_ipv4_tuple() {
- assert_eq!(::std::mem::size_of::<rte_ipv4_tuple>() , 12usize , concat ! (
- "Size of: " , stringify ! ( rte_ipv4_tuple ) ));
- assert_eq! (::std::mem::align_of::<rte_ipv4_tuple>() , 4usize , concat ! (
- "Alignment of " , stringify ! ( rte_ipv4_tuple ) ));
- assert_eq! (unsafe {
- & ( * ( 0 as * const rte_ipv4_tuple ) ) . src_addr as * const
- _ as usize } , 0usize , concat ! (
- "Alignment of field: " , stringify ! ( rte_ipv4_tuple ) , "::"
- , stringify ! ( src_addr ) ));
- assert_eq! (unsafe {
- & ( * ( 0 as * const rte_ipv4_tuple ) ) . dst_addr as * const
- _ as usize } , 4usize , concat ! (
- "Alignment of field: " , stringify ! ( rte_ipv4_tuple ) , "::"
- , stringify ! ( dst_addr ) ));
+ assert_eq!(
+ ::std::mem::size_of::<rte_ipv4_tuple>(),
+ 12usize,
+ concat!("Size of: ", stringify!(rte_ipv4_tuple))
+ );
+ assert_eq!(
+ ::std::mem::align_of::<rte_ipv4_tuple>(),
+ 4usize,
+ concat!("Alignment of ", stringify!(rte_ipv4_tuple))
+ );
+ assert_eq!(
+ unsafe { &(*(0 as *const rte_ipv4_tuple)).src_addr as *const _ as usize },
+ 0usize,
+ concat!(
+ "Alignment of field: ",
+ stringify!(rte_ipv4_tuple),
+ "::",
+ stringify!(src_addr)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(0 as *const rte_ipv4_tuple)).dst_addr as *const _ as usize },
+ 4usize,
+ concat!(
+ "Alignment of field: ",
+ stringify!(rte_ipv4_tuple),
+ "::",
+ stringify!(dst_addr)
+ )
+ );
}
impl Clone for rte_ipv4_tuple {
- fn clone(&self) -> Self { *self }
+ fn clone(&self) -> Self {
+ *self
+ }
}
impl Default for rte_ipv4_tuple {
- fn default() -> Self { unsafe { ::std::mem::zeroed() } }
+ fn default() -> Self {
+ unsafe { ::std::mem::zeroed() }
+ }
}
#[repr(C)]
#[derive(Copy)]
@@ -105,13 +150,7 @@ pub struct rte_ipv6_tuple {
pub __bindgen_anon_1: rte_ipv6_tuple__bindgen_ty_1,
}
#[repr(C)]
-#[derive(Copy)]
-pub union rte_ipv6_tuple__bindgen_ty_1 {
- pub __bindgen_anon_1: rte_ipv6_tuple__bindgen_ty_1__bindgen_ty_1,
- pub sctp_tag: u32,
- _bindgen_union_align: u32,
-}
-#[repr(C)]
+#[derive(Copy)]pub union rte_ipv6_tuple__bindgen_ty_1 { pub __bindgen_anon_1 : rte_ipv6_tuple__bindgen_ty_1__bindgen_ty_1 , pub sctp_tag : u32 , _bindgen_union_align : u32 , }#[repr(C)]
#[derive(Debug, Default, Copy, Hash, PartialEq, Eq)]
pub struct rte_ipv6_tuple__bindgen_ty_1__bindgen_ty_1 {
pub dport: u16,
@@ -119,102 +158,164 @@ pub struct rte_ipv6_tuple__bindgen_ty_1__bindgen_ty_1 {
}
#[test]
fn bindgen_test_layout_rte_ipv6_tuple__bindgen_ty_1__bindgen_ty_1() {
- assert_eq!(::std::mem::size_of::<rte_ipv6_tuple__bindgen_ty_1__bindgen_ty_1>()
- , 4usize , concat ! (
- "Size of: " , stringify ! (
- rte_ipv6_tuple__bindgen_ty_1__bindgen_ty_1 ) ));
- assert_eq! (::std::mem::align_of::<rte_ipv6_tuple__bindgen_ty_1__bindgen_ty_1>()
- , 2usize , concat ! (
- "Alignment of " , stringify ! (
- 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 } , 0usize , concat ! (
- "Alignment of field: " , stringify ! (
- rte_ipv6_tuple__bindgen_ty_1__bindgen_ty_1 ) , "::" ,
- stringify ! ( dport ) ));
- assert_eq! (unsafe {
- & (
- * ( 0 as * const rte_ipv6_tuple__bindgen_ty_1__bindgen_ty_1 )
- ) . sport as * const _ as usize } , 2usize , concat ! (
- "Alignment of field: " , stringify ! (
- rte_ipv6_tuple__bindgen_ty_1__bindgen_ty_1 ) , "::" ,
- stringify ! ( sport ) ));
+ assert_eq!(
+ ::std::mem::size_of::<rte_ipv6_tuple__bindgen_ty_1__bindgen_ty_1>(),
+ 4usize,
+ concat!(
+ "Size of: ",
+ stringify!(rte_ipv6_tuple__bindgen_ty_1__bindgen_ty_1)
+ )
+ );
+ assert_eq!(
+ ::std::mem::align_of::<rte_ipv6_tuple__bindgen_ty_1__bindgen_ty_1>(),
+ 2usize,
+ concat!(
+ "Alignment of ",
+ stringify!(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
+ },
+ 0usize,
+ concat!(
+ "Alignment of field: ",
+ stringify!(rte_ipv6_tuple__bindgen_ty_1__bindgen_ty_1),
+ "::",
+ stringify!(dport)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(0 as *const rte_ipv6_tuple__bindgen_ty_1__bindgen_ty_1)).sport as *const _ as usize
+ },
+ 2usize,
+ concat!(
+ "Alignment of field: ",
+ stringify!(rte_ipv6_tuple__bindgen_ty_1__bindgen_ty_1),
+ "::",
+ stringify!(sport)
+ )
+ );
}
impl Clone for rte_ipv6_tuple__bindgen_ty_1__bindgen_ty_1 {
- fn clone(&self) -> Self { *self }
+ fn clone(&self) -> Self {
+ *self
+ }
}
#[test]
fn bindgen_test_layout_rte_ipv6_tuple__bindgen_ty_1() {
- assert_eq!(::std::mem::size_of::<rte_ipv6_tuple__bindgen_ty_1>() , 4usize
- , concat ! (
- "Size of: " , stringify ! ( rte_ipv6_tuple__bindgen_ty_1 ) ));
- assert_eq! (::std::mem::align_of::<rte_ipv6_tuple__bindgen_ty_1>() ,
- 4usize , 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 } , 0usize , concat ! (
- "Alignment of field: " , stringify ! (
- rte_ipv6_tuple__bindgen_ty_1 ) , "::" , stringify ! ( sctp_tag
- ) ));
+ assert_eq!(
+ ::std::mem::size_of::<rte_ipv6_tuple__bindgen_ty_1>(),
+ 4usize,
+ concat!("Size of: ", stringify!(rte_ipv6_tuple__bindgen_ty_1))
+ );
+ assert_eq!(
+ ::std::mem::align_of::<rte_ipv6_tuple__bindgen_ty_1>(),
+ 4usize,
+ 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 },
+ 0usize,
+ concat!(
+ "Alignment of field: ",
+ stringify!(rte_ipv6_tuple__bindgen_ty_1),
+ "::",
+ stringify!(sctp_tag)
+ )
+ );
}
impl Clone for rte_ipv6_tuple__bindgen_ty_1 {
- fn clone(&self) -> Self { *self }
+ fn clone(&self) -> Self {
+ *self
+ }
}
impl Default for rte_ipv6_tuple__bindgen_ty_1 {
- fn default() -> Self { unsafe { ::std::mem::zeroed() } }
+ fn default() -> Self {
+ unsafe { ::std::mem::zeroed() }
+ }
}
#[test]
fn bindgen_test_layout_rte_ipv6_tuple() {
- assert_eq!(::std::mem::size_of::<rte_ipv6_tuple>() , 36usize , concat ! (
- "Size of: " , stringify ! ( rte_ipv6_tuple ) ));
- assert_eq! (::std::mem::align_of::<rte_ipv6_tuple>() , 4usize , concat ! (
- "Alignment of " , stringify ! ( rte_ipv6_tuple ) ));
- assert_eq! (unsafe {
- & ( * ( 0 as * const rte_ipv6_tuple ) ) . src_addr as * const
- _ as usize } , 0usize , concat ! (
- "Alignment of field: " , stringify ! ( rte_ipv6_tuple ) , "::"
- , stringify ! ( src_addr ) ));
- assert_eq! (unsafe {
- & ( * ( 0 as * const rte_ipv6_tuple ) ) . dst_addr as * const
- _ as usize } , 16usize , concat ! (
- "Alignment of field: " , stringify ! ( rte_ipv6_tuple ) , "::"
- , stringify ! ( dst_addr ) ));
+ assert_eq!(
+ ::std::mem::size_of::<rte_ipv6_tuple>(),
+ 36usize,
+ concat!("Size of: ", stringify!(rte_ipv6_tuple))
+ );
+ assert_eq!(
+ ::std::mem::align_of::<rte_ipv6_tuple>(),
+ 4usize,
+ concat!("Alignment of ", stringify!(rte_ipv6_tuple))
+ );
+ assert_eq!(
+ unsafe { &(*(0 as *const rte_ipv6_tuple)).src_addr as *const _ as usize },
+ 0usize,
+ concat!(
+ "Alignment of field: ",
+ stringify!(rte_ipv6_tuple),
+ "::",
+ stringify!(src_addr)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(0 as *const rte_ipv6_tuple)).dst_addr as *const _ as usize },
+ 16usize,
+ concat!(
+ "Alignment of field: ",
+ stringify!(rte_ipv6_tuple),
+ "::",
+ stringify!(dst_addr)
+ )
+ );
}
impl Clone for rte_ipv6_tuple {
- fn clone(&self) -> Self { *self }
+ fn clone(&self) -> Self {
+ *self
+ }
}
impl Default for rte_ipv6_tuple {
- fn default() -> Self { unsafe { ::std::mem::zeroed() } }
+ fn default() -> Self {
+ unsafe { ::std::mem::zeroed() }
+ }
}
#[repr(C)]
-#[derive(Copy)]
-pub union rte_thash_tuple {
- pub v4: rte_ipv4_tuple,
- pub v6: rte_ipv6_tuple,
- _bindgen_union_align: [u8; 48usize],
-}
-#[test]
+#[derive(Copy)]; 48usize ] , }#[test]
fn bindgen_test_layout_rte_thash_tuple() {
- assert_eq!(::std::mem::size_of::<rte_thash_tuple>() , 48usize , concat ! (
- "Size of: " , stringify ! ( rte_thash_tuple ) ));
- assert_eq! (unsafe {
- & ( * ( 0 as * const rte_thash_tuple ) ) . v4 as * const _ as
- usize } , 0usize , concat ! (
- "Alignment of field: " , stringify ! ( rte_thash_tuple ) ,
- "::" , stringify ! ( v4 ) ));
- assert_eq! (unsafe {
- & ( * ( 0 as * const rte_thash_tuple ) ) . v6 as * const _ as
- usize } , 0usize , concat ! (
- "Alignment of field: " , stringify ! ( rte_thash_tuple ) ,
- "::" , stringify ! ( v6 ) ));
+ assert_eq!(
+ ::std::mem::size_of::<rte_thash_tuple>(),
+ 48usize,
+ concat!("Size of: ", stringify!(rte_thash_tuple))
+ );
+ assert_eq!(
+ unsafe { &(*(0 as *const rte_thash_tuple)).v4 as *const _ as usize },
+ 0usize,
+ concat!(
+ "Alignment of field: ",
+ stringify!(rte_thash_tuple),
+ "::",
+ stringify!(v4)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(0 as *const rte_thash_tuple)).v6 as *const _ as usize },
+ 0usize,
+ concat!(
+ "Alignment of field: ",
+ stringify!(rte_thash_tuple),
+ "::",
+ stringify!(v6)
+ )
+ );
}
impl Clone for rte_thash_tuple {
- fn clone(&self) -> Self { *self }
+ fn clone(&self) -> Self {
+ *self
+ }
}
impl Default for rte_thash_tuple {
- fn default() -> Self { unsafe { ::std::mem::zeroed() } }
+ fn default() -> Self {
+ unsafe { ::std::mem::zeroed() }
+ }
}
➜ rust-bindgen git:(no-syntex) ✗ cargo fmt -- --version
0.9.0-nightly ( )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment