From f238fa4affa87614d28f42c60010e21c9fb7be6b Mon Sep 17 00:00:00 2001 From: Lucian Popescu Date: Tue, 1 Dec 2026 12:27:47 +0000 Subject: [PATCH 1/7] Fix optimization warning --- cpp2rust/converter/converter_lib.cpp | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/cpp2rust/converter/converter_lib.cpp b/cpp2rust/converter/converter_lib.cpp index e97006171d..4e473d39bc 100644 --- a/cpp2rust/converter/converter_lib.cpp +++ b/cpp2rust/converter/converter_lib.cpp @@ -711,19 +711,25 @@ bool IsConvertibleCopyConstructor(const clang::CXXConstructorDecl *ctor) { // Whether default-initializing a field of decl runs a translated constructor, // which receives the field in place. static bool HasFieldWithDefaultConstructor(const clang::CXXRecordDecl *decl) { - return llvm::any_of(decl->fields(), [](const clang::FieldDecl *field) { + for (const auto *field : decl->fields()) { if (auto *init = field->getInClassInitializer()) { - return GetInPlaceConstruct(init) != nullptr; + if (GetInPlaceConstruct(init)) { + return true; + } + continue; } auto *record = field->getType()->getAsCXXRecordDecl(); if (!record || !record->hasDefinition() || !IsUserDefinedDecl(record) || record->isLambda()) { - return false; + continue; } - return record->hasUserProvidedDefaultConstructor() || - (IsConvertibleImplicitMemberParent(record) && - HasFieldWithDefaultConstructor(record)); - }); + if (record->hasUserProvidedDefaultConstructor() || + (IsConvertibleImplicitMemberParent(record) && + HasFieldWithDefaultConstructor(record))) { + return true; + } + } + return false; } bool IsConvertibleDefaultConstructor(const clang::CXXConstructorDecl *ctor) { From a7a2e6d15dd3bce62114f907cf60c37662a1dfb1 Mon Sep 17 00:00:00 2001 From: Lucian Popescu Date: Tue, 1 Dec 2026 15:24:50 +0000 Subject: [PATCH 2/7] Add Trivially* traits --- cpp2rust/converter/converter.cpp | 3 + cpp2rust/converter/converter_lib.cpp | 8 + cpp2rust/converter/converter_lib.h | 4 + .../converter/models/converter_refcount.cpp | 16 +- libcc2rs-macros/src/constructor.rs | 112 +++-- libcc2rs-macros/src/lib.rs | 10 + libcc2rs/src/capture.rs | 12 + libcc2rs/src/constructor.rs | 436 +++++++++++++----- libcc2rs/src/conversion.rs | 2 +- libcc2rs/src/cstr.rs | 4 +- libcc2rs/src/field.rs | 24 +- libcc2rs/src/lib.rs | 13 +- libcc2rs/src/rc.rs | 6 +- libcc2rs/src/swap.rs | 7 +- rules/algorithm/tgt_refcount.rs | 7 +- rules/array/tgt_refcount.rs | 2 +- rules/dirent/shim.rs | 8 +- rules/ifaddrs/shim.rs | 6 +- rules/ip/shim.rs | 10 +- rules/map/shim.rs | 4 +- rules/map/tgt_refcount.rs | 4 +- rules/netdb/shim.rs | 8 +- rules/poll/shim.rs | 6 +- rules/pwd/shim.rs | 6 +- rules/select/shim.rs | 4 +- rules/socket/shim.rs | 23 +- rules/stat/shim.rs | 4 +- rules/termios/shim.rs | 10 +- rules/time/shim.rs | 14 +- rules/unique_ptr/shim.rs | 12 - rules/vector/tgt_refcount.rs | 2 +- .../out/refcount/cross_tu_tag_collision.rs | 1 + .../out/unsafe/cross_tu_tag_collision.rs | 1 + .../out/refcount/friend_operator.rs | 1 + .../out/unsafe/friend_operator.rs | 1 + .../out/refcount/opaque_forward_decl.rs | 11 +- .../out/unsafe/opaque_forward_decl.rs | 1 + .../refcount/out_of_line_methods_cross_tu.rs | 1 + .../unsafe/out_of_line_methods_cross_tu.rs | 1 + .../template_method_late_instantiation.rs | 11 +- .../template_method_late_instantiation.rs | 9 +- .../out/refcount/p14-class-in-two-files.rs | 1 + .../out/unsafe/p14-class-in-two-files.rs | 1 + .../p15-class-template-static-member.rs | 2 + .../p15-class-template-static-member.rs | 2 + .../out/refcount/p15-function-template.rs | 2 + .../out/unsafe/p15-function-template.rs | 2 + .../p16-default-argument-lambda-in-class.rs | 1 + .../p16-default-argument-lambda-in-class.rs | 1 + .../basic.link/out/refcount/basic.link.rs | 66 ++- .../basic/basic.link/out/unsafe/basic.link.rs | 66 ++- .../out/refcount/basic.scope.class.rs | 22 +- .../out/refcount/basic.scope.param.rs | 1 + .../out/refcount/basic.scope.pdecl.rs | 23 +- .../out/refcount/basic.scope.scope.rs | 64 ++- .../out/unsafe/basic.scope.class.rs | 18 +- .../out/unsafe/basic.scope.param.rs | 1 + .../out/unsafe/basic.scope.pdecl.rs | 10 +- .../out/unsafe/basic.scope.scope.rs | 63 ++- .../out/refcount/basic.start.term.rs | 2 + .../out/unsafe/basic.start.term.rs | 2 + .../out/refcount/basic.types.general.rs | 2 + .../out/unsafe/basic.types.general.rs | 2 + .../out/refcount/class.base.init.rs | 1 + .../class.init/out/unsafe/class.base.init.rs | 1 + .../out/refcount/class.conv.ctor.rs | 1 + .../class.conv/out/refcount/class.conv.fct.rs | 1 + .../class.conv/out/unsafe/class.conv.ctor.rs | 1 + .../class.conv/out/unsafe/class.conv.fct.rs | 1 + .../class.mem/out/refcount/class.free.rs | 2 + .../out/refcount/class.mem.general.rs | 22 +- .../class/class.mem/out/unsafe/class.free.rs | 2 + .../class.mem/out/unsafe/class.mem.general.rs | 18 +- .../dcl.init.general-p6.2-padding-bits.rs | 3 + .../dcl.init/out/refcount/dcl.init.general.rs | 63 ++- .../dcl.init.general-p6.2-padding-bits.rs | 3 + .../dcl.init/out/unsafe/dcl.init.general.rs | 41 +- .../dcl.meaning/out/refcount/dcl.array.rs | 1 + .../out/refcount/dcl.fct.default.rs | 24 +- .../dcl.meaning/out/refcount/dcl.mptr.rs | 26 +- .../dcl.meaning/out/unsafe/dcl.array.rs | 1 + .../dcl.meaning/out/unsafe/dcl.fct.default.rs | 20 +- .../dcl.meaning/out/unsafe/dcl.mptr.rs | 13 +- tests/std/expr/conv/out/refcount/conv.mem.rs | 1 + tests/std/expr/conv/out/unsafe/conv.mem.rs | 1 + .../expr.post/out/refcount/expr.const.cast.rs | 1 + ...nterpret.cast-p10-result-is-unspecified.rs | 2 + .../out/refcount/expr.reinterpret.cast.rs | 4 + .../expr.post/out/unsafe/expr.const.cast.rs | 1 + ...nterpret.cast-p10-result-is-unspecified.rs | 2 + .../out/unsafe/expr.reinterpret.cast.rs | 4 + .../expr.unary/out/refcount/expr.pre.incr.rs | 1 + .../expr.unary/out/refcount/expr.unary.op.rs | 3 + .../expr.unary/out/unsafe/expr.pre.incr.rs | 1 + .../expr.unary/out/unsafe/expr.unary.op.rs | 3 + .../expr.compound/out/refcount/expr.cond.rs | 1 + .../expr.compound/out/refcount/expr.eq.rs | 7 +- ...ptr.oper-p6-null-pointer-to-data-member.rs | 1 + .../out/refcount/expr.mptr.oper.rs | 3 + .../expr.compound/out/unsafe/expr.cond.rs | 1 + .../expr/expr.compound/out/unsafe/expr.eq.rs | 12 +- ...ptr.oper-p6-null-pointer-to-data-member.rs | 1 + .../out/unsafe/expr.mptr.oper.rs | 3 + .../expr.prim/out/refcount/expr.prim.this.rs | 12 +- .../expr.prim/out/unsafe/expr.prim.this.rs | 2 + .../allocator.requirements.general.rs | 13 +- .../unsafe/allocator.requirements.general.rs | 11 +- tests/std/temp/out/refcount/temp.type.rs | 4 + tests/std/temp/out/unsafe/temp.type.rs | 4 + .../temp/temp.spec/out/refcount/temp.inst.rs | 11 +- .../temp/temp.spec/out/unsafe/temp.inst.rs | 9 +- .../utilities/utility/out/refcount/forward.rs | 1 + .../utility/out/refcount/utility.as.const.rs | 1 + .../utilities/utility/out/unsafe/forward.rs | 1 + .../utility/out/unsafe/utility.as.const.rs | 1 + tests/ub/out/refcount/ctor_ref_member.rs | 1 + .../refcount/self_referencing_initializer.rs | 1 + tests/ub/out/refcount/ub6.rs | 11 +- tests/ub/out/unsafe/ctor_ref_member.rs | 1 + .../unsafe/self_referencing_initializer.rs | 1 + tests/ub/out/unsafe/ub6.rs | 1 + tests/unit/out/refcount/05_new.rs | 2 + tests/unit/out/refcount/10_struct.rs | 46 +- tests/unit/out/refcount/addr_of_global.rs | 12 +- tests/unit/out/refcount/anonymous-struct.rs | 9 + tests/unit/out/refcount/anonymous-struct_c.rs | 9 + tests/unit/out/refcount/anonymous_enum.rs | 2 + tests/unit/out/refcount/anonymous_enum_c.rs | 2 + tests/unit/out/refcount/any.rs | 1 + tests/unit/out/refcount/array_const_init.rs | 13 +- tests/unit/out/refcount/array_field_addr.rs | 12 +- tests/unit/out/refcount/array_reference.rs | 1 + tests/unit/out/refcount/as_const.rs | 1 + tests/unit/out/refcount/assign_rhs_first.rs | 11 +- .../out/refcount/assignment_single_eval.rs | 120 ++++- tests/unit/out/refcount/bounded_struct_ptr.rs | 1 + tests/unit/out/refcount/bst.rs | 11 +- tests/unit/out/refcount/c_struct.rs | 15 +- tests/unit/out/refcount/cast.rs | 14 +- .../refcount/cast_array_to_pointer_decay.rs | 12 +- tests/unit/out/refcount/class.rs | 4 + .../refcount/class_template_lazy_member.rs | 5 + tests/unit/out/refcount/class_templates.rs | 9 + tests/unit/out/refcount/clone_vs_move.rs | 24 +- tests/unit/out/refcount/comma_operator.rs | 1 + tests/unit/out/refcount/complex_function.rs | 34 +- .../out/refcount/compound_assign_paren.rs | 1 + tests/unit/out/refcount/concepts.rs | 1 + tests/unit/out/refcount/constexpr_function.rs | 2 + tests/unit/out/refcount/constructor.rs | 1 + .../conversion_operator_same_translation.rs | 2 + .../unit/out/refcount/copy_move_defaulted.rs | 13 +- tests/unit/out/refcount/default.rs | 36 +- .../refcount/default_function_arguments.rs | 2 + tests/unit/out/refcount/default_in_statics.rs | 34 +- tests/unit/out/refcount/destructor_params.rs | 1 + tests/unit/out/refcount/doubly_linked_list.rs | 11 +- .../out/refcount/enum_default_in_static.rs | 1 + tests/unit/out/refcount/enum_int_interop.rs | 11 +- tests/unit/out/refcount/enum_int_interop_c.rs | 11 +- .../unit/out/refcount/enum_underlying_type.rs | 11 +- tests/unit/out/refcount/exprs.rs | 12 +- tests/unit/out/refcount/fft.rs | 1 + tests/unit/out/refcount/field_aliasing.rs | 24 +- .../unit/out/refcount/field_array_elem_ptr.rs | 13 +- .../out/refcount/field_method_receiver.rs | 1 + tests/unit/out/refcount/field_pointers.rs | 13 +- .../field_pointers_malloced_struct.rs | 1 + .../field_reinterpret_write_through.rs | 13 +- tests/unit/out/refcount/find.rs | 1 + .../refcount/first_field_ptr_covers_struct.rs | 2 + .../out/refcount/first_member_downcast.rs | 2 + .../refcount/flex_array_member_incomplete.rs | 12 +- .../flex_array_member_sibling_write.rs | 25 +- tests/unit/out/refcount/fn_ptr.rs | 1 + tests/unit/out/refcount/fn_ptr_cast.rs | 11 +- tests/unit/out/refcount/fn_ptr_stable_sort.rs | 1 + tests/unit/out/refcount/fn_ptr_struct.rs | 12 +- .../unit/out/refcount/fn_ptr_typedef_cast.rs | 1 + tests/unit/out/refcount/fn_ptr_vtable.rs | 11 +- tests/unit/out/refcount/fn_ref.rs | 11 +- tests/unit/out/refcount/friend.rs | 4 + .../unit/out/refcount/function_overloading.rs | 1 + .../out/refcount/global_call_temporaries.rs | 1 + .../out/refcount/global_init_side_effect.rs | 1 + .../out/refcount/global_non_const_init.rs | 23 +- tests/unit/out/refcount/global_pointers.rs | 11 +- .../refcount/global_without_initializer.rs | 1 + .../out/refcount/goto_aggregate_default.rs | 1 + tests/unit/out/refcount/goto_cleanup.rs | 11 +- tests/unit/out/refcount/huffman.rs | 11 +- .../refcount/immutable-deref-on-func-call.rs | 1 + .../refcount/in_class_field_initializer.rs | 33 +- tests/unit/out/refcount/init.rs | 1 + tests/unit/out/refcount/init_list.rs | 23 +- tests/unit/out/refcount/kruskal.rs | 1 + tests/unit/out/refcount/lambda_as_field.rs | 23 +- tests/unit/out/refcount/lambda_capture_ref.rs | 1 + .../out/refcount/lambda_capture_star_this.rs | 1 + .../unit/out/refcount/lambda_capture_this.rs | 1 + .../unit/out/refcount/lambda_capture_value.rs | 1 + .../unit/out/refcount/lambda_decltype_type.rs | 24 +- .../refcount/lambda_generic_explicit_args.rs | 1 + .../out/refcount/lambda_immediate_init.rs | 11 +- tests/unit/out/refcount/lambda_nested.rs | 1 + .../unit/out/refcount/lambda_static_local.rs | 1 + .../refcount/libc_struct_without_default.rs | 12 +- tests/unit/out/refcount/linked_list.rs | 11 +- .../refcount/local_anon_struct_collision.rs | 2 + .../out/refcount/local_record_template.rs | 4 + tests/unit/out/refcount/map.rs | 11 +- tests/unit/out/refcount/map_key_identity.rs | 12 +- tests/unit/out/refcount/map_try_emplace.rs | 11 +- .../out/refcount/map_try_emplace_lvalues.rs | 45 +- .../unit/out/refcount/memcpy_struct_bytes.rs | 1 + .../out/refcount/memcpy_struct_layouts.rs | 16 +- .../unit/out/refcount/memcpy_struct_struct.rs | 1 + tests/unit/out/refcount/memset_struct_tail.rs | 12 +- tests/unit/out/refcount/nested_structs.rs | 6 + tests/unit/out/refcount/new.rs | 1 + tests/unit/out/refcount/new_bst.rs | 11 +- tests/unit/out/refcount/new_struct.rs | 2 + .../refcount/nttp_distinct_specializations.rs | 3 + tests/unit/out/refcount/offsetof.rs | 13 +- .../unit/out/refcount/opaque_forward_decl.rs | 11 +- tests/unit/out/refcount/opaque_record_copy.rs | 2 + .../unit/out/refcount/opaque_then_defined.rs | 22 +- .../out/refcount/operator_arithmetic_free.rs | 1 + .../refcount/operator_arithmetic_member.rs | 1 + .../out/refcount/operator_bitwise_free.rs | 1 + .../out/refcount/operator_bitwise_member.rs | 1 + .../refcount/operator_comparison_defaulted.rs | 18 +- .../out/refcount/operator_comparison_free.rs | 2 + .../refcount/operator_comparison_member.rs | 1 + .../out/refcount/operator_comparison_mixed.rs | 1 + .../refcount/operator_comparison_nonbool.rs | 7 + .../operator_compound_assignment_free.rs | 1 + .../operator_compound_assignment_member.rs | 1 + tests/unit/out/refcount/operator_friend.rs | 7 + tests/unit/out/refcount/operator_less_than.rs | 1 + .../out/refcount/operator_logical_free.rs | 1 + .../out/refcount/operator_logical_member.rs | 1 + .../refcount/operator_member_pointer_free.rs | 13 +- .../operator_member_pointer_member.rs | 14 +- .../unit/out/refcount/operator_other_free.rs | 1 + .../out/refcount/operator_other_member.rs | 2 + tests/unit/out/refcount/operator_overloads.rs | 1 + .../unit/out/refcount/operator_qualifiers.rs | 1 + tests/unit/out/refcount/operator_three_way.rs | 1 + tests/unit/out/refcount/operator_traits.rs | 5 + tests/unit/out/refcount/overload_mangling.rs | 3 + .../refcount/pair_converting_construction.rs | 10 + tests/unit/out/refcount/pod.rs | 1 + tests/unit/out/refcount/pointer_array.rs | 12 +- tests/unit/out/refcount/pointers.rs | 1 + tests/unit/out/refcount/ptr_cast_init.rs | 2 + tests/unit/out/refcount/push_emplace_back.rs | 26 +- tests/unit/out/refcount/random.rs | 13 +- tests/unit/out/refcount/reference_wrapper.rs | 1 + tests/unit/out/refcount/references.rs | 23 +- tests/unit/out/refcount/refs_as_args.rs | 1 + .../out/refcount/reinterpret_cast_ptr_cmp.rs | 25 +- .../out/refcount/reinterpret_cast_struct.rs | 1 + .../reinterpret_cast_struct_to_struct.rs | 2 + tests/unit/out/refcount/reserved_keywords.rs | 3 + tests/unit/out/refcount/return_move.rs | 22 +- tests/unit/out/refcount/rvalue_struct.rs | 1 + .../scalar_builtin_construct_destruct.rs | 1 + .../refcount/self_referencing_initializer.rs | 34 +- .../unit/out/refcount/size_t_static_member.rs | 2 + .../out/refcount/size_t_template_param.rs | 2 + tests/unit/out/refcount/static_local.rs | 1 + .../unit/out/refcount/static_var_in_class.rs | 2 + tests/unit/out/refcount/stdcopy.rs | 1 + tests/unit/out/refcount/strdup.rs | 11 +- .../out/refcount/string_literal_ptr_init.rs | 11 +- tests/unit/out/refcount/string_substr.rs | 11 +- .../out/refcount/struct_2d_array_field.rs | 12 +- tests/unit/out/refcount/struct_ctor.rs | 13 +- .../unit/out/refcount/struct_default_ctor.rs | 35 +- .../refcount/struct_member_array_adjacency.rs | 12 +- tests/unit/out/refcount/struct_ptr.rs | 1 + .../refcount/structured_binding_range_for.rs | 1 + .../out/refcount/structured_binding_ref.rs | 1 + .../refcount/structured_binding_trivial.rs | 1 + .../refcount/tag_vs_identifier_collision.rs | 13 +- .../unit/out/refcount/template_default_arg.rs | 14 +- .../out/refcount/template_static_member.rs | 5 + .../out/refcount/temporary_field_ctor_arg.rs | 1 + tests/unit/out/refcount/this.rs | 2 + .../unit/out/refcount/typedef-anon-struct.rs | 1 + .../out/refcount/unary_expr_or_type_trait.rs | 1 + tests/unit/out/refcount/unboxed_locals.rs | 1 + tests/unit/out/refcount/unboxed_records.rs | 24 +- .../out/refcount/union_addrof_external.rs | 27 +- tests/unit/out/refcount/union_basic.rs | 16 +- .../unit/out/refcount/union_cross_arm_cast.rs | 39 +- .../out/refcount/union_field_alignment.rs | 15 +- .../out/refcount/union_flex_array_member.rs | 15 +- .../unit/out/refcount/union_memset_memcpy.rs | 39 +- tests/unit/out/refcount/union_nested.rs | 42 +- .../out/refcount/union_pointer_pun_address.rs | 16 +- .../union_pointer_pun_writethrough.rs | 4 +- .../out/refcount/union_struct_dual_use.rs | 16 +- .../out/refcount/union_tagged_many_arms.rs | 15 +- .../unit/out/refcount/union_tagged_simple.rs | 15 +- .../out/refcount/union_tagged_struct_arms.rs | 28 +- .../refcount/union_void_ptr_sized_deref.rs | 15 +- tests/unit/out/refcount/unique_ptr.rs | 1 + .../out/refcount/unique_ptr_field_reset.rs | 1 + tests/unit/out/refcount/unique_ptr_nested.rs | 1 + tests/unit/out/refcount/unique_ptr_struct.rs | 1 + tests/unit/out/refcount/va_arg_mixed_types.rs | 1 + .../out/refcount/va_arg_non_primitive_ptrs.rs | 11 +- tests/unit/out/refcount/va_arg_struct_ctx.rs | 5 +- tests/unit/out/refcount/va_arg_void_ptr.rs | 11 +- tests/unit/out/refcount/va_list_field.rs | 11 +- tests/unit/out/refcount/vector.rs | 1 + .../out/refcount/vector_iter_range_ctor.rs | 2 + .../out/refcount/vector_subscript_direct.rs | 1 + .../out/refcount/vector_with_allocator.rs | 2 + tests/unit/out/refcount/void_cast.rs | 1 + tests/unit/out/unsafe/05_new.rs | 2 + tests/unit/out/unsafe/10_struct.rs | 13 +- tests/unit/out/unsafe/addr_of_global.rs | 2 + tests/unit/out/unsafe/anonymous-struct.rs | 9 + tests/unit/out/unsafe/anonymous-struct_c.rs | 9 + tests/unit/out/unsafe/anonymous_enum.rs | 2 + tests/unit/out/unsafe/anonymous_enum_c.rs | 2 + tests/unit/out/unsafe/any.rs | 1 + tests/unit/out/unsafe/array_const_init.rs | 2 + tests/unit/out/unsafe/array_field_addr.rs | 1 + tests/unit/out/unsafe/array_reference.rs | 1 + tests/unit/out/unsafe/as_const.rs | 1 + tests/unit/out/unsafe/assign_rhs_first.rs | 1 + .../unit/out/unsafe/assignment_single_eval.rs | 19 + tests/unit/out/unsafe/bounded_struct_ptr.rs | 1 + tests/unit/out/unsafe/bst.rs | 1 + tests/unit/out/unsafe/c_struct.rs | 5 + tests/unit/out/unsafe/cast.rs | 3 + .../out/unsafe/cast_array_to_pointer_decay.rs | 1 + tests/unit/out/unsafe/class.rs | 4 + .../out/unsafe/class_template_lazy_member.rs | 5 + tests/unit/out/unsafe/class_templates.rs | 9 + tests/unit/out/unsafe/clone_vs_move.rs | 3 + tests/unit/out/unsafe/comma_operator.rs | 1 + tests/unit/out/unsafe/complex_function.rs | 4 + .../unit/out/unsafe/compound_assign_paren.rs | 1 + tests/unit/out/unsafe/concepts.rs | 1 + tests/unit/out/unsafe/constexpr_function.rs | 2 + tests/unit/out/unsafe/constructor.rs | 1 + .../conversion_operator_same_translation.rs | 2 + tests/unit/out/unsafe/copy_move_defaulted.rs | 2 + tests/unit/out/unsafe/default.rs | 11 +- .../out/unsafe/default_function_arguments.rs | 2 + tests/unit/out/unsafe/default_in_statics.rs | 3 + tests/unit/out/unsafe/destructor_params.rs | 1 + tests/unit/out/unsafe/doubly_linked_list.rs | 1 + .../unit/out/unsafe/enum_default_in_static.rs | 1 + tests/unit/out/unsafe/enum_int_interop.rs | 1 + tests/unit/out/unsafe/enum_int_interop_c.rs | 1 + tests/unit/out/unsafe/enum_underlying_type.rs | 9 +- tests/unit/out/unsafe/exprs.rs | 2 + tests/unit/out/unsafe/fft.rs | 1 + tests/unit/out/unsafe/field_aliasing.rs | 3 + tests/unit/out/unsafe/field_array_elem_ptr.rs | 2 + .../unit/out/unsafe/field_method_receiver.rs | 1 + tests/unit/out/unsafe/field_pointers.rs | 2 + .../unsafe/field_pointers_malloced_struct.rs | 1 + .../unsafe/field_reinterpret_write_through.rs | 2 + tests/unit/out/unsafe/find.rs | 1 + .../unsafe/first_field_ptr_covers_struct.rs | 2 + .../unit/out/unsafe/first_member_downcast.rs | 2 + .../unsafe/flex_array_member_incomplete.rs | 9 +- .../unsafe/flex_array_member_sibling_write.rs | 3 + tests/unit/out/unsafe/fn_ptr.rs | 1 + tests/unit/out/unsafe/fn_ptr_cast.rs | 1 + tests/unit/out/unsafe/fn_ptr_stable_sort.rs | 1 + tests/unit/out/unsafe/fn_ptr_struct.rs | 2 + tests/unit/out/unsafe/fn_ptr_typedef_cast.rs | 1 + tests/unit/out/unsafe/fn_ptr_vtable.rs | 1 + tests/unit/out/unsafe/fn_ref.rs | 1 + tests/unit/out/unsafe/friend.rs | 4 + tests/unit/out/unsafe/function_overloading.rs | 1 + .../out/unsafe/global_call_temporaries.rs | 1 + .../out/unsafe/global_init_side_effect.rs | 1 + .../unit/out/unsafe/global_non_const_init.rs | 19 +- tests/unit/out/unsafe/global_pointers.rs | 1 + .../out/unsafe/global_without_initializer.rs | 1 + .../unit/out/unsafe/goto_aggregate_default.rs | 1 + tests/unit/out/unsafe/goto_cleanup.rs | 1 + tests/unit/out/unsafe/huffman.rs | 1 + .../unsafe/immutable-deref-on-func-call.rs | 1 + .../out/unsafe/in_class_field_initializer.rs | 27 +- tests/unit/out/unsafe/init.rs | 1 + tests/unit/out/unsafe/init_list.rs | 19 +- tests/unit/out/unsafe/kruskal.rs | 1 + tests/unit/out/unsafe/lambda_as_field.rs | 19 +- tests/unit/out/unsafe/lambda_capture_ref.rs | 1 + .../out/unsafe/lambda_capture_star_this.rs | 1 + tests/unit/out/unsafe/lambda_capture_this.rs | 1 + tests/unit/out/unsafe/lambda_capture_value.rs | 1 + tests/unit/out/unsafe/lambda_decltype_type.rs | 20 +- .../unsafe/lambda_generic_explicit_args.rs | 1 + .../unit/out/unsafe/lambda_immediate_init.rs | 9 +- tests/unit/out/unsafe/lambda_nested.rs | 1 + tests/unit/out/unsafe/lambda_static_local.rs | 1 + .../out/unsafe/libc_struct_without_default.rs | 9 +- tests/unit/out/unsafe/linked_list.rs | 1 + .../out/unsafe/local_anon_struct_collision.rs | 2 + .../unit/out/unsafe/local_record_template.rs | 4 + tests/unit/out/unsafe/map.rs | 9 +- tests/unit/out/unsafe/map_key_identity.rs | 10 +- tests/unit/out/unsafe/map_try_emplace.rs | 9 +- .../out/unsafe/map_try_emplace_lvalues.rs | 20 +- tests/unit/out/unsafe/memcpy_struct_bytes.rs | 1 + .../unit/out/unsafe/memcpy_struct_layouts.rs | 5 + tests/unit/out/unsafe/memcpy_struct_struct.rs | 1 + tests/unit/out/unsafe/memset_struct_tail.rs | 1 + tests/unit/out/unsafe/nested_structs.rs | 6 + tests/unit/out/unsafe/new.rs | 1 + tests/unit/out/unsafe/new_bst.rs | 1 + tests/unit/out/unsafe/new_struct.rs | 2 + .../unsafe/nttp_distinct_specializations.rs | 3 + tests/unit/out/unsafe/offsetof.rs | 10 +- tests/unit/out/unsafe/opaque_forward_decl.rs | 1 + tests/unit/out/unsafe/opaque_record_copy.rs | 2 + tests/unit/out/unsafe/opaque_then_defined.rs | 2 + .../out/unsafe/operator_arithmetic_free.rs | 1 + .../out/unsafe/operator_arithmetic_member.rs | 1 + .../unit/out/unsafe/operator_bitwise_free.rs | 1 + .../out/unsafe/operator_bitwise_member.rs | 1 + .../unsafe/operator_comparison_defaulted.rs | 8 + .../out/unsafe/operator_comparison_free.rs | 2 + .../out/unsafe/operator_comparison_member.rs | 1 + .../out/unsafe/operator_comparison_mixed.rs | 1 + .../out/unsafe/operator_comparison_nonbool.rs | 7 + .../operator_compound_assignment_free.rs | 1 + .../operator_compound_assignment_member.rs | 1 + tests/unit/out/unsafe/operator_friend.rs | 7 + tests/unit/out/unsafe/operator_less_than.rs | 1 + .../unit/out/unsafe/operator_logical_free.rs | 1 + .../out/unsafe/operator_logical_member.rs | 1 + .../unsafe/operator_member_pointer_free.rs | 2 + .../unsafe/operator_member_pointer_member.rs | 3 + tests/unit/out/unsafe/operator_other_free.rs | 1 + .../unit/out/unsafe/operator_other_member.rs | 2 + tests/unit/out/unsafe/operator_overloads.rs | 1 + tests/unit/out/unsafe/operator_qualifiers.rs | 1 + tests/unit/out/unsafe/operator_three_way.rs | 1 + tests/unit/out/unsafe/operator_traits.rs | 5 + tests/unit/out/unsafe/overload_mangling.rs | 3 + .../unsafe/pair_converting_construction.rs | 10 + tests/unit/out/unsafe/pod.rs | 1 + tests/unit/out/unsafe/pointer_array.rs | 1 + tests/unit/out/unsafe/pointers.rs | 1 + tests/unit/out/unsafe/ptr_cast_init.rs | 2 + tests/unit/out/unsafe/push_emplace_back.rs | 5 + tests/unit/out/unsafe/random.rs | 2 + tests/unit/out/unsafe/reference_wrapper.rs | 1 + tests/unit/out/unsafe/references.rs | 2 + tests/unit/out/unsafe/refs_as_args.rs | 1 + .../out/unsafe/reinterpret_cast_ptr_cmp.rs | 3 + .../out/unsafe/reinterpret_cast_struct.rs | 1 + .../reinterpret_cast_struct_to_struct.rs | 2 + tests/unit/out/unsafe/reserved_keywords.rs | 3 + tests/unit/out/unsafe/return_move.rs | 2 + tests/unit/out/unsafe/rvalue_struct.rs | 1 + .../scalar_builtin_construct_destruct.rs | 1 + .../unsafe/self_referencing_initializer.rs | 11 +- tests/unit/out/unsafe/size_t_static_member.rs | 2 + .../unit/out/unsafe/size_t_template_param.rs | 2 + tests/unit/out/unsafe/static_local.rs | 1 + tests/unit/out/unsafe/static_var_in_class.rs | 2 + tests/unit/out/unsafe/stdcopy.rs | 1 + tests/unit/out/unsafe/strdup.rs | 1 + .../out/unsafe/string_literal_ptr_init.rs | 1 + tests/unit/out/unsafe/string_substr.rs | 1 + .../unit/out/unsafe/struct_2d_array_field.rs | 1 + tests/unit/out/unsafe/struct_ctor.rs | 11 +- tests/unit/out/unsafe/struct_default_ctor.rs | 20 +- .../unsafe/struct_member_array_adjacency.rs | 1 + tests/unit/out/unsafe/struct_ptr.rs | 1 + .../unsafe/structured_binding_range_for.rs | 1 + .../unit/out/unsafe/structured_binding_ref.rs | 1 + .../out/unsafe/structured_binding_trivial.rs | 1 + .../out/unsafe/tag_vs_identifier_collision.rs | 23 +- tests/unit/out/unsafe/template_default_arg.rs | 12 +- .../unit/out/unsafe/template_static_member.rs | 5 + .../out/unsafe/temporary_field_ctor_arg.rs | 1 + tests/unit/out/unsafe/this.rs | 2 + tests/unit/out/unsafe/typedef-anon-struct.rs | 1 + .../out/unsafe/unary_expr_or_type_trait.rs | 1 + tests/unit/out/unsafe/unboxed_locals.rs | 1 + tests/unit/out/unsafe/unboxed_records.rs | 11 +- .../unit/out/unsafe/union_addrof_external.rs | 11 +- tests/unit/out/unsafe/union_basic.rs | 36 +- tests/unit/out/unsafe/union_cross_arm_cast.rs | 12 +- .../unit/out/unsafe/union_field_alignment.rs | 10 +- .../out/unsafe/union_flex_array_member.rs | 10 +- tests/unit/out/unsafe/union_memset_memcpy.rs | 12 +- tests/unit/out/unsafe/union_nested.rs | 21 +- .../out/unsafe/union_pointer_pun_address.rs | 11 +- .../unsafe/union_pointer_pun_writethrough.rs | 9 +- .../unit/out/unsafe/union_struct_dual_use.rs | 11 +- .../unit/out/unsafe/union_tagged_many_arms.rs | 10 +- tests/unit/out/unsafe/union_tagged_simple.rs | 10 +- .../out/unsafe/union_tagged_struct_arms.rs | 13 +- .../out/unsafe/union_void_ptr_sized_deref.rs | 10 +- tests/unit/out/unsafe/unique_ptr.rs | 1 + .../unit/out/unsafe/unique_ptr_field_reset.rs | 1 + tests/unit/out/unsafe/unique_ptr_nested.rs | 1 + tests/unit/out/unsafe/unique_ptr_struct.rs | 1 + tests/unit/out/unsafe/va_arg_mixed_types.rs | 1 + .../out/unsafe/va_arg_non_primitive_ptrs.rs | 1 + tests/unit/out/unsafe/va_arg_struct_ctx.rs | 10 +- tests/unit/out/unsafe/va_arg_void_ptr.rs | 1 + tests/unit/out/unsafe/va_list_field.rs | 1 + tests/unit/out/unsafe/vector.rs | 1 + .../unit/out/unsafe/vector_iter_range_ctor.rs | 2 + .../out/unsafe/vector_subscript_direct.rs | 1 + .../unit/out/unsafe/vector_with_allocator.rs | 2 + tests/unit/out/unsafe/void_cast.rs | 1 + 523 files changed, 3744 insertions(+), 525 deletions(-) diff --git a/cpp2rust/converter/converter.cpp b/cpp2rust/converter/converter.cpp index ea63a98e5c..157c54e43f 100644 --- a/cpp2rust/converter/converter.cpp +++ b/cpp2rust/converter/converter.cpp @@ -5676,6 +5676,9 @@ void Converter::AddCopyAndMoveDerives(const clang::RecordDecl *decl, const RecordTrait *copy[] = {&kCopyConstructible, &kCopyAssignable}; const RecordTrait *move[] = {&kMoveConstructible, &kMoveAssignable}; bool copies = decl->isUnion() || RecordImplementsClone(decl); + if (copies && IsTriviallyCopyable(decl)) { + attrs.emplace_back(GetCopyOrMoveTraitName(kTriviallyCopyable)); + } bool writes_move = llvm::any_of(move, implements); if (copies && !writes_move && llvm::none_of(copy, implements)) { attrs.emplace_back(GetCopyOrMoveTraitName(kCopyable)); diff --git a/cpp2rust/converter/converter_lib.cpp b/cpp2rust/converter/converter_lib.cpp index 4e473d39bc..c378cfa6fc 100644 --- a/cpp2rust/converter/converter_lib.cpp +++ b/cpp2rust/converter/converter_lib.cpp @@ -980,6 +980,14 @@ bool HasDefaultedCopyConstructor(const clang::RecordDecl *decl) { return HasCallableCopyConstructor(cxx); } +bool IsTriviallyCopyable(const clang::RecordDecl *decl) { + auto *cxx = clang::dyn_cast(decl); + if (!cxx) { + return true; + } + return cxx->isTriviallyCopyable(); +} + bool RecordHasOnlyReferenceFields(const clang::RecordDecl *decl) { for (auto *field : decl->fields()) { if (!field->getType()->isReferenceType()) { diff --git a/cpp2rust/converter/converter_lib.h b/cpp2rust/converter/converter_lib.h index 6ef496f015..acf0026077 100644 --- a/cpp2rust/converter/converter_lib.h +++ b/cpp2rust/converter/converter_lib.h @@ -140,6 +140,8 @@ inline constexpr RecordTrait kMovable{"Movable", "MovableUnsafe", nullptr, nullptr, nullptr}; inline constexpr RecordTrait kCopyable{"Copyable", "CopyableUnsafe", nullptr, nullptr, nullptr}; +inline constexpr RecordTrait kTriviallyCopyable{ + "TriviallyCopyable", "TriviallyCopyableUnsafe", nullptr, nullptr, nullptr}; inline constexpr RecordTrait kMemberwise{"Memberwise", "MemberwiseUnsafe", nullptr, nullptr, nullptr}; @@ -207,6 +209,8 @@ bool HasCallableCopyConstructor(const clang::RecordDecl *decl); bool HasDefaultedCopyConstructor(const clang::RecordDecl *decl); +bool IsTriviallyCopyable(const clang::RecordDecl *decl); + bool RecordHasOnlyReferenceFields(const clang::RecordDecl *decl); bool HasDefaultedCopyAssignment(const clang::RecordDecl *decl); diff --git a/cpp2rust/converter/models/converter_refcount.cpp b/cpp2rust/converter/models/converter_refcount.cpp index 5164181216..ae633acf49 100644 --- a/cpp2rust/converter/models/converter_refcount.cpp +++ b/cpp2rust/converter/models/converter_refcount.cpp @@ -632,13 +632,21 @@ bool ConverterRefCount::VisitOffsetOfExpr(clang::OffsetOfExpr *expr) { } // The operands of comparison operators are pointers to the values (&Ptr). -std::string ConverterRefCount::GetComparisonArg(const clang::ParmVarDecl *param, - const clang::CXXRecordDecl *, - std::string_view value) { +std::string +ConverterRefCount::GetComparisonArg(const clang::ParmVarDecl *param, + const clang::CXXRecordDecl *decl, + std::string_view value) { if (param->getType()->isReferenceType()) { return std::format("{}.clone()", value); } - return std::format("{}.read()", value); + if (IsTriviallyCopyable(decl)) { + return std::format("{}.read()", value); + } + return std::format("{{ {} {}::{}({}, {}.clone()); {} }}", + CreatePlacementStorage(GetRecordName(decl)), + GetCopyOrMoveTraitName(kCopyConstructible), + kCopyConstructible.method, GetPlacementReceiver(), value, + TakePlacementValue()); } std::string ConverterRefCount::GetComparisonResultReceiver( diff --git a/libcc2rs-macros/src/constructor.rs b/libcc2rs-macros/src/constructor.rs index a8b6d1505e..0e27c94287 100644 --- a/libcc2rs-macros/src/constructor.rs +++ b/libcc2rs-macros/src/constructor.rs @@ -115,32 +115,62 @@ fn impl_trait(input: &DeriveInput, op: &str, is_assign: bool, is_unsafe: bool) - } else { quote!() }; - // Copying is cloning, and so is moving, which can be done by value. - let by_value = if is_move { - quote! { - const BY_VALUE: bool = true; - fn moved_value(src: &mut Self) -> Self { - src.clone() + quote! { + impl #impl_generics ::libcc2rs::#trait_name for #name #ty_generics #where_clause { + fn #method(this: &::libcc2rs::Ptr, src: ::libcc2rs::Ptr) #ret { + this.write(src.with(Self::clone)); + #tail } } - } else { - quote! { - const BY_VALUE: bool = true; - fn copied_value(src: &Self) -> Self { - src.clone() + } + } +} + +pub fn expand_trivially_copyable(input: TokenStream, is_unsafe: bool) -> TokenStream { + let input = parse_macro_input!(input as DeriveInput); + let name = &input.ident; + let (impl_generics, ty_generics, where_clause) = input.generics.split_for_impl(); + let suffix = if is_unsafe { "Unsafe" } else { "" }; + let copy = format_ident!("TriviallyCopyConstructible{}", suffix); + let mov = format_ident!("TriviallyMoveConstructible{}", suffix); + let markers = [ + "TriviallyCopyAssignable", + "TriviallyMoveAssignable", + "TriviallyDestructible", + ] + .map(|marker| format_ident!("{}{}", marker, suffix)); + let constructors = if is_unsafe { + quote! { + impl #impl_generics ::libcc2rs::#copy for #name #ty_generics #where_clause { + unsafe fn trivial_copy(src: *const Self) -> Self { + unsafe { (*src).clone() } } } - }; + impl #impl_generics ::libcc2rs::#mov for #name #ty_generics #where_clause { + unsafe fn trivial_move(src: *mut Self) -> Self { + unsafe { (*src).clone() } + } + } + } + } else { quote! { - impl #impl_generics ::libcc2rs::#trait_name for #name #ty_generics #where_clause { - fn #method(this: &::libcc2rs::Ptr, src: ::libcc2rs::Ptr) #ret { - this.write(src.read()); - #tail + impl #impl_generics ::libcc2rs::#copy for #name #ty_generics #where_clause { + fn trivial_copy(src: &Self) -> Self { + src.clone() + } + } + impl #impl_generics ::libcc2rs::#mov for #name #ty_generics #where_clause { + fn trivial_move(src: &mut Self) -> Self { + src.clone() } - #by_value } } + }; + quote! { + #constructors + #(impl #impl_generics ::libcc2rs::#markers for #name #ty_generics #where_clause {})* } + .into() } // The C++ defaulted copy and move members of a struct that its memberwise @@ -190,7 +220,6 @@ fn impl_memberwise( .to_compile_error(); }; let members: Vec<_> = data.fields.members().collect(); - let types: Vec<_> = data.fields.iter().map(|field| &field.ty).collect(); let name = &input.ident; let (impl_generics, ty_generics, where_clause) = input.generics.split_for_impl(); let is_move = op == "move"; @@ -230,56 +259,19 @@ fn impl_memberwise( } }; } - // When no field depends on its address, all fields are moved or copied by - // value, which borrows each object once. Otherwise, the fields that do are - // moved or copied in place, through pointers to them, and the others by - // value. BY_VALUE is a constant, and so the branches are folded. - let (value_fn, src_ref, with) = if is_move { - ( - format_ident!("moved_value"), - quote!(&mut), - format_ident!("with_mut"), - ) - } else { - ( - format_ident!("copied_value"), - quote!(&), - format_ident!("with"), - ) - }; - let value = quote!(Self { #(#members: <#types as #tr>::#value_fn(#src_ref __src.#members),)* }); let (ret, tail) = if is_assign { (quote!(-> ::libcc2rs::Ptr), quote!(this.clone())) } else { (quote!(), quote!()) }; - let body = quote! { - if ::BY_VALUE { - let __value = src.#with(|__src| #value); - this.write(__value); - } else { - #(if <#types as #tr>::BY_VALUE { - let __value = src.#with(|__src| <#types as #tr>::#value_fn(#src_ref __src.#members)); - this.with_mut(|__dst| __dst.#members = __value); - } else { - #tr::#method( - &::libcc2rs::field_ptr!(this, #members), - ::libcc2rs::field_ptr!(src, #members), - ); - })* - } - #tail - }; quote! { impl #impl_generics #tr for #name #ty_generics #where_clause { fn #method(this: &::libcc2rs::Ptr, src: ::libcc2rs::Ptr) #ret { - #body - } - - const BY_VALUE: bool = true #(&& <#types as #tr>::BY_VALUE)*; - - fn #value_fn(__src: #src_ref Self) -> Self { - #value + #(#tr::#method( + &::libcc2rs::field_ptr!(this, #members), + ::libcc2rs::field_ptr!(src, #members), + );)* + #tail } } } diff --git a/libcc2rs-macros/src/lib.rs b/libcc2rs-macros/src/lib.rs index d9818dc492..ca0513fd73 100644 --- a/libcc2rs-macros/src/lib.rs +++ b/libcc2rs-macros/src/lib.rs @@ -180,6 +180,16 @@ pub fn derive_copy_constructible(input: TokenStream) -> TokenStream { constructor::expand(input, "copy", false, false) } +#[proc_macro_derive(TriviallyCopyable)] +pub fn derive_trivially_copyable(input: TokenStream) -> TokenStream { + constructor::expand_trivially_copyable(input, false) +} + +#[proc_macro_derive(TriviallyCopyableUnsafe)] +pub fn derive_trivially_copyable_unsafe(input: TokenStream) -> TokenStream { + constructor::expand_trivially_copyable(input, true) +} + #[proc_macro_derive(CopyConstructibleUnsafe)] pub fn derive_copy_constructible_unsafe(input: TokenStream) -> TokenStream { constructor::expand(input, "copy", false, true) diff --git a/libcc2rs/src/capture.rs b/libcc2rs/src/capture.rs index af78508c1b..5764a0ffcd 100644 --- a/libcc2rs/src/capture.rs +++ b/libcc2rs/src/capture.rs @@ -42,18 +42,26 @@ pub trait DestructibleUnsafe: Sized { unsafe fn destroy(&mut self); } +pub trait TriviallyDestructible: Destructible {} + +pub trait TriviallyDestructibleUnsafe: DestructibleUnsafe {} + impl Destructible for FnPtr { fn destroy(this: &Ptr) { this.with(|f| f.destroy()) } } +impl TriviallyDestructible for FnPtr {} + impl DestructibleUnsafe for FnPtr { unsafe fn destroy(&mut self) { FnPtr::destroy(self) } } +impl TriviallyDestructibleUnsafe for FnPtr {} + impl Destructible for Box<[T]> { fn destroy(this: &Ptr) { let elems = this.decay(); @@ -63,6 +71,8 @@ impl Destructible for Box<[T]> { } } +impl TriviallyDestructible for Box<[T]> {} + impl DestructibleUnsafe for [T; N] { unsafe fn destroy(&mut self) { for elem in self.iter_mut().rev() { @@ -71,6 +81,8 @@ impl DestructibleUnsafe for [T; N] { } } +impl TriviallyDestructibleUnsafe for [T; N] {} + // A capture of lambda!, which holds a Value or a Ptr. pub struct Capture<'a, T>(pub &'a T); diff --git a/libcc2rs/src/constructor.rs b/libcc2rs/src/constructor.rs index 0977299e1a..c62805e4c6 100644 --- a/libcc2rs/src/constructor.rs +++ b/libcc2rs/src/constructor.rs @@ -1,66 +1,43 @@ // Copyright (c) 2022-present INESC-ID. // Distributed under the MIT license that can be found in the LICENSE file. -use crate::capture::{Destructible, DestructibleUnsafe}; +use crate::capture::{ + Destructible, DestructibleUnsafe, TriviallyDestructible, TriviallyDestructibleUnsafe, +}; use crate::fn_ptr::{FnPtr, FnSig}; use crate::initialization::ZeroInitialization; use crate::rc::Ptr; use crate::reinterpret::ByteRepr; use crate::void::AnyPtr; -// The copy and move traits of the refcount model can also be done on values, -// without the objects in place, when they don't depend on the addresses of -// the objects, e.g., they don't run user-written constructors or operators, -// which see `this`. BY_VALUE says so, and then moved_value and copied_value -// give the value that the operation writes. Memberwise derives use them to -// move and copy all fields at once. - pub trait MoveConstructible: Sized { fn move_constructor(this: &Ptr, src: Ptr); +} - const BY_VALUE: bool = false; - - /// The value that move_constructor writes, which leaves `src` moved-from. - /// Only called when BY_VALUE. - fn moved_value(_src: &mut Self) -> Self { - unreachable!() - } +pub trait TriviallyMoveConstructible: MoveConstructible { + fn trivial_move(src: &mut Self) -> Self; } -pub trait CopyConstructible: Sized { +pub trait CopyConstructible: MoveConstructible { fn copy_constructor(this: &Ptr, src: Ptr); +} - const BY_VALUE: bool = false; - - /// The value that copy_constructor writes. Only called when BY_VALUE. - fn copied_value(_src: &Self) -> Self { - unreachable!() - } +pub trait TriviallyCopyConstructible: CopyConstructible { + fn trivial_copy(src: &Self) -> Self; } -pub trait CopyAssignable: Sized { +pub trait CopyAssignable: MoveAssignable { fn copy_assign(this: &Ptr, src: Ptr) -> Ptr; - - const BY_VALUE: bool = false; - - /// The value that copy_assign writes. Only called when BY_VALUE. - fn copied_value(_src: &Self) -> Self { - unreachable!() - } } +pub trait TriviallyCopyAssignable: CopyAssignable {} + pub trait MoveAssignable: Sized { fn move_assign(this: &Ptr, src: Ptr) -> Ptr; - - const BY_VALUE: bool = false; - - /// The value that move_assign writes, which leaves `src` moved-from. Only - /// called when BY_VALUE. - fn moved_value(_src: &mut Self) -> Self { - unreachable!() - } } +pub trait TriviallyMoveAssignable: MoveAssignable {} + pub trait Swappable: Sized { fn swap(this: &Ptr, other: Ptr); } @@ -73,30 +50,65 @@ pub trait Copyable: CopyConstructible + CopyAssignable + Movable {} impl Copyable for T {} +pub trait TriviallyCopyable: + TriviallyCopyConstructible + + TriviallyMoveConstructible + + TriviallyCopyAssignable + + TriviallyMoveAssignable + + TriviallyDestructible +{ +} + +impl< + T: TriviallyCopyConstructible + + TriviallyMoveConstructible + + TriviallyCopyAssignable + + TriviallyMoveAssignable + + TriviallyDestructible, +> TriviallyCopyable for T +{ +} + pub trait MoveConstructibleUnsafe { /// # Safety /// `src` must point to a live value. unsafe fn move_constructor(&mut self, src: *mut Self); } -pub trait CopyConstructibleUnsafe { +pub trait CopyConstructibleUnsafe: MoveConstructibleUnsafe { /// # Safety /// `src` must point to a live value. unsafe fn copy_constructor(&mut self, src: *const Self); } -pub trait CopyAssignableUnsafe { +pub trait TriviallyMoveConstructibleUnsafe: MoveConstructibleUnsafe { + /// # Safety + /// `src` must point to a live value. + unsafe fn trivial_move(src: *mut Self) -> Self; +} + +pub trait TriviallyCopyConstructibleUnsafe: CopyConstructibleUnsafe { + /// # Safety + /// `src` must point to a live value. + unsafe fn trivial_copy(src: *const Self) -> Self; +} + +pub trait CopyAssignableUnsafe: MoveAssignableUnsafe { /// # Safety /// `src` must point to a live value. unsafe fn copy_assign(&mut self, src: *const Self) -> *mut Self; } +pub trait TriviallyCopyAssignableUnsafe: CopyAssignableUnsafe {} + pub trait MoveAssignableUnsafe { /// # Safety /// `src` must point to a live value. unsafe fn move_assign(&mut self, src: *mut Self) -> *mut Self; } +pub trait TriviallyMoveAssignableUnsafe: MoveAssignableUnsafe {} + pub trait SwappableUnsafe { /// # Safety /// `other` must point to a live value. @@ -117,6 +129,25 @@ pub trait CopyableUnsafe: CopyConstructibleUnsafe + CopyAssignableUnsafe + Movab impl CopyableUnsafe for T {} +pub trait TriviallyCopyableUnsafe: + TriviallyCopyConstructibleUnsafe + + TriviallyMoveConstructibleUnsafe + + TriviallyCopyAssignableUnsafe + + TriviallyMoveAssignableUnsafe + + TriviallyDestructibleUnsafe +{ +} + +impl< + T: TriviallyCopyConstructibleUnsafe + + TriviallyMoveConstructibleUnsafe + + TriviallyCopyAssignableUnsafe + + TriviallyMoveAssignableUnsafe + + TriviallyDestructibleUnsafe, +> TriviallyCopyableUnsafe for T +{ +} + macro_rules! impl_copy_by_clone { ($(<$($param:ident),*> $ty:ty),* $(,)?) => {$( impl<$($param),*> $crate::CopyConstructible for $ty @@ -124,13 +155,7 @@ macro_rules! impl_copy_by_clone { $ty: Clone + $crate::ByteRepr, { fn copy_constructor(this: &$crate::Ptr, src: $crate::Ptr) { - this.write(src.read()); - } - - const BY_VALUE: bool = true; - - fn copied_value(src: &Self) -> Self { - src.clone() + this.write(src.with(Self::clone)); } } @@ -139,15 +164,9 @@ macro_rules! impl_copy_by_clone { $ty: Clone + $crate::ByteRepr, { fn copy_assign(this: &$crate::Ptr, src: $crate::Ptr) -> $crate::Ptr { - this.write(src.read()); + this.write(src.with(Self::clone)); this.clone() } - - const BY_VALUE: bool = true; - - fn copied_value(src: &Self) -> Self { - src.clone() - } } impl<$($param),*> $crate::CopyConstructibleUnsafe for $ty @@ -179,13 +198,7 @@ macro_rules! impl_move_by_clone { $ty: Clone + $crate::ByteRepr, { fn move_constructor(this: &$crate::Ptr, src: $crate::Ptr) { - this.write(src.read()); - } - - const BY_VALUE: bool = true; - - fn moved_value(src: &mut Self) -> Self { - src.clone() + this.write(src.with(Self::clone)); } } @@ -194,15 +207,9 @@ macro_rules! impl_move_by_clone { $ty: Clone + $crate::ByteRepr, { fn move_assign(this: &$crate::Ptr, src: $crate::Ptr) -> $crate::Ptr { - this.write(src.read()); + this.write(src.with(Self::clone)); this.clone() } - - const BY_VALUE: bool = true; - - fn moved_value(src: &mut Self) -> Self { - src.clone() - } } impl<$($param),*> $crate::MoveConstructibleUnsafe for $ty @@ -229,7 +236,7 @@ macro_rules! impl_move_by_clone { $ty: Clone + $crate::ByteRepr, { fn swap(this: &$crate::Ptr, other: $crate::Ptr) { - this.swap_with(&other, $crate::Ptr::read); + this.swap_with(&other, |p| p.with(Self::clone)); } } @@ -242,10 +249,88 @@ macro_rules! impl_move_by_clone { } pub(crate) use impl_move_by_clone; +macro_rules! impl_trivially_copyable_by_clone { + ($(<$($param:ident),*> $ty:ty),* $(,)?) => {$( + impl<$($param),*> $crate::constructor::TriviallyCopyConstructible for $ty + where + $ty: Clone + $crate::ByteRepr, + { + fn trivial_copy(src: &Self) -> Self { + src.clone() + } + } + + impl<$($param),*> $crate::constructor::TriviallyMoveConstructible for $ty + where + $ty: Clone + $crate::ByteRepr, + { + fn trivial_move(src: &mut Self) -> Self { + src.clone() + } + } + + impl<$($param),*> $crate::constructor::TriviallyCopyConstructibleUnsafe for $ty + where + $ty: Clone, + { + unsafe fn trivial_copy(src: *const Self) -> Self { + unsafe { (*src).clone() } + } + } + + impl<$($param),*> $crate::constructor::TriviallyMoveConstructibleUnsafe for $ty + where + $ty: Clone, + { + unsafe fn trivial_move(src: *mut Self) -> Self { + unsafe { (*src).clone() } + } + } + + impl<$($param),*> $crate::constructor::TriviallyCopyAssignable for $ty + where + $ty: Clone + $crate::ByteRepr, + { + } + + impl<$($param),*> $crate::constructor::TriviallyMoveAssignable for $ty + where + $ty: Clone + $crate::ByteRepr, + { + } + + impl<$($param),*> $crate::constructor::TriviallyCopyAssignableUnsafe for $ty + where + $ty: Clone, + { + } + + impl<$($param),*> $crate::constructor::TriviallyMoveAssignableUnsafe for $ty + where + $ty: Clone, + { + } + + impl<$($param),*> $crate::Destructible for $ty { + fn destroy(_this: &$crate::Ptr) {} + } + + impl<$($param),*> $crate::DestructibleUnsafe for $ty { + unsafe fn destroy(&mut self) {} + } + + impl<$($param),*> $crate::capture::TriviallyDestructible for $ty {} + + impl<$($param),*> $crate::capture::TriviallyDestructibleUnsafe for $ty {} + )*}; +} +pub(crate) use impl_trivially_copyable_by_clone; + macro_rules! impl_trivial_copy_move { ($(<$($param:ident),*> $ty:ty),* $(,)?) => { $crate::constructor::impl_copy_by_clone!($(<$($param),*> $ty),*); $crate::constructor::impl_move_by_clone!($(<$($param),*> $ty),*); + $crate::constructor::impl_trivially_copyable_by_clone!($(<$($param),*> $ty),*); }; ($($ty:ty),* $(,)?) => { $crate::constructor::impl_trivial_copy_move!($(<> $ty),*); @@ -264,12 +349,6 @@ macro_rules! impl_move_by_take { let value = src.with_mut(std::mem::take); this.with_mut(|dst| *dst = value); } - - const BY_VALUE: bool = true; - - fn moved_value(src: &mut Self) -> Self { - std::mem::take(src) - } } impl<$($param),*> $crate::MoveAssignable for $ty @@ -281,12 +360,6 @@ macro_rules! impl_move_by_take { this.with_mut(|dst| *dst = value); this.clone() } - - const BY_VALUE: bool = true; - - fn moved_value(src: &mut Self) -> Self { - std::mem::take(src) - } } impl<$($param),*> $crate::MoveConstructibleUnsafe for $ty @@ -349,22 +422,109 @@ impl_trivial_copy_move!( std::rc::Rc, ); -impl_trivial_copy_move!( - Ptr, - *mut T, - *const T, - (A, B), -); +impl_trivial_copy_move!( Ptr, *mut T, *const T); + +impl_copy_by_clone!( (A, B)); +impl_move_by_clone!( (A, B)); + +impl TriviallyCopyConstructible + for (A, B) +where + Self: Clone + ByteRepr, +{ + fn trivial_copy(src: &Self) -> Self { + (A::trivial_copy(&src.0), B::trivial_copy(&src.1)) + } +} + +impl TriviallyMoveConstructible + for (A, B) +where + Self: Clone + ByteRepr, +{ + fn trivial_move(src: &mut Self) -> Self { + (A::trivial_move(&mut src.0), B::trivial_move(&mut src.1)) + } +} + +impl + TriviallyCopyConstructibleUnsafe for (A, B) +where + Self: Clone, +{ + unsafe fn trivial_copy(src: *const Self) -> Self { + unsafe { + ( + A::trivial_copy(&raw const (*src).0), + B::trivial_copy(&raw const (*src).1), + ) + } + } +} + +impl + TriviallyMoveConstructibleUnsafe for (A, B) +where + Self: Clone, +{ + unsafe fn trivial_move(src: *mut Self) -> Self { + unsafe { + ( + A::trivial_move(&raw mut (*src).0), + B::trivial_move(&raw mut (*src).1), + ) + } + } +} + +impl TriviallyCopyAssignable for (A, B) where + Self: Clone + ByteRepr +{ +} + +impl TriviallyMoveAssignable for (A, B) where + Self: Clone + ByteRepr +{ +} + +impl + TriviallyCopyAssignableUnsafe for (A, B) +where + Self: Clone, +{ +} + +impl + TriviallyMoveAssignableUnsafe for (A, B) +where + Self: Clone, +{ +} + +impl Destructible for (A, B) { + fn destroy(_this: &Ptr) {} +} + +impl TriviallyDestructible for (A, B) {} + +impl DestructibleUnsafe for (A, B) { + unsafe fn destroy(&mut self) {} +} + +impl TriviallyDestructibleUnsafe + for (A, B) +{ +} impl MoveConstructible for FnPtr { fn move_constructor(this: &Ptr, src: Ptr) { let value = src.with(FnPtr::move_from); this.with_mut(|dst| *dst = value); } +} - const BY_VALUE: bool = true; - - fn moved_value(src: &mut Self) -> Self { +impl TriviallyMoveConstructible for FnPtr { + fn trivial_move(src: &mut Self) -> Self { src.move_from() } } @@ -374,10 +534,10 @@ impl CopyConstructible for FnPtr { let value = src.with(FnPtr::copy_from); this.with_mut(|dst| *dst = value); } +} - const BY_VALUE: bool = true; - - fn copied_value(src: &Self) -> Self { +impl TriviallyCopyConstructible for FnPtr { + fn trivial_copy(src: &Self) -> Self { src.copy_from() } } @@ -387,27 +547,19 @@ impl MoveAssignable for FnPtr { ::move_constructor(this, src); this.clone() } - - const BY_VALUE: bool = true; - - fn moved_value(src: &mut Self) -> Self { - src.move_from() - } } +impl TriviallyMoveAssignable for FnPtr {} + impl CopyAssignable for FnPtr { fn copy_assign(this: &Ptr, src: Ptr) -> Ptr { ::copy_constructor(this, src); this.clone() } - - const BY_VALUE: bool = true; - - fn copied_value(src: &Self) -> Self { - src.copy_from() - } } +impl TriviallyCopyAssignable for FnPtr {} + impl Swappable for FnPtr { fn swap(this: &Ptr, other: Ptr) { this.swap_with(&other, |p| p.with(FnPtr::move_from)); @@ -432,6 +584,18 @@ impl CopyConstructibleUnsafe for FnPtr { } } +impl TriviallyMoveConstructibleUnsafe for FnPtr { + unsafe fn trivial_move(src: *mut Self) -> Self { + unsafe { (*src).move_from() } + } +} + +impl TriviallyCopyConstructibleUnsafe for FnPtr { + unsafe fn trivial_copy(src: *const Self) -> Self { + unsafe { (*src).copy_from() } + } +} + impl MoveAssignableUnsafe for FnPtr { unsafe fn move_assign(&mut self, src: *mut Self) -> *mut Self { unsafe { *self = (*src).move_from() }; @@ -446,6 +610,10 @@ impl CopyAssignableUnsafe for FnPtr { } } +impl TriviallyMoveAssignableUnsafe for FnPtr {} + +impl TriviallyCopyAssignableUnsafe for FnPtr {} + fn construct_elems( this: &Ptr>, src: &Ptr>, @@ -476,11 +644,13 @@ impl MoveConstructible for fn move_constructor(this: &Ptr, src: Ptr) { construct_elems(this, &src, T::move_constructor); } +} - const BY_VALUE: bool = T::BY_VALUE; - - fn moved_value(src: &mut Self) -> Self { - src.iter_mut().map(T::moved_value).collect() +impl TriviallyMoveConstructible + for Box<[T]> +{ + fn trivial_move(src: &mut Self) -> Self { + src.iter_mut().map(T::trivial_move).collect() } } @@ -488,11 +658,13 @@ impl CopyConstructible for fn copy_constructor(this: &Ptr, src: Ptr) { construct_elems(this, &src, T::copy_constructor); } +} - const BY_VALUE: bool = T::BY_VALUE; - - fn copied_value(src: &Self) -> Self { - src.iter().map(T::copied_value).collect() +impl TriviallyCopyConstructible + for Box<[T]> +{ + fn trivial_copy(src: &Self) -> Self { + src.iter().map(T::trivial_copy).collect() } } @@ -500,26 +672,18 @@ impl MoveAssignable for Box<[T]> { fn move_assign(this: &Ptr, src: Ptr) -> Ptr { assign_elems(this, &src, T::move_assign) } - - const BY_VALUE: bool = T::BY_VALUE; - - fn moved_value(src: &mut Self) -> Self { - src.iter_mut().map(T::moved_value).collect() - } } +impl TriviallyMoveAssignable for Box<[T]> {} + impl CopyAssignable for Box<[T]> { fn copy_assign(this: &Ptr, src: Ptr) -> Ptr { assign_elems(this, &src, T::copy_assign) } - - const BY_VALUE: bool = T::BY_VALUE; - - fn copied_value(src: &Self) -> Self { - src.iter().map(T::copied_value).collect() - } } +impl TriviallyCopyAssignable for Box<[T]> {} + impl Swappable for Box<[T]> { fn swap(this: &Ptr, other: Ptr) { let len = other.with(|elems| elems.len()); @@ -557,6 +721,24 @@ impl CopyConstructibleUnsafe for [T; } } +impl TriviallyMoveConstructibleUnsafe + for [T; N] +{ + unsafe fn trivial_move(src: *mut Self) -> Self { + let src = src as *mut T; + std::array::from_fn(|i| unsafe { T::trivial_move(src.add(i)) }) + } +} + +impl TriviallyCopyConstructibleUnsafe + for [T; N] +{ + unsafe fn trivial_copy(src: *const Self) -> Self { + let src = src as *const T; + std::array::from_fn(|i| unsafe { T::trivial_copy(src.add(i)) }) + } +} + impl MoveAssignableUnsafe for [T; N] { unsafe fn move_assign(&mut self, src: *mut Self) -> *mut Self { let src = src as *mut T; @@ -576,3 +758,7 @@ impl CopyAssignableUnsafe for [T; N] { self } } + +impl TriviallyMoveAssignableUnsafe for [T; N] {} + +impl TriviallyCopyAssignableUnsafe for [T; N] {} diff --git a/libcc2rs/src/conversion.rs b/libcc2rs/src/conversion.rs index 61c26d57a8..64dd8c35c3 100644 --- a/libcc2rs/src/conversion.rs +++ b/libcc2rs/src/conversion.rs @@ -24,7 +24,7 @@ pub trait CppFromUnsafe: Sized { } } -impl CppFrom for T { +impl CppFrom for T { fn cpp_from(src: Ptr) -> T { src.read() } diff --git a/libcc2rs/src/cstr.rs b/libcc2rs/src/cstr.rs index dce39fd0e6..f1dd85ef2f 100644 --- a/libcc2rs/src/cstr.rs +++ b/libcc2rs/src/cstr.rs @@ -11,7 +11,9 @@ use crate::reinterpret::{ByteRepr, with_scratch}; // The element types of C strings: `char` and `signed char` map to `i8`, // `unsigned char` to `u8`. -pub trait CChar: Copy + Default + PartialEq + ByteRepr + 'static { +pub trait CChar: + Copy + Default + PartialEq + ByteRepr + crate::TriviallyCopyable + 'static +{ fn to_byte(self) -> u8; fn from_byte(b: u8) -> Self; // Calls `f` with `buf` viewed as a slice of `Self`; changes are copied back. diff --git a/libcc2rs/src/field.rs b/libcc2rs/src/field.rs index 279e8d54d5..2301804731 100644 --- a/libcc2rs/src/field.rs +++ b/libcc2rs/src/field.rs @@ -764,9 +764,9 @@ pub trait Place: Clone { #[inline] fn read(&self) -> Self::Target where - Self::Target: Clone, + Self::Target: crate::TriviallyCopyable, { - self.with(Clone::clone) + self.with(::trivial_copy) } #[inline] @@ -883,7 +883,7 @@ impl Place for ElemPlace<'_, T> { #[inline] fn read(&self) -> T where - T: Clone, + T: crate::TriviallyCopyable, { self.base.read_at(self.idx) } @@ -1270,11 +1270,25 @@ impl Ptr { #[cfg(test)] mod tests { - use crate::{AsPointer, ByteRepr, Decay, Place, Ptr, Record, Value}; + use crate::{ + AsPointer, ByteRepr, CopyAssignable, CopyConstructible, Decay, Destructible, + MoveAssignable, MoveConstructible, Place, Ptr, Record, TriviallyCopyable, Value, + }; use std::cell::RefCell; use std::rc::Rc; - #[derive(Clone, Default, Record, ByteRepr)] + #[derive( + Clone, + Default, + Record, + ByteRepr, + MoveConstructible, + CopyConstructible, + MoveAssignable, + CopyAssignable, + Destructible, + TriviallyCopyable, + )] #[byte_size(8)] struct Inner { #[offset(0)] diff --git a/libcc2rs/src/lib.rs b/libcc2rs/src/lib.rs index 67c6073588..2fa18ac12b 100644 --- a/libcc2rs/src/lib.rs +++ b/libcc2rs/src/lib.rs @@ -42,13 +42,19 @@ mod fn_ptr; pub use fn_ptr::{FnPtr, Generic}; mod capture; -pub use capture::{Destructible, DestructibleUnsafe}; +pub use capture::{ + Destructible, DestructibleUnsafe, TriviallyDestructible, TriviallyDestructibleUnsafe, +}; mod constructor; pub use constructor::{ CopyAssignable, CopyAssignableUnsafe, CopyConstructible, CopyConstructibleUnsafe, Copyable, CopyableUnsafe, Movable, MovableUnsafe, MoveAssignable, MoveAssignableUnsafe, MoveConstructible, MoveConstructibleUnsafe, Swappable, SwappableUnsafe, + TriviallyCopyAssignable, TriviallyCopyAssignableUnsafe, TriviallyCopyConstructible, + TriviallyCopyConstructibleUnsafe, TriviallyCopyable, TriviallyCopyableUnsafe, + TriviallyMoveAssignable, TriviallyMoveAssignableUnsafe, TriviallyMoveConstructible, + TriviallyMoveConstructibleUnsafe, }; mod cmp; @@ -115,6 +121,7 @@ pub use libcc2rs_macros::{ ByteRepr, CopyAssignable, CopyAssignableUnsafe, CopyConstructible, CopyConstructibleUnsafe, Copyable, CopyableUnsafe, CppFrom, CppFromUnsafe, Destructible, DestructibleUnsafe, FnPtrArg, Memberwise, MemberwiseUnsafe, Movable, MovableUnsafe, MoveAssignable, MoveAssignableUnsafe, - MoveConstructible, MoveConstructibleUnsafe, Record, Swappable, SwappableUnsafe, VaArg, - ZeroInitialization, ZeroInitializationUnsafe, goto, goto_block, lambda, lambda_unsafe, switch, + MoveConstructible, MoveConstructibleUnsafe, Record, Swappable, SwappableUnsafe, + TriviallyCopyable, TriviallyCopyableUnsafe, VaArg, ZeroInitialization, + ZeroInitializationUnsafe, goto, goto_block, lambda, lambda_unsafe, switch, }; diff --git a/libcc2rs/src/rc.rs b/libcc2rs/src/rc.rs index bbaf6b8341..4aa0368dca 100644 --- a/libcc2rs/src/rc.rs +++ b/libcc2rs/src/rc.rs @@ -1236,16 +1236,16 @@ impl Ptr { } } -impl Ptr { +impl Ptr { #[inline(always)] pub fn read(&self) -> T { - self.with(|v| v.clone()) + self.with(T::trivial_copy) } // Like `self.offset(idx).read()`, without the intermediate pointer. #[inline(always)] pub fn read_at(&self, idx: impl TryInto) -> T { - self.with_at(idx, |v| v.clone()) + self.with_at(idx, T::trivial_copy) } } diff --git a/libcc2rs/src/swap.rs b/libcc2rs/src/swap.rs index 5406b81667..a6e6c7def3 100644 --- a/libcc2rs/src/swap.rs +++ b/libcc2rs/src/swap.rs @@ -15,6 +15,7 @@ use std::rc::Rc; use crate::capture::{Destructible, DestructibleUnsafe}; use crate::constructor::{ MoveAssignable, MoveAssignableUnsafe, MoveConstructible, MoveConstructibleUnsafe, + TriviallyCopyable, TriviallyCopyableUnsafe, }; use crate::initialization::ZeroInitialization; use crate::rc::{AsPointer, Ptr, Value}; @@ -82,7 +83,7 @@ impl ConstructMove for &&&Construc } } -impl ConstructCopy for &&Construct<'_, T> { +impl ConstructCopy for &&Construct<'_, T> { fn construct(self) -> T { self.0.read() } @@ -114,9 +115,9 @@ impl ConstructMoveUnsafe for &&&ConstructUnsafe ConstructCopyUnsafe for &&ConstructUnsafe { +impl ConstructCopyUnsafe for &&ConstructUnsafe { unsafe fn construct(self) -> T { - unsafe { (*self.0).clone() } + unsafe { T::trivial_copy(self.0) } } } diff --git a/rules/algorithm/tgt_refcount.rs b/rules/algorithm/tgt_refcount.rs index 43b71bcc9f..e63cd19bb5 100644 --- a/rules/algorithm/tgt_refcount.rs +++ b/rules/algorithm/tgt_refcount.rs @@ -80,7 +80,10 @@ fn f9(a0: Ptr, a1: Ptr) { Swappable::swap(&a0, a1) } -fn f10, T2: CppEq + Clone + ByteRepr>(a0: T1, a1: T1) -> T1 { +fn f10, T2: CppEq + TriviallyCopyable + ByteRepr>( + a0: T1, + a1: T1, +) -> T1 { if a0 == a1 { a1 } else { @@ -119,7 +122,7 @@ fn f13>(a0: T1, a1: T1, a2: &mut ::std::fs::File) -> :: __out.try_clone().unwrap() } -fn f14(a0: Ptr, a1: Ptr, a2: T2) +fn f14(a0: Ptr, a1: Ptr, a2: T2) where T2: Callable2, { diff --git a/rules/array/tgt_refcount.rs b/rules/array/tgt_refcount.rs index dfd5d52304..123400c152 100644 --- a/rules/array/tgt_refcount.rs +++ b/rules/array/tgt_refcount.rs @@ -51,7 +51,7 @@ fn f5( a0 } -fn f6(a0: Ptr) -> Box<[T1]> { +fn f6(a0: Ptr) -> Box<[T1]> { (0..T2).map(|__i| a0.read_at(__i)).collect() } diff --git a/rules/dirent/shim.rs b/rules/dirent/shim.rs index 7c444620db..2849db1557 100644 --- a/rules/dirent/shim.rs +++ b/rules/dirent/shim.rs @@ -1,11 +1,15 @@ // Copyright (c) 2022-present INESC-ID. // Distributed under the MIT license that can be found in the LICENSE file. -use crate::{ByteRepr, Copyable, Destructible, Record, ZeroInitialization, size_of_field}; +use crate::{ + ByteRepr, Copyable, Destructible, Record, TriviallyCopyable, ZeroInitialization, size_of_field, +}; use std::cell::Cell; use std::mem::{offset_of, size_of}; -#[derive(Clone, Record, ByteRepr, ZeroInitialization, Copyable, Destructible)] +#[derive( + Clone, Record, ByteRepr, ZeroInitialization, Copyable, Destructible, TriviallyCopyable, +)] #[byte_size(size_of::<::libc::dirent>())] pub struct Dirent { #[offset(offset_of!(::libc::dirent, d_ino))] diff --git a/rules/ifaddrs/shim.rs b/rules/ifaddrs/shim.rs index ed8e17bcd4..c357fbb253 100644 --- a/rules/ifaddrs/shim.rs +++ b/rules/ifaddrs/shim.rs @@ -3,11 +3,13 @@ use crate::{ ByteRepr, Copyable, Destructible, Ptr, Record, Sockaddr, SockaddrIn, SockaddrIn6, - SockaddrStorage, ZeroInitialization, + SockaddrStorage, TriviallyCopyable, ZeroInitialization, }; use std::mem::{offset_of, size_of}; -#[derive(Clone, Default, Record, ByteRepr, ZeroInitialization, Copyable, Destructible)] +#[derive( + Clone, Default, Record, ByteRepr, ZeroInitialization, Copyable, Destructible, TriviallyCopyable, +)] #[byte_size(size_of::<::libc::ifaddrs>())] pub struct Ifaddrs { #[offset(offset_of!(::libc::ifaddrs, ifa_next))] diff --git a/rules/ip/shim.rs b/rules/ip/shim.rs index 65eb7d9fe7..d97dafed32 100644 --- a/rules/ip/shim.rs +++ b/rules/ip/shim.rs @@ -1,16 +1,20 @@ // Copyright (c) 2022-present INESC-ID. // Distributed under the MIT license that can be found in the LICENSE file. -use crate::{ByteRepr, Copyable, Destructible, Ptr, Record, ZeroInitialization}; +use crate::{ByteRepr, Copyable, Destructible, Ptr, Record, TriviallyCopyable, ZeroInitialization}; -#[derive(Clone, Default, Record, ByteRepr, ZeroInitialization, Copyable, Destructible)] +#[derive( + Clone, Default, Record, ByteRepr, ZeroInitialization, Copyable, Destructible, TriviallyCopyable, +)] #[byte_size(4)] pub struct InAddr { #[offset(0)] pub s_addr: u32, } -#[derive(Clone, Record, ByteRepr, ZeroInitialization, Copyable, Destructible)] +#[derive( + Clone, Record, ByteRepr, ZeroInitialization, Copyable, Destructible, TriviallyCopyable, +)] #[byte_size(16)] pub struct In6Addr { #[offset(0)] diff --git a/rules/map/shim.rs b/rules/map/shim.rs index 7bdfb4edfb..a5fb83511d 100644 --- a/rules/map/shim.rs +++ b/rules/map/shim.rs @@ -9,7 +9,7 @@ use std::rc::{Rc, Weak}; use crate::{ AsPointer, BidirectionalIterator, ByteRepr, CppIterator, CppLess, Ptr, - UnsafeBidirectionalIterator, UnsafeCppIterator, Value, cpp_cmp, + TriviallyCopyable, UnsafeBidirectionalIterator, UnsafeCppIterator, Value, cpp_cmp, }; impl ByteRepr for BTreeMap {} @@ -235,7 +235,7 @@ impl Map> { // inserted. pub fn subscript(&mut self, key: Ptr, new_value: impl FnOnce() -> V) -> Ptr where - K: Clone + ByteRepr, + K: TriviallyCopyable + ByteRepr, { match self.search(&key) { Ok(node) => Self::mapped(&node), diff --git a/rules/map/tgt_refcount.rs b/rules/map/tgt_refcount.rs index c635a5d0bf..f7531cccd5 100644 --- a/rules/map/tgt_refcount.rs +++ b/rules/map/tgt_refcount.rs @@ -9,7 +9,7 @@ fn t1() -> Map, Value)> { Map::new() } -fn f1( +fn f1( a0: &mut Map, Value)>, a1: Ptr, ) -> Ptr { @@ -116,7 +116,7 @@ fn f68( Map::emplace(a0, &init.0.as_pointer(), || init).0 } -fn f73( +fn f73( a0: Ptr, Value)>>, a1: Ptr, init: T2, diff --git a/rules/netdb/shim.rs b/rules/netdb/shim.rs index e83e2d8b49..4ed949a543 100644 --- a/rules/netdb/shim.rs +++ b/rules/netdb/shim.rs @@ -1,10 +1,14 @@ // Copyright (c) 2022-present INESC-ID. // Distributed under the MIT license that can be found in the LICENSE file. -use crate::{ByteRepr, Copyable, Destructible, Ptr, Record, Sockaddr, ZeroInitialization}; +use crate::{ + ByteRepr, Copyable, Destructible, Ptr, Record, Sockaddr, TriviallyCopyable, ZeroInitialization, +}; use std::mem::{offset_of, size_of}; -#[derive(Clone, Default, Record, ByteRepr, ZeroInitialization, Copyable, Destructible)] +#[derive( + Clone, Default, Record, ByteRepr, ZeroInitialization, Copyable, Destructible, TriviallyCopyable, +)] #[byte_size(size_of::<::libc::addrinfo>())] pub struct Addrinfo { #[offset(offset_of!(::libc::addrinfo, ai_flags))] diff --git a/rules/poll/shim.rs b/rules/poll/shim.rs index 8a8a3dbe94..062d5eaa4b 100644 --- a/rules/poll/shim.rs +++ b/rules/poll/shim.rs @@ -1,10 +1,12 @@ // Copyright (c) 2022-present INESC-ID. // Distributed under the MIT license that can be found in the LICENSE file. -use crate::{ByteRepr, Copyable, Destructible, Record, ZeroInitialization}; +use crate::{ByteRepr, Copyable, Destructible, Record, TriviallyCopyable, ZeroInitialization}; use std::mem::{offset_of, size_of}; -#[derive(Clone, Default, Record, ByteRepr, ZeroInitialization, Copyable, Destructible)] +#[derive( + Clone, Default, Record, ByteRepr, ZeroInitialization, Copyable, Destructible, TriviallyCopyable, +)] #[byte_size(size_of::<::libc::pollfd>())] pub struct Pollfd { #[offset(offset_of!(::libc::pollfd, fd))] diff --git a/rules/pwd/shim.rs b/rules/pwd/shim.rs index 7d5ee08abf..2b6e5f2d11 100644 --- a/rules/pwd/shim.rs +++ b/rules/pwd/shim.rs @@ -1,10 +1,12 @@ // Copyright (c) 2022-present INESC-ID. // Distributed under the MIT license that can be found in the LICENSE file. -use crate::{ByteRepr, Copyable, Destructible, Ptr, Record, ZeroInitialization}; +use crate::{ByteRepr, Copyable, Destructible, Ptr, Record, TriviallyCopyable, ZeroInitialization}; use std::mem::{offset_of, size_of}; -#[derive(Clone, Default, Record, ByteRepr, ZeroInitialization, Copyable, Destructible)] +#[derive( + Clone, Default, Record, ByteRepr, ZeroInitialization, Copyable, Destructible, TriviallyCopyable, +)] #[byte_size(size_of::<::libc::passwd>())] pub struct Passwd { #[offset(offset_of!(::libc::passwd, pw_name))] diff --git a/rules/select/shim.rs b/rules/select/shim.rs index 12d904b086..073acc4ffc 100644 --- a/rules/select/shim.rs +++ b/rules/select/shim.rs @@ -3,9 +3,9 @@ use std::collections::BTreeSet; -use crate::{Copyable, Destructible}; +use crate::{Copyable, Destructible, TriviallyCopyable}; -#[derive(Clone, Default, Copyable, Destructible)] +#[derive(Clone, Default, Copyable, Destructible, TriviallyCopyable)] pub struct CFdSet { fds: BTreeSet, } diff --git a/rules/socket/shim.rs b/rules/socket/shim.rs index baf2cc1242..302995516f 100644 --- a/rules/socket/shim.rs +++ b/rules/socket/shim.rs @@ -2,11 +2,14 @@ // Distributed under the MIT license that can be found in the LICENSE file. use crate::{ - ByteRepr, CChar, Copyable, Destructible, In6Addr, InAddr, Ptr, Record, ZeroInitialization, + ByteRepr, CChar, Copyable, Destructible, In6Addr, InAddr, Ptr, Record, TriviallyCopyable, + ZeroInitialization, }; // The fields are at the offsets of the byte representation below. -#[derive(Clone, Record, ByteRepr, ZeroInitialization, Copyable, Destructible)] +#[derive( + Clone, Record, ByteRepr, ZeroInitialization, Copyable, Destructible, TriviallyCopyable, +)] #[byte_size(16)] pub struct Sockaddr { #[offset(0)] @@ -17,7 +20,9 @@ pub struct Sockaddr { pub sa_data: Box<[i8]>, } -#[derive(Clone, Record, ByteRepr, ZeroInitialization, Copyable, Destructible)] +#[derive( + Clone, Record, ByteRepr, ZeroInitialization, Copyable, Destructible, TriviallyCopyable, +)] #[byte_size(16)] pub struct SockaddrIn { #[offset(0)] @@ -32,7 +37,9 @@ pub struct SockaddrIn { pub sin_zero: Box<[u8]>, } -#[derive(Clone, Default, Record, ByteRepr, ZeroInitialization, Copyable, Destructible)] +#[derive( + Clone, Default, Record, ByteRepr, ZeroInitialization, Copyable, Destructible, TriviallyCopyable, +)] #[byte_size(28)] pub struct SockaddrIn6 { #[offset(0)] @@ -47,7 +54,9 @@ pub struct SockaddrIn6 { pub sin6_scope_id: u32, } -#[derive(Clone, Record, ByteRepr, ZeroInitialization, Copyable, Destructible)] +#[derive( + Clone, Record, ByteRepr, ZeroInitialization, Copyable, Destructible, TriviallyCopyable, +)] #[byte_size(110)] pub struct SockaddrUn { #[offset(0)] @@ -58,7 +67,9 @@ pub struct SockaddrUn { pub sun_path: Box<[i8]>, } -#[derive(Clone, Record, ByteRepr, ZeroInitialization, Copyable, Destructible)] +#[derive( + Clone, Record, ByteRepr, ZeroInitialization, Copyable, Destructible, TriviallyCopyable, +)] #[byte_size(128)] pub struct SockaddrStorage { #[offset(0)] diff --git a/rules/stat/shim.rs b/rules/stat/shim.rs index 84e5e1ba09..5d539b41ef 100644 --- a/rules/stat/shim.rs +++ b/rules/stat/shim.rs @@ -1,10 +1,10 @@ // Copyright (c) 2022-present INESC-ID. // Distributed under the MIT license that can be found in the LICENSE file. -use crate::{ByteRepr, Copyable, Destructible, Record, ZeroInitialization}; +use crate::{ByteRepr, Copyable, Destructible, Record, TriviallyCopyable, ZeroInitialization}; use std::mem::{offset_of, size_of}; -#[derive(Clone, Default, Record, ZeroInitialization, Copyable, Destructible)] +#[derive(Clone, Default, Record, ZeroInitialization, Copyable, Destructible, TriviallyCopyable)] // The fields have the sizes of those of libc::stat only in x86-64 Linux. #[cfg_attr( all(target_os = "linux", target_arch = "x86_64"), diff --git a/rules/termios/shim.rs b/rules/termios/shim.rs index 94d6b0bcea..9a8da3586d 100644 --- a/rules/termios/shim.rs +++ b/rules/termios/shim.rs @@ -1,10 +1,12 @@ // Copyright (c) 2022-present INESC-ID. // Distributed under the MIT license that can be found in the LICENSE file. -use crate::{ByteRepr, Copyable, Destructible, Record, ZeroInitialization}; +use crate::{ByteRepr, Copyable, Destructible, Record, TriviallyCopyable, ZeroInitialization}; use std::mem::{offset_of, size_of}; -#[derive(Clone, Record, ByteRepr, ZeroInitialization, Copyable, Destructible)] +#[derive( + Clone, Record, ByteRepr, ZeroInitialization, Copyable, Destructible, TriviallyCopyable, +)] #[byte_size(size_of::<::libc::termios>())] pub struct Termios { #[offset(offset_of!(::libc::termios, c_iflag))] @@ -105,7 +107,9 @@ impl Termios { } } -#[derive(Clone, Default, Record, ByteRepr, ZeroInitialization, Copyable, Destructible)] +#[derive( + Clone, Default, Record, ByteRepr, ZeroInitialization, Copyable, Destructible, TriviallyCopyable, +)] #[byte_size(size_of::<::libc::winsize>())] pub struct Winsize { #[offset(offset_of!(::libc::winsize, ws_row))] diff --git a/rules/time/shim.rs b/rules/time/shim.rs index 848c6f33e0..c17d9def98 100644 --- a/rules/time/shim.rs +++ b/rules/time/shim.rs @@ -1,10 +1,12 @@ // Copyright (c) 2022-present INESC-ID. // Distributed under the MIT license that can be found in the LICENSE file. -use crate::{ByteRepr, Copyable, Destructible, Ptr, Record, ZeroInitialization}; +use crate::{ByteRepr, Copyable, Destructible, Ptr, Record, TriviallyCopyable, ZeroInitialization}; use std::mem::{offset_of, size_of}; -#[derive(Clone, Default, Record, ByteRepr, ZeroInitialization, Copyable, Destructible)] +#[derive( + Clone, Default, Record, ByteRepr, ZeroInitialization, Copyable, Destructible, TriviallyCopyable, +)] #[byte_size(size_of::<::libc::tm>())] pub struct Tm { #[offset(offset_of!(::libc::tm, tm_sec))] @@ -65,7 +67,9 @@ impl Tm { } } -#[derive(Clone, Default, Record, ByteRepr, ZeroInitialization, Copyable, Destructible)] +#[derive( + Clone, Default, Record, ByteRepr, ZeroInitialization, Copyable, Destructible, TriviallyCopyable, +)] #[byte_size(size_of::<::libc::timeval>())] pub struct Timeval { #[offset(offset_of!(::libc::timeval, tv_sec))] @@ -74,7 +78,9 @@ pub struct Timeval { pub tv_usec: i64, } -#[derive(Clone, Default, Record, ByteRepr, ZeroInitialization, Copyable, Destructible)] +#[derive( + Clone, Default, Record, ByteRepr, ZeroInitialization, Copyable, Destructible, TriviallyCopyable, +)] #[byte_size(size_of::<::libc::timespec>())] pub struct Timespec { #[offset(offset_of!(::libc::timespec, tv_sec))] diff --git a/rules/unique_ptr/shim.rs b/rules/unique_ptr/shim.rs index 0a72190545..264aad2598 100644 --- a/rules/unique_ptr/shim.rs +++ b/rules/unique_ptr/shim.rs @@ -16,12 +16,6 @@ where let value = src.with_mut(Option::take); this.with_mut(|dst| *dst = value); } - - const BY_VALUE: bool = true; - - fn moved_value(src: &mut Self) -> Self { - src.take() - } } impl MoveAssignable for Option> @@ -33,12 +27,6 @@ where this.with_mut(|dst| *dst = value); this.clone() } - - const BY_VALUE: bool = true; - - fn moved_value(src: &mut Self) -> Self { - src.take() - } } impl MoveConstructibleUnsafe for Option> { diff --git a/rules/vector/tgt_refcount.rs b/rules/vector/tgt_refcount.rs index f024f74226..5acdfc89eb 100644 --- a/rules/vector/tgt_refcount.rs +++ b/rules/vector/tgt_refcount.rs @@ -110,7 +110,7 @@ fn f99(a0: &Vec) -> &T1 { &a0[__n] } -fn f101>( +fn f101>( a0: Ptr>, a1: RandomAccessIterator, a2: T3, diff --git a/tests/multi-file/cross_tu_tag_collision/out/refcount/cross_tu_tag_collision.rs b/tests/multi-file/cross_tu_tag_collision/out/refcount/cross_tu_tag_collision.rs index 19a771fe6d..5c311790a0 100644 --- a/tests/multi-file/cross_tu_tag_collision/out/refcount/cross_tu_tag_collision.rs +++ b/tests/multi-file/cross_tu_tag_collision/out/refcount/cross_tu_tag_collision.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/multi-file/cross_tu_tag_collision/out/unsafe/cross_tu_tag_collision.rs b/tests/multi-file/cross_tu_tag_collision/out/unsafe/cross_tu_tag_collision.rs index 5433370a74..ef183d5c63 100644 --- a/tests/multi-file/cross_tu_tag_collision/out/unsafe/cross_tu_tag_collision.rs +++ b/tests/multi-file/cross_tu_tag_collision/out/unsafe/cross_tu_tag_collision.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/multi-file/friend_operator/out/refcount/friend_operator.rs b/tests/multi-file/friend_operator/out/refcount/friend_operator.rs index 5fea9b06fb..97e152af25 100644 --- a/tests/multi-file/friend_operator/out/refcount/friend_operator.rs +++ b/tests/multi-file/friend_operator/out/refcount/friend_operator.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/multi-file/friend_operator/out/unsafe/friend_operator.rs b/tests/multi-file/friend_operator/out/unsafe/friend_operator.rs index a200a83083..7775249db4 100644 --- a/tests/multi-file/friend_operator/out/unsafe/friend_operator.rs +++ b/tests/multi-file/friend_operator/out/unsafe/friend_operator.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/multi-file/opaque_forward_decl/out/refcount/opaque_forward_decl.rs b/tests/multi-file/opaque_forward_decl/out/refcount/opaque_forward_decl.rs index 9fe6482f96..19c7b228ec 100644 --- a/tests/multi-file/opaque_forward_decl/out/refcount/opaque_forward_decl.rs +++ b/tests/multi-file/opaque_forward_decl/out/refcount/opaque_forward_decl.rs @@ -7,7 +7,16 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(16)] pub struct container { diff --git a/tests/multi-file/opaque_forward_decl/out/unsafe/opaque_forward_decl.rs b/tests/multi-file/opaque_forward_decl/out/unsafe/opaque_forward_decl.rs index c7a550cfd7..009993f635 100644 --- a/tests/multi-file/opaque_forward_decl/out/unsafe/opaque_forward_decl.rs +++ b/tests/multi-file/opaque_forward_decl/out/unsafe/opaque_forward_decl.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/multi-file/out_of_line_methods_cross_tu/out/refcount/out_of_line_methods_cross_tu.rs b/tests/multi-file/out_of_line_methods_cross_tu/out/refcount/out_of_line_methods_cross_tu.rs index 7c047c4f92..2bf8d478a8 100644 --- a/tests/multi-file/out_of_line_methods_cross_tu/out/refcount/out_of_line_methods_cross_tu.rs +++ b/tests/multi-file/out_of_line_methods_cross_tu/out/refcount/out_of_line_methods_cross_tu.rs @@ -47,6 +47,7 @@ pub struct Derived { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/multi-file/out_of_line_methods_cross_tu/out/unsafe/out_of_line_methods_cross_tu.rs b/tests/multi-file/out_of_line_methods_cross_tu/out/unsafe/out_of_line_methods_cross_tu.rs index fd2af93f04..9bc0b0d2b5 100644 --- a/tests/multi-file/out_of_line_methods_cross_tu/out/unsafe/out_of_line_methods_cross_tu.rs +++ b/tests/multi-file/out_of_line_methods_cross_tu/out/unsafe/out_of_line_methods_cross_tu.rs @@ -48,6 +48,7 @@ impl Derived {} FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/multi-file/template_method_late_instantiation/out/refcount/template_method_late_instantiation.rs b/tests/multi-file/template_method_late_instantiation/out/refcount/template_method_late_instantiation.rs index 9124bb3a3f..d8fd3e3dd1 100644 --- a/tests/multi-file/template_method_late_instantiation/out/refcount/template_method_late_instantiation.rs +++ b/tests/multi-file/template_method_late_instantiation/out/refcount/template_method_late_instantiation.rs @@ -7,7 +7,16 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, + Copy, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, )] #[byte_size(4)] pub struct S_int_ { diff --git a/tests/multi-file/template_method_late_instantiation/out/unsafe/template_method_late_instantiation.rs b/tests/multi-file/template_method_late_instantiation/out/unsafe/template_method_late_instantiation.rs index 492d0f2a0b..bf8be3fe8f 100644 --- a/tests/multi-file/template_method_late_instantiation/out/unsafe/template_method_late_instantiation.rs +++ b/tests/multi-file/template_method_late_instantiation/out/unsafe/template_method_late_instantiation.rs @@ -8,7 +8,14 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + VaArg, + FnPtrArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub struct S_int_ { pub x: i32, diff --git a/tests/std/basic/basic.def.odr/p14-class-in-two-files/out/refcount/p14-class-in-two-files.rs b/tests/std/basic/basic.def.odr/p14-class-in-two-files/out/refcount/p14-class-in-two-files.rs index ef83a8227c..713d890444 100644 --- a/tests/std/basic/basic.def.odr/p14-class-in-two-files/out/refcount/p14-class-in-two-files.rs +++ b/tests/std/basic/basic.def.odr/p14-class-in-two-files/out/refcount/p14-class-in-two-files.rs @@ -120,6 +120,7 @@ thread_local!( VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/std/basic/basic.def.odr/p14-class-in-two-files/out/unsafe/p14-class-in-two-files.rs b/tests/std/basic/basic.def.odr/p14-class-in-two-files/out/unsafe/p14-class-in-two-files.rs index 6949546a0a..af3d18159e 100644 --- a/tests/std/basic/basic.def.odr/p14-class-in-two-files/out/unsafe/p14-class-in-two-files.rs +++ b/tests/std/basic/basic.def.odr/p14-class-in-two-files/out/unsafe/p14-class-in-two-files.rs @@ -111,6 +111,7 @@ pub static mut shared_5: std::cell::LazyCell = FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/std/basic/basic.def.odr/p15-class-template-static-member/out/refcount/p15-class-template-static-member.rs b/tests/std/basic/basic.def.odr/p15-class-template-static-member/out/refcount/p15-class-template-static-member.rs index ef4bdaac4b..4d53fc0de4 100644 --- a/tests/std/basic/basic.def.odr/p15-class-template-static-member/out/refcount/p15-class-template-static-member.rs +++ b/tests/std/basic/basic.def.odr/p15-class-template-static-member/out/refcount/p15-class-template-static-member.rs @@ -100,6 +100,7 @@ thread_local!( VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -127,6 +128,7 @@ thread_local!( VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/std/basic/basic.def.odr/p15-class-template-static-member/out/unsafe/p15-class-template-static-member.rs b/tests/std/basic/basic.def.odr/p15-class-template-static-member/out/unsafe/p15-class-template-static-member.rs index 58b801c5b0..cd660fcc43 100644 --- a/tests/std/basic/basic.def.odr/p15-class-template-static-member/out/unsafe/p15-class-template-static-member.rs +++ b/tests/std/basic/basic.def.odr/p15-class-template-static-member/out/unsafe/p15-class-template-static-member.rs @@ -91,6 +91,7 @@ pub static mut member_4: std::cell::LazyCell = FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -117,6 +118,7 @@ pub static mut member_5: std::cell::LazyCell = FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/std/basic/basic.def.odr/p15-function-template/out/refcount/p15-function-template.rs b/tests/std/basic/basic.def.odr/p15-function-template/out/refcount/p15-function-template.rs index d9c8e65b23..72893db9db 100644 --- a/tests/std/basic/basic.def.odr/p15-function-template/out/refcount/p15-function-template.rs +++ b/tests/std/basic/basic.def.odr/p15-function-template/out/refcount/p15-function-template.rs @@ -182,6 +182,7 @@ fn main_0() -> i32 { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -224,6 +225,7 @@ pub fn b_count_local_15() -> i32 { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/std/basic/basic.def.odr/p15-function-template/out/unsafe/p15-function-template.rs b/tests/std/basic/basic.def.odr/p15-function-template/out/unsafe/p15-function-template.rs index 2e0c0a4356..b5b644253a 100644 --- a/tests/std/basic/basic.def.odr/p15-function-template/out/unsafe/p15-function-template.rs +++ b/tests/std/basic/basic.def.odr/p15-function-template/out/unsafe/p15-function-template.rs @@ -168,6 +168,7 @@ unsafe fn main_0() -> i32 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -206,6 +207,7 @@ pub unsafe fn b_count_local_15() -> i32 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/std/basic/basic.def.odr/p16-default-argument-lambda-in-class/out/refcount/p16-default-argument-lambda-in-class.rs b/tests/std/basic/basic.def.odr/p16-default-argument-lambda-in-class/out/refcount/p16-default-argument-lambda-in-class.rs index e2112a32a9..012e5464b3 100644 --- a/tests/std/basic/basic.def.odr/p16-default-argument-lambda-in-class/out/refcount/p16-default-argument-lambda-in-class.rs +++ b/tests/std/basic/basic.def.odr/p16-default-argument-lambda-in-class/out/refcount/p16-default-argument-lambda-in-class.rs @@ -98,6 +98,7 @@ impl Destructible for AssertsDtorCountAtExit { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/std/basic/basic.def.odr/p16-default-argument-lambda-in-class/out/unsafe/p16-default-argument-lambda-in-class.rs b/tests/std/basic/basic.def.odr/p16-default-argument-lambda-in-class/out/unsafe/p16-default-argument-lambda-in-class.rs index 4665caa9f5..a5f35ff799 100644 --- a/tests/std/basic/basic.def.odr/p16-default-argument-lambda-in-class/out/unsafe/p16-default-argument-lambda-in-class.rs +++ b/tests/std/basic/basic.def.odr/p16-default-argument-lambda-in-class/out/unsafe/p16-default-argument-lambda-in-class.rs @@ -87,6 +87,7 @@ impl DestructibleUnsafe for AssertsDtorCountAtExit { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/std/basic/basic.link/out/refcount/basic.link.rs b/tests/std/basic/basic.link/out/refcount/basic.link.rs index 1dae912268..bd73d8a906 100644 --- a/tests/std/basic/basic.link/out/refcount/basic.link.rs +++ b/tests/std/basic/basic.link/out/refcount/basic.link.rs @@ -29,7 +29,9 @@ pub fn test_11() { assert!((ceiling_10.with(|rc| *rc.borrow()) == 40)); assert!(((ceiling_10.with(|v| v.as_pointer())) == ({ ceiling_address_in_b_12() }))); } -#[derive(VaArg, FnPtrArg, Destructible, Copyable, ByteRepr, Clone, ZeroInitialization)] +#[derive( + VaArg, FnPtrArg, Destructible, TriviallyCopyable, Copyable, ByteRepr, Clone, ZeroInitialization, +)] #[byte_size(4)] pub struct anon_13 { #[offset(0)] @@ -68,7 +70,16 @@ pub fn bump_18() -> i32 { return (*(*counter_17.with(Value::clone).borrow_mut()).prefix_inc()); } #[derive( - Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, + Copy, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, )] #[byte_size(4)] pub struct Record_19 { @@ -114,6 +125,7 @@ pub fn test_29() { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -137,6 +149,7 @@ pub fn test_33() { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -208,7 +221,16 @@ pub fn test_55() { assert!((({ key_in_b_56() }) == 400)); } #[derive( - Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, + Copy, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, )] #[byte_size(4)] pub struct Entry_52 { @@ -221,7 +243,16 @@ impl Default for Entry_52 { } } #[derive( - Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, + Copy, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, )] #[byte_size(8)] pub struct Entry_54 { @@ -294,7 +325,9 @@ thread_local!( pub fn ceiling_address_in_b_12() -> Ptr { return (ceiling_10.with(|v| v.as_pointer())); } -#[derive(VaArg, FnPtrArg, Destructible, Copyable, ByteRepr, Clone, ZeroInitialization)] +#[derive( + VaArg, FnPtrArg, Destructible, TriviallyCopyable, Copyable, ByteRepr, Clone, ZeroInitialization, +)] #[byte_size(4)] pub struct anon_62 { #[offset(0)] @@ -333,7 +366,16 @@ pub fn bump_64() -> i32 { return (*(*counter_63.with(Value::clone).borrow_mut()).prefix_inc()); } #[derive( - Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, + Copy, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, )] #[byte_size(16)] pub struct Record_65 { @@ -387,6 +429,7 @@ pub fn raise_30(mut by: i32) -> i32 { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -432,7 +475,16 @@ pub fn key_in_b_56() -> i32 { return (entry.key as i32); } #[derive( - Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, + Copy, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, )] #[byte_size(8)] pub struct Entry_71 { diff --git a/tests/std/basic/basic.link/out/unsafe/basic.link.rs b/tests/std/basic/basic.link/out/unsafe/basic.link.rs index 4109990271..086abcefc6 100644 --- a/tests/std/basic/basic.link/out/unsafe/basic.link.rs +++ b/tests/std/basic/basic.link/out/unsafe/basic.link.rs @@ -38,7 +38,14 @@ pub unsafe fn test_11() { } #[repr(C)] #[derive( - Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + FnPtrArg, + VaArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub union anon_13 { pub whole: i32, @@ -63,7 +70,14 @@ pub unsafe fn bump_18() -> i32 { } #[repr(C)] #[derive( - Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + VaArg, + FnPtrArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub struct Record_19 { pub id: i32, @@ -104,6 +118,7 @@ pub unsafe fn test_29() { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -129,6 +144,7 @@ pub unsafe fn test_33() { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -194,7 +210,14 @@ pub unsafe fn test_55() { } #[repr(C)] #[derive( - Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + VaArg, + FnPtrArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub struct Entry_52 { pub key: i32, @@ -206,7 +229,14 @@ impl Default for Entry_52 { } #[repr(C)] #[derive( - Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + VaArg, + FnPtrArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub struct Entry_54 { pub key: i32, @@ -270,7 +300,14 @@ pub unsafe fn ceiling_address_in_b_12() -> *const i32 { } #[repr(C)] #[derive( - Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + FnPtrArg, + VaArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub union anon_62 { pub whole: i32, @@ -295,7 +332,14 @@ pub unsafe fn bump_64() -> i32 { } #[repr(C)] #[derive( - Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + VaArg, + FnPtrArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub struct Record_65 { pub id: i64, @@ -340,6 +384,7 @@ pub unsafe fn raise_30(mut by: i32) -> i32 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -381,7 +426,14 @@ pub unsafe fn key_in_b_56() -> i32 { } #[repr(C)] #[derive( - Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + VaArg, + FnPtrArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub struct Entry_71 { pub key: i64, diff --git a/tests/std/basic/basic.scope/out/refcount/basic.scope.class.rs b/tests/std/basic/basic.scope/out/refcount/basic.scope.class.rs index 737c83c38b..7e97f8c466 100644 --- a/tests/std/basic/basic.scope/out/refcount/basic.scope.class.rs +++ b/tests/std/basic/basic.scope/out/refcount/basic.scope.class.rs @@ -10,7 +10,16 @@ thread_local!( pub static balance_0: Value = Rc::new(RefCell::new(50)); ); #[derive( - Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, + Copy, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, )] #[byte_size(4)] pub struct p1_member_hides_namespace_variable_HasBalance { @@ -48,7 +57,16 @@ thread_local!( pub static initial_2: Value = Rc::new(RefCell::new(100)); ); #[derive( - Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, + Copy, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, )] #[byte_size(4)] pub struct p1_out_of_class_definition_is_in_class_scope_HasStaticTotal { diff --git a/tests/std/basic/basic.scope/out/refcount/basic.scope.param.rs b/tests/std/basic/basic.scope/out/refcount/basic.scope.param.rs index 3f1bddfcd1..2e05fd740d 100644 --- a/tests/std/basic/basic.scope/out/refcount/basic.scope.param.rs +++ b/tests/std/basic/basic.scope/out/refcount/basic.scope.param.rs @@ -16,6 +16,7 @@ use std::rc::{Rc, Weak}; FnPtrArg, CppFrom, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/std/basic/basic.scope/out/refcount/basic.scope.pdecl.rs b/tests/std/basic/basic.scope/out/refcount/basic.scope.pdecl.rs index 4410e21194..62cff58f5d 100644 --- a/tests/std/basic/basic.scope/out/refcount/basic.scope.pdecl.rs +++ b/tests/std/basic/basic.scope/out/refcount/basic.scope.pdecl.rs @@ -19,7 +19,16 @@ pub fn test_0() { assert!((level == 5)); } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(16)] pub struct p1_own_address_in_initializer_SelfLinked { @@ -75,7 +84,17 @@ pub fn test_3() { pub type anon_4 = u32; pub const anon_4_limit: anon_4 = 13; pub const anon_4_above: anon_4 = 14; -#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable)] +#[derive( + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, +)] #[byte_size(8)] pub struct p9_func_declared_before_function_body_RecordsConstructorName { #[offset(0)] diff --git a/tests/std/basic/basic.scope/out/refcount/basic.scope.scope.rs b/tests/std/basic/basic.scope/out/refcount/basic.scope.scope.rs index fe2c5213a7..2c8f487212 100644 --- a/tests/std/basic/basic.scope/out/refcount/basic.scope.scope.rs +++ b/tests/std/basic/basic.scope/out/refcount/basic.scope.scope.rs @@ -53,6 +53,7 @@ pub const p2_11_unscoped_enumerator_in_both_scopes_HasUnscopedEnum_Size_large: VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -92,6 +93,7 @@ thread_local!( VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -110,7 +112,9 @@ pub fn test_7() { count_6.with(|rc| *rc.borrow_mut() = 6); assert!((count_6.with(|rc| *rc.borrow()) == 6)); } -#[derive(VaArg, FnPtrArg, Destructible, Copyable, ByteRepr, Clone, ZeroInitialization)] +#[derive( + VaArg, FnPtrArg, Destructible, TriviallyCopyable, Copyable, ByteRepr, Clone, ZeroInitialization, +)] #[byte_size(8)] pub struct anon_8 { #[offset(0)] @@ -136,7 +140,9 @@ impl Default for anon_8 { thread_local!( pub static anon_8: Value = Rc::new(RefCell::new(::default())); ); -#[derive(VaArg, FnPtrArg, Destructible, Copyable, ByteRepr, Clone, ZeroInitialization)] +#[derive( + VaArg, FnPtrArg, Destructible, TriviallyCopyable, Copyable, ByteRepr, Clone, ZeroInitialization, +)] #[byte_size(8)] pub struct anon_9 { #[offset(0)] @@ -160,7 +166,16 @@ impl Default for anon_9 { } } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(16)] pub struct p2_13_anonymous_union_members_in_parent_scope_HasAnonymousUnion { @@ -197,7 +212,9 @@ pub fn test_10() { anon_11::block_ratio(anon_11.as_pointer()).write(0.75_f64); assert!(((anon_11::block_ratio(anon_11.as_pointer()).read()) == 0.75_f64)); } -#[derive(VaArg, FnPtrArg, Destructible, Copyable, ByteRepr, Clone, ZeroInitialization)] +#[derive( + VaArg, FnPtrArg, Destructible, TriviallyCopyable, Copyable, ByteRepr, Clone, ZeroInitialization, +)] #[byte_size(8)] pub struct anon_11 { #[offset(0)] @@ -221,7 +238,16 @@ impl Default for anon_11 { } } #[derive( - Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, + Copy, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, )] #[byte_size(8)] pub struct p3_2_const_qualified_member_is_distinct_HasConstOverload { @@ -267,7 +293,16 @@ thread_local!( pub static rvalue_calls_14: Value = Rc::new(RefCell::new(0)); ); #[derive( - Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, + Copy, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, )] #[byte_size(4)] pub struct p3_2_explicit_object_and_rvalue_members_are_distinct_HasExplicitObjectOverload { @@ -319,6 +354,7 @@ thread_local!( VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -360,7 +396,16 @@ pub fn test_18() { assert!((rvalue_calls_17.with(|rc| *rc.borrow()) == 2)); } #[derive( - Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, + Copy, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, )] #[byte_size(8)] pub struct p3_4_const_qualified_member_templates_are_distinct_HasConstTemplateOverload { @@ -417,6 +462,7 @@ thread_local!( VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -458,6 +504,7 @@ thread_local!( VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -476,6 +523,7 @@ pub fn shared_friend_24() -> i32 { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -519,6 +567,7 @@ thread_local!( VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -548,6 +597,7 @@ pub fn test_33() { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/std/basic/basic.scope/out/unsafe/basic.scope.class.rs b/tests/std/basic/basic.scope/out/unsafe/basic.scope.class.rs index cd37496ec4..185ac5c328 100644 --- a/tests/std/basic/basic.scope/out/unsafe/basic.scope.class.rs +++ b/tests/std/basic/basic.scope/out/unsafe/basic.scope.class.rs @@ -9,7 +9,14 @@ use std::rc::Rc; pub static mut balance_0: std::cell::LazyCell = std::cell::LazyCell::new(|| unsafe { 50 }); #[repr(C)] #[derive( - Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + VaArg, + FnPtrArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub struct p1_member_hides_namespace_variable_HasBalance { pub balance: i32, @@ -49,7 +56,14 @@ pub unsafe fn test_1() { pub static mut initial_2: std::cell::LazyCell = std::cell::LazyCell::new(|| unsafe { 100 }); #[repr(C)] #[derive( - Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + VaArg, + FnPtrArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub struct p1_out_of_class_definition_is_in_class_scope_HasStaticTotal { pub held: i32, diff --git a/tests/std/basic/basic.scope/out/unsafe/basic.scope.param.rs b/tests/std/basic/basic.scope/out/unsafe/basic.scope.param.rs index 0fc55732c1..7e484fe663 100644 --- a/tests/std/basic/basic.scope/out/unsafe/basic.scope.param.rs +++ b/tests/std/basic/basic.scope/out/unsafe/basic.scope.param.rs @@ -15,6 +15,7 @@ use std::rc::Rc; ZeroInitializationUnsafe, CppFromUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/std/basic/basic.scope/out/unsafe/basic.scope.pdecl.rs b/tests/std/basic/basic.scope/out/unsafe/basic.scope.pdecl.rs index b7f9f43662..97a8abcc88 100644 --- a/tests/std/basic/basic.scope/out/unsafe/basic.scope.pdecl.rs +++ b/tests/std/basic/basic.scope/out/unsafe/basic.scope.pdecl.rs @@ -26,6 +26,7 @@ pub unsafe fn test_0() { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -82,7 +83,14 @@ pub const anon_4_limit: anon_4 = 13; pub const anon_4_above: anon_4 = 14; #[repr(C)] #[derive( - Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + VaArg, + FnPtrArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub struct p9_func_declared_before_function_body_RecordsConstructorName { pub name: *const libc::c_char, diff --git a/tests/std/basic/basic.scope/out/unsafe/basic.scope.scope.rs b/tests/std/basic/basic.scope/out/unsafe/basic.scope.scope.rs index c149f64d3d..9d9922f18d 100644 --- a/tests/std/basic/basic.scope/out/unsafe/basic.scope.scope.rs +++ b/tests/std/basic/basic.scope/out/unsafe/basic.scope.scope.rs @@ -49,6 +49,7 @@ pub const p2_11_unscoped_enumerator_in_both_scopes_HasUnscopedEnum_Size_large: FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -85,6 +86,7 @@ pub static mut count_6: std::cell::LazyCell = std::cell::LazyCell::new(|| u FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -104,7 +106,14 @@ pub unsafe fn test_7() { } #[repr(C)] #[derive( - Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + FnPtrArg, + VaArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub union anon_8 { pub namespace_count: i32, @@ -119,7 +128,14 @@ pub static mut anon_8: std::cell::LazyCell = std::cell::LazyCell::new(|| unsafe { ::default() }); #[repr(C)] #[derive( - Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + FnPtrArg, + VaArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub union anon_9 { pub member_count: i32, @@ -138,6 +154,7 @@ impl Default for anon_9 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -178,7 +195,14 @@ pub unsafe fn test_10() { } #[repr(C)] #[derive( - Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + FnPtrArg, + VaArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub union anon_11 { pub block_count: i32, @@ -191,7 +215,14 @@ impl Default for anon_11 { } #[repr(C)] #[derive( - Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + VaArg, + FnPtrArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub struct p3_2_const_qualified_member_is_distinct_HasConstOverload { pub plain_calls: i32, @@ -241,7 +272,14 @@ pub static mut rvalue_calls_14: std::cell::LazyCell = std::cell::LazyCell::new(|| unsafe { 0 }); #[repr(C)] #[derive( - Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + VaArg, + FnPtrArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub struct p3_2_explicit_object_and_rvalue_members_are_distinct_HasExplicitObjectOverload { pub base: i32, @@ -301,6 +339,7 @@ pub static mut rvalue_calls_17: std::cell::LazyCell = FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -344,7 +383,14 @@ pub unsafe fn test_18() { } #[repr(C)] #[derive( - Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + VaArg, + FnPtrArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub struct p3_4_const_qualified_member_templates_are_distinct_HasConstTemplateOverload { pub plain_calls: i32, @@ -408,6 +454,7 @@ pub static mut rvalue_calls_21: std::cell::LazyCell = FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -456,6 +503,7 @@ pub static mut friend_calls_23: std::cell::LazyCell = FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -472,6 +520,7 @@ pub unsafe fn shared_friend_24() -> i32 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -510,6 +559,7 @@ pub static mut function_calls_31: std::cell::LazyCell = FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -536,6 +586,7 @@ pub unsafe fn test_33() { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/std/basic/basic.start/out/refcount/basic.start.term.rs b/tests/std/basic/basic.start/out/refcount/basic.start.term.rs index 3cc313e68c..1f88e9c135 100644 --- a/tests/std/basic/basic.start/out/refcount/basic.start.term.rs +++ b/tests/std/basic/basic.start/out/refcount/basic.start.term.rs @@ -36,6 +36,7 @@ pub struct HoldsTracker { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -135,6 +136,7 @@ thread_local!( VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/std/basic/basic.start/out/unsafe/basic.start.term.rs b/tests/std/basic/basic.start/out/unsafe/basic.start.term.rs index b83dfbcfef..1ceaee2910 100644 --- a/tests/std/basic/basic.start/out/unsafe/basic.start.term.rs +++ b/tests/std/basic/basic.start/out/unsafe/basic.start.term.rs @@ -41,6 +41,7 @@ pub struct HoldsTracker { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -140,6 +141,7 @@ pub static mut trivial_9: std::cell::LazyCell = FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/std/basic/basic.types/out/refcount/basic.types.general.rs b/tests/std/basic/basic.types/out/refcount/basic.types.general.rs index a3dc69da99..3005814bb7 100644 --- a/tests/std/basic/basic.types/out/refcount/basic.types.general.rs +++ b/tests/std/basic/basic.types/out/refcount/basic.types.general.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -89,6 +90,7 @@ pub fn test_0() { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/std/basic/basic.types/out/unsafe/basic.types.general.rs b/tests/std/basic/basic.types/out/unsafe/basic.types.general.rs index db0fc740f3..709fe23bfe 100644 --- a/tests/std/basic/basic.types/out/unsafe/basic.types.general.rs +++ b/tests/std/basic/basic.types/out/unsafe/basic.types.general.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -92,6 +93,7 @@ pub unsafe fn test_0() { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/std/class/class.init/out/refcount/class.base.init.rs b/tests/std/class/class.init/out/refcount/class.base.init.rs index 4d521ec95c..cebf9ba41a 100644 --- a/tests/std/class/class.init/out/refcount/class.base.init.rs +++ b/tests/std/class/class.init/out/refcount/class.base.init.rs @@ -16,6 +16,7 @@ use std::rc::{Rc, Weak}; FnPtrArg, CppFrom, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/std/class/class.init/out/unsafe/class.base.init.rs b/tests/std/class/class.init/out/unsafe/class.base.init.rs index d16a447fcb..bd7c07df2e 100644 --- a/tests/std/class/class.init/out/unsafe/class.base.init.rs +++ b/tests/std/class/class.init/out/unsafe/class.base.init.rs @@ -15,6 +15,7 @@ use std::rc::Rc; ZeroInitializationUnsafe, CppFromUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/std/class/class.mem/class.conv/out/refcount/class.conv.ctor.rs b/tests/std/class/class.mem/class.conv/out/refcount/class.conv.ctor.rs index 00a8221b95..1fe894b703 100644 --- a/tests/std/class/class.mem/class.conv/out/refcount/class.conv.ctor.rs +++ b/tests/std/class/class.mem/class.conv/out/refcount/class.conv.ctor.rs @@ -16,6 +16,7 @@ use std::rc::{Rc, Weak}; FnPtrArg, CppFrom, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/std/class/class.mem/class.conv/out/refcount/class.conv.fct.rs b/tests/std/class/class.mem/class.conv/out/refcount/class.conv.fct.rs index e8f37be34b..c4d37e8f4b 100644 --- a/tests/std/class/class.mem/class.conv/out/refcount/class.conv.fct.rs +++ b/tests/std/class/class.mem/class.conv/out/refcount/class.conv.fct.rs @@ -16,6 +16,7 @@ use std::rc::{Rc, Weak}; FnPtrArg, CppFrom, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/std/class/class.mem/class.conv/out/unsafe/class.conv.ctor.rs b/tests/std/class/class.mem/class.conv/out/unsafe/class.conv.ctor.rs index 82e36b9568..62c9e26469 100644 --- a/tests/std/class/class.mem/class.conv/out/unsafe/class.conv.ctor.rs +++ b/tests/std/class/class.mem/class.conv/out/unsafe/class.conv.ctor.rs @@ -20,6 +20,7 @@ impl p1_template_constructor_from_own_type_Probe { ZeroInitializationUnsafe, CppFromUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/std/class/class.mem/class.conv/out/unsafe/class.conv.fct.rs b/tests/std/class/class.mem/class.conv/out/unsafe/class.conv.fct.rs index 4bf4ef98d9..6b2dc69593 100644 --- a/tests/std/class/class.mem/class.conv/out/unsafe/class.conv.fct.rs +++ b/tests/std/class/class.mem/class.conv/out/unsafe/class.conv.fct.rs @@ -15,6 +15,7 @@ use std::rc::Rc; ZeroInitializationUnsafe, CppFromUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/std/class/class.mem/out/refcount/class.free.rs b/tests/std/class/class.mem/out/refcount/class.free.rs index 2463097288..4c090cf1ca 100644 --- a/tests/std/class/class.mem/out/refcount/class.free.rs +++ b/tests/std/class/class.mem/out/refcount/class.free.rs @@ -18,6 +18,7 @@ thread_local!( VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -66,6 +67,7 @@ thread_local!( VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/std/class/class.mem/out/refcount/class.mem.general.rs b/tests/std/class/class.mem/out/refcount/class.mem.general.rs index 658334d06e..3a7f3f07a0 100644 --- a/tests/std/class/class.mem/out/refcount/class.mem.general.rs +++ b/tests/std/class/class.mem/out/refcount/class.mem.general.rs @@ -15,7 +15,16 @@ pub fn minimum_1() -> i32 { pub type anon_2 = u32; pub const anon_2_reserve: anon_2 = 30; #[derive( - Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, + Copy, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, )] #[byte_size(4)] pub struct p7_1_function_body_names_later_member_HasLaterMembers { @@ -46,7 +55,16 @@ thread_local!( pub static step_5: Value = Rc::new(RefCell::new(4)); ); #[derive( - Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, + Copy, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, )] #[byte_size(4)] pub struct p7_2_default_argument_names_later_member_HasLaterStaticStep { diff --git a/tests/std/class/class.mem/out/unsafe/class.free.rs b/tests/std/class/class.mem/out/unsafe/class.free.rs index 38ed565fcf..b8e5fe53a6 100644 --- a/tests/std/class/class.mem/out/unsafe/class.free.rs +++ b/tests/std/class/class.mem/out/unsafe/class.free.rs @@ -15,6 +15,7 @@ pub static mut allocations_0: std::cell::LazyCell = std::cell::LazyCell::ne FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -58,6 +59,7 @@ pub static mut deallocations_2: std::cell::LazyCell = FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/std/class/class.mem/out/unsafe/class.mem.general.rs b/tests/std/class/class.mem/out/unsafe/class.mem.general.rs index 1c483add84..f935db7341 100644 --- a/tests/std/class/class.mem/out/unsafe/class.mem.general.rs +++ b/tests/std/class/class.mem/out/unsafe/class.mem.general.rs @@ -14,7 +14,14 @@ pub type anon_2 = u32; pub const anon_2_reserve: anon_2 = 30; #[repr(C)] #[derive( - Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + VaArg, + FnPtrArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub struct p7_1_function_body_names_later_member_HasLaterMembers { pub stock: i32, @@ -49,7 +56,14 @@ pub static mut step_4: std::cell::LazyCell = std::cell::LazyCell::new(|| un pub static mut step_5: std::cell::LazyCell = std::cell::LazyCell::new(|| unsafe { 4 }); #[repr(C)] #[derive( - Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + VaArg, + FnPtrArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub struct p7_2_default_argument_names_later_member_HasLaterStaticStep { pub total: i32, diff --git a/tests/std/dcl.dcl/dcl.decl/dcl.init/out/refcount/dcl.init.general-p6.2-padding-bits.rs b/tests/std/dcl.dcl/dcl.decl/dcl.init/out/refcount/dcl.init.general-p6.2-padding-bits.rs index 429b3a97c5..f476717a10 100644 --- a/tests/std/dcl.dcl/dcl.decl/dcl.init/out/refcount/dcl.init.general-p6.2-padding-bits.rs +++ b/tests/std/dcl.dcl/dcl.decl/dcl.init/out/refcount/dcl.init.general-p6.2-padding-bits.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -34,6 +35,7 @@ pub struct p6_2_zero_initialized_padding_Padded { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -53,6 +55,7 @@ pub struct p6_2_zero_initialized_padding_TailPadded { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/std/dcl.dcl/dcl.decl/dcl.init/out/refcount/dcl.init.general.rs b/tests/std/dcl.dcl/dcl.decl/dcl.init/out/refcount/dcl.init.general.rs index 0e9a6a96bb..2282bc8119 100644 --- a/tests/std/dcl.dcl/dcl.decl/dcl.init/out/refcount/dcl.init.general.rs +++ b/tests/std/dcl.dcl/dcl.decl/dcl.init/out/refcount/dcl.init.general.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -26,7 +27,16 @@ pub struct p6_1_zero_initialized_pointer_to_member_HasTwoInts { pub second: i32, } #[derive( - Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, + Copy, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, )] #[byte_size(8)] pub struct p6_1_zero_initialized_pointer_to_member_HoldsSelector { @@ -125,7 +135,16 @@ thread_local!( static counter_11: Value = Rc::new(RefCell::new(0_i32)); ); #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(24)] pub struct p6_2_zero_initialized_class_Inner { @@ -137,7 +156,17 @@ pub struct p6_2_zero_initialized_class_Inner { #[byte_size(8)] pub pointer: Ptr, } -#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable)] +#[derive( + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, +)] #[byte_size(96)] pub struct p6_2_zero_initialized_class_Outer { #[offset(0)] @@ -208,7 +237,9 @@ pub fn test_15() { ({ check_14((heap_outer).clone()) }); heap_outer.delete(); } -#[derive(VaArg, FnPtrArg, Destructible, Copyable, ByteRepr, Clone, ZeroInitialization)] +#[derive( + VaArg, FnPtrArg, Destructible, TriviallyCopyable, Copyable, ByteRepr, Clone, ZeroInitialization, +)] #[byte_size(8)] pub struct p6_3_zero_initialized_union_Number { #[offset(0)] @@ -254,6 +285,7 @@ pub fn test_17() { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -361,7 +393,16 @@ pub fn test_21() { heap_numbers.delete(); } #[derive( - Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, + Copy, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, )] #[byte_size(8)] pub struct p9_1_2_zero_then_default_initialized_WithDefaultMember { @@ -381,7 +422,16 @@ impl Default for p9_1_2_zero_then_default_initialized_WithDefaultMember { } } #[derive( - Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, + Copy, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, )] #[byte_size(4)] pub struct p9_1_2_zero_then_default_initialized_LeavesMemberAlone { @@ -413,6 +463,7 @@ impl Default for p9_1_2_zero_then_default_initialized_LeavesMemberAlone { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/std/dcl.dcl/dcl.decl/dcl.init/out/unsafe/dcl.init.general-p6.2-padding-bits.rs b/tests/std/dcl.dcl/dcl.decl/dcl.init/out/unsafe/dcl.init.general-p6.2-padding-bits.rs index 36f49890f4..2cd198bf83 100644 --- a/tests/std/dcl.dcl/dcl.decl/dcl.init/out/unsafe/dcl.init.general-p6.2-padding-bits.rs +++ b/tests/std/dcl.dcl/dcl.decl/dcl.init/out/unsafe/dcl.init.general-p6.2-padding-bits.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -29,6 +30,7 @@ pub struct p6_2_zero_initialized_padding_Padded { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -44,6 +46,7 @@ pub struct p6_2_zero_initialized_padding_TailPadded { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/std/dcl.dcl/dcl.decl/dcl.init/out/unsafe/dcl.init.general.rs b/tests/std/dcl.dcl/dcl.decl/dcl.init/out/unsafe/dcl.init.general.rs index 1245573adc..43a6942612 100644 --- a/tests/std/dcl.dcl/dcl.decl/dcl.init/out/unsafe/dcl.init.general.rs +++ b/tests/std/dcl.dcl/dcl.decl/dcl.init/out/unsafe/dcl.init.general.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -23,7 +24,14 @@ pub struct p6_1_zero_initialized_pointer_to_member_HasTwoInts { } #[repr(C)] #[derive( - Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + VaArg, + FnPtrArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub struct p6_1_zero_initialized_pointer_to_member_HoldsSelector { pub selector: isize, @@ -125,6 +133,7 @@ static mut counter_11: std::cell::LazyCell = std::cell::LazyCell::new(|| un FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -141,6 +150,7 @@ pub struct p6_2_zero_initialized_class_Inner { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -196,7 +206,14 @@ pub unsafe fn test_15() { } #[repr(C)] #[derive( - Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + FnPtrArg, + VaArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub union p6_3_zero_initialized_union_Number { pub integer: i32, @@ -223,6 +240,7 @@ pub unsafe fn test_17() { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -316,7 +334,14 @@ pub unsafe fn test_21() { } #[repr(C)] #[derive( - Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + VaArg, + FnPtrArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub struct p9_1_2_zero_then_default_initialized_WithDefaultMember { pub zeroed: i32, @@ -334,7 +359,14 @@ impl Default for p9_1_2_zero_then_default_initialized_WithDefaultMember { } #[repr(C)] #[derive( - Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + VaArg, + FnPtrArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub struct p9_1_2_zero_then_default_initialized_LeavesMemberAlone { pub untouched: i32, @@ -364,6 +396,7 @@ impl Default for p9_1_2_zero_then_default_initialized_LeavesMemberAlone { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/std/dcl.dcl/dcl.decl/dcl.meaning/out/refcount/dcl.array.rs b/tests/std/dcl.dcl/dcl.decl/dcl.meaning/out/refcount/dcl.array.rs index f62ffefefc..81a991e9f4 100644 --- a/tests/std/dcl.dcl/dcl.decl/dcl.meaning/out/refcount/dcl.array.rs +++ b/tests/std/dcl.dcl/dcl.decl/dcl.meaning/out/refcount/dcl.array.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/std/dcl.dcl/dcl.decl/dcl.meaning/out/refcount/dcl.fct.default.rs b/tests/std/dcl.dcl/dcl.decl/dcl.meaning/out/refcount/dcl.fct.default.rs index 053aacea1b..5e68471cda 100644 --- a/tests/std/dcl.dcl/dcl.decl/dcl.meaning/out/refcount/dcl.fct.default.rs +++ b/tests/std/dcl.dcl/dcl.decl/dcl.meaning/out/refcount/dcl.fct.default.rs @@ -55,7 +55,16 @@ thread_local!( pub static step_10: Value = Rc::new(RefCell::new(4)); ); #[derive( - Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, + Copy, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, )] #[byte_size(4)] pub struct p9_static_member_hides_namespace_variable_HasStaticStep { @@ -117,6 +126,7 @@ pub fn combine_14(mut first: i32, mut second: i32) -> i32 { FnPtrArg, CppFrom, Destructible, + TriviallyCopyable, Copyable, )] #[cpp_from(i32, construct, value)] @@ -146,7 +156,16 @@ thread_local!( pub type anon_16 = u32; pub const anon_16_kBonus: anon_16 = 5; #[derive( - Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, + Copy, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, )] #[byte_size(4)] pub struct p9_evaluated_each_time_called_Account { @@ -236,6 +255,7 @@ pub fn add_18(mut a: i32, mut b: i32) -> i32 { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/std/dcl.dcl/dcl.decl/dcl.meaning/out/refcount/dcl.mptr.rs b/tests/std/dcl.dcl/dcl.decl/dcl.meaning/out/refcount/dcl.mptr.rs index b55a188bb1..1c00967fa9 100644 --- a/tests/std/dcl.dcl/dcl.decl/dcl.meaning/out/refcount/dcl.mptr.rs +++ b/tests/std/dcl.dcl/dcl.decl/dcl.meaning/out/refcount/dcl.mptr.rs @@ -6,7 +6,17 @@ use std::io::prelude::*; use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; -#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable)] +#[derive( + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, +)] #[byte_size(16)] pub struct p2_pointer_to_array_member_HasIntArray { #[offset(0)] @@ -49,6 +59,7 @@ pub fn test_0() { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -88,6 +99,7 @@ thread_local!( VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -128,6 +140,7 @@ pub fn test_3() { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -139,7 +152,16 @@ pub struct p2_pointer_to_member_of_pointer_to_member_type_HasTwoInts { pub second: i32, } #[derive( - Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, + Copy, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, )] #[byte_size(8)] pub struct p2_pointer_to_member_of_pointer_to_member_type_HoldsSelector { diff --git a/tests/std/dcl.dcl/dcl.decl/dcl.meaning/out/unsafe/dcl.array.rs b/tests/std/dcl.dcl/dcl.decl/dcl.meaning/out/unsafe/dcl.array.rs index fb656d70fc..cd118680a2 100644 --- a/tests/std/dcl.dcl/dcl.decl/dcl.meaning/out/unsafe/dcl.array.rs +++ b/tests/std/dcl.dcl/dcl.decl/dcl.meaning/out/unsafe/dcl.array.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/std/dcl.dcl/dcl.decl/dcl.meaning/out/unsafe/dcl.fct.default.rs b/tests/std/dcl.dcl/dcl.decl/dcl.meaning/out/unsafe/dcl.fct.default.rs index eea1694c84..3a13a17cba 100644 --- a/tests/std/dcl.dcl/dcl.decl/dcl.meaning/out/unsafe/dcl.fct.default.rs +++ b/tests/std/dcl.dcl/dcl.decl/dcl.meaning/out/unsafe/dcl.fct.default.rs @@ -55,7 +55,14 @@ pub static mut step_9: std::cell::LazyCell = std::cell::LazyCell::new(|| un pub static mut step_10: std::cell::LazyCell = std::cell::LazyCell::new(|| unsafe { 4 }); #[repr(C)] #[derive( - Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + VaArg, + FnPtrArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub struct p9_static_member_hides_namespace_variable_HasStaticStep { pub total: i32, @@ -115,6 +122,7 @@ pub unsafe fn combine_14(mut first: i32, mut second: i32) -> i32 { ZeroInitializationUnsafe, CppFromUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, )] #[cpp_from(i32, construct, value)] @@ -145,7 +153,14 @@ pub type anon_16 = u32; pub const anon_16_kBonus: anon_16 = 5; #[repr(C)] #[derive( - Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + VaArg, + FnPtrArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub struct p9_evaluated_each_time_called_Account { pub balance: i32, @@ -234,6 +249,7 @@ pub unsafe fn add_18(mut a: i32, mut b: i32) -> i32 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/std/dcl.dcl/dcl.decl/dcl.meaning/out/unsafe/dcl.mptr.rs b/tests/std/dcl.dcl/dcl.decl/dcl.meaning/out/unsafe/dcl.mptr.rs index 323a5e53dd..cc49395a7a 100644 --- a/tests/std/dcl.dcl/dcl.decl/dcl.meaning/out/unsafe/dcl.mptr.rs +++ b/tests/std/dcl.dcl/dcl.decl/dcl.meaning/out/unsafe/dcl.mptr.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -54,6 +55,7 @@ pub unsafe fn test_0() { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -101,6 +103,7 @@ pub static mut pm_2: std::cell::LazyCell = std::cell::LazyCell::new(|| un FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -134,6 +137,7 @@ pub unsafe fn test_3() { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -143,7 +147,14 @@ pub struct p2_pointer_to_member_of_pointer_to_member_type_HasTwoInts { } #[repr(C)] #[derive( - Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + VaArg, + FnPtrArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub struct p2_pointer_to_member_of_pointer_to_member_type_HoldsSelector { pub selector: isize, diff --git a/tests/std/expr/conv/out/refcount/conv.mem.rs b/tests/std/expr/conv/out/refcount/conv.mem.rs index e4244a961a..54d0c87934 100644 --- a/tests/std/expr/conv/out/refcount/conv.mem.rs +++ b/tests/std/expr/conv/out/refcount/conv.mem.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/std/expr/conv/out/unsafe/conv.mem.rs b/tests/std/expr/conv/out/unsafe/conv.mem.rs index 203929dd10..0ac38665e8 100644 --- a/tests/std/expr/conv/out/unsafe/conv.mem.rs +++ b/tests/std/expr/conv/out/unsafe/conv.mem.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/std/expr/expr.compound/expr.post/out/refcount/expr.const.cast.rs b/tests/std/expr/expr.compound/expr.post/out/refcount/expr.const.cast.rs index dc1677da4e..a67a700ba3 100644 --- a/tests/std/expr/expr.compound/expr.post/out/refcount/expr.const.cast.rs +++ b/tests/std/expr/expr.compound/expr.post/out/refcount/expr.const.cast.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/std/expr/expr.compound/expr.post/out/refcount/expr.reinterpret.cast-p10-result-is-unspecified.rs b/tests/std/expr/expr.compound/expr.post/out/refcount/expr.reinterpret.cast-p10-result-is-unspecified.rs index 904ef402d2..dadc9e5d7d 100644 --- a/tests/std/expr/expr.compound/expr.post/out/refcount/expr.reinterpret.cast-p10-result-is-unspecified.rs +++ b/tests/std/expr/expr.compound/expr.post/out/refcount/expr.reinterpret.cast-p10-result-is-unspecified.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -34,6 +35,7 @@ pub struct HasTwoInts { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/std/expr/expr.compound/expr.post/out/refcount/expr.reinterpret.cast.rs b/tests/std/expr/expr.compound/expr.post/out/refcount/expr.reinterpret.cast.rs index 9d03378a52..14612bbab3 100644 --- a/tests/std/expr/expr.compound/expr.post/out/refcount/expr.reinterpret.cast.rs +++ b/tests/std/expr/expr.compound/expr.post/out/refcount/expr.reinterpret.cast.rs @@ -25,6 +25,7 @@ pub fn test_0() { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -44,6 +45,7 @@ pub struct p10_null_converts_to_null_HasTwoInts { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -66,6 +68,7 @@ pub fn test_1() { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -85,6 +88,7 @@ pub struct p10_2_data_member_round_trip_HasTwoInts { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/std/expr/expr.compound/expr.post/out/unsafe/expr.const.cast.rs b/tests/std/expr/expr.compound/expr.post/out/unsafe/expr.const.cast.rs index 1df476df5c..da44782183 100644 --- a/tests/std/expr/expr.compound/expr.post/out/unsafe/expr.const.cast.rs +++ b/tests/std/expr/expr.compound/expr.post/out/unsafe/expr.const.cast.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/std/expr/expr.compound/expr.post/out/unsafe/expr.reinterpret.cast-p10-result-is-unspecified.rs b/tests/std/expr/expr.compound/expr.post/out/unsafe/expr.reinterpret.cast-p10-result-is-unspecified.rs index ce31f7bc5f..40ce4db7a9 100644 --- a/tests/std/expr/expr.compound/expr.post/out/unsafe/expr.reinterpret.cast-p10-result-is-unspecified.rs +++ b/tests/std/expr/expr.compound/expr.post/out/unsafe/expr.reinterpret.cast-p10-result-is-unspecified.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -29,6 +30,7 @@ pub struct HasTwoInts { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/std/expr/expr.compound/expr.post/out/unsafe/expr.reinterpret.cast.rs b/tests/std/expr/expr.compound/expr.post/out/unsafe/expr.reinterpret.cast.rs index 343354726f..5c237214d5 100644 --- a/tests/std/expr/expr.compound/expr.post/out/unsafe/expr.reinterpret.cast.rs +++ b/tests/std/expr/expr.compound/expr.post/out/unsafe/expr.reinterpret.cast.rs @@ -24,6 +24,7 @@ pub unsafe fn test_0() { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -39,6 +40,7 @@ pub struct p10_null_converts_to_null_HasTwoInts { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -58,6 +60,7 @@ pub unsafe fn test_1() { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -73,6 +76,7 @@ pub struct p10_2_data_member_round_trip_HasTwoInts { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/std/expr/expr.compound/expr.unary/out/refcount/expr.pre.incr.rs b/tests/std/expr/expr.compound/expr.unary/out/refcount/expr.pre.incr.rs index 84324b3a78..f6eeef19a9 100644 --- a/tests/std/expr/expr.compound/expr.unary/out/refcount/expr.pre.incr.rs +++ b/tests/std/expr/expr.compound/expr.unary/out/refcount/expr.pre.incr.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/std/expr/expr.compound/expr.unary/out/refcount/expr.unary.op.rs b/tests/std/expr/expr.compound/expr.unary/out/refcount/expr.unary.op.rs index e74703caa0..4c2cc4937a 100644 --- a/tests/std/expr/expr.compound/expr.unary/out/refcount/expr.unary.op.rs +++ b/tests/std/expr/expr.compound/expr.unary/out/refcount/expr.unary.op.rs @@ -21,6 +21,7 @@ thread_local!( VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -50,6 +51,7 @@ pub fn test_2() { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -77,6 +79,7 @@ pub fn test_3() { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/std/expr/expr.compound/expr.unary/out/unsafe/expr.pre.incr.rs b/tests/std/expr/expr.compound/expr.unary/out/unsafe/expr.pre.incr.rs index 7d9a6d05ed..edf0bce047 100644 --- a/tests/std/expr/expr.compound/expr.unary/out/unsafe/expr.pre.incr.rs +++ b/tests/std/expr/expr.compound/expr.unary/out/unsafe/expr.pre.incr.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/std/expr/expr.compound/expr.unary/out/unsafe/expr.unary.op.rs b/tests/std/expr/expr.compound/expr.unary/out/unsafe/expr.unary.op.rs index fb74001edb..61e5bfe95c 100644 --- a/tests/std/expr/expr.compound/expr.unary/out/unsafe/expr.unary.op.rs +++ b/tests/std/expr/expr.compound/expr.unary/out/unsafe/expr.unary.op.rs @@ -16,6 +16,7 @@ pub static mut calls_1: std::cell::LazyCell = std::cell::LazyCell::new(|| u FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -44,6 +45,7 @@ pub unsafe fn test_2() { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -79,6 +81,7 @@ pub unsafe fn test_3() { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/std/expr/expr.compound/out/refcount/expr.cond.rs b/tests/std/expr/expr.compound/out/refcount/expr.cond.rs index 306f13b18e..66ff0e23a1 100644 --- a/tests/std/expr/expr.compound/out/refcount/expr.cond.rs +++ b/tests/std/expr/expr.compound/out/refcount/expr.cond.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/std/expr/expr.compound/out/refcount/expr.eq.rs b/tests/std/expr/expr.compound/out/refcount/expr.eq.rs index ee222e9dcf..8248902714 100644 --- a/tests/std/expr/expr.compound/out/refcount/expr.eq.rs +++ b/tests/std/expr/expr.compound/out/refcount/expr.eq.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -40,6 +41,7 @@ pub fn test_0() { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -58,7 +60,9 @@ pub fn test_1() { assert!((null_pm != first_pm)); assert!(!(null_pm == first_pm)); } -#[derive(VaArg, FnPtrArg, Destructible, Copyable, ByteRepr, Clone, ZeroInitialization)] +#[derive( + VaArg, FnPtrArg, Destructible, TriviallyCopyable, Copyable, ByteRepr, Clone, ZeroInitialization, +)] #[byte_size(4)] pub struct p4_5_members_of_same_union_HasTwoIntMembers { #[offset(0)] @@ -96,6 +100,7 @@ pub fn test_2() { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/std/expr/expr.compound/out/refcount/expr.mptr.oper-p6-null-pointer-to-data-member.rs b/tests/std/expr/expr.compound/out/refcount/expr.mptr.oper-p6-null-pointer-to-data-member.rs index f44da5d369..328236b90e 100644 --- a/tests/std/expr/expr.compound/out/refcount/expr.mptr.oper-p6-null-pointer-to-data-member.rs +++ b/tests/std/expr/expr.compound/out/refcount/expr.mptr.oper-p6-null-pointer-to-data-member.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/std/expr/expr.compound/out/refcount/expr.mptr.oper.rs b/tests/std/expr/expr.compound/out/refcount/expr.mptr.oper.rs index 57d6b2e7e4..1cf58897bc 100644 --- a/tests/std/expr/expr.compound/out/refcount/expr.mptr.oper.rs +++ b/tests/std/expr/expr.compound/out/refcount/expr.mptr.oper.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -47,6 +48,7 @@ pub fn test_0() { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -100,6 +102,7 @@ pub fn test_7() { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/std/expr/expr.compound/out/unsafe/expr.cond.rs b/tests/std/expr/expr.compound/out/unsafe/expr.cond.rs index c75bd283b4..300a87338a 100644 --- a/tests/std/expr/expr.compound/out/unsafe/expr.cond.rs +++ b/tests/std/expr/expr.compound/out/unsafe/expr.cond.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/std/expr/expr.compound/out/unsafe/expr.eq.rs b/tests/std/expr/expr.compound/out/unsafe/expr.eq.rs index dc14f74efd..48feb34d19 100644 --- a/tests/std/expr/expr.compound/out/unsafe/expr.eq.rs +++ b/tests/std/expr/expr.compound/out/unsafe/expr.eq.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -35,6 +36,7 @@ pub unsafe fn test_0() { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -52,7 +54,14 @@ pub unsafe fn test_1() { } #[repr(C)] #[derive( - Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + FnPtrArg, + VaArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub union p4_5_members_of_same_union_HasTwoIntMembers { pub first: i32, @@ -77,6 +86,7 @@ pub unsafe fn test_2() { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/std/expr/expr.compound/out/unsafe/expr.mptr.oper-p6-null-pointer-to-data-member.rs b/tests/std/expr/expr.compound/out/unsafe/expr.mptr.oper-p6-null-pointer-to-data-member.rs index c52cd320d1..cb03b4a677 100644 --- a/tests/std/expr/expr.compound/out/unsafe/expr.mptr.oper-p6-null-pointer-to-data-member.rs +++ b/tests/std/expr/expr.compound/out/unsafe/expr.mptr.oper-p6-null-pointer-to-data-member.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/std/expr/expr.compound/out/unsafe/expr.mptr.oper.rs b/tests/std/expr/expr.compound/out/unsafe/expr.mptr.oper.rs index 56a0abb755..e10b027388 100644 --- a/tests/std/expr/expr.compound/out/unsafe/expr.mptr.oper.rs +++ b/tests/std/expr/expr.compound/out/unsafe/expr.mptr.oper.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -47,6 +48,7 @@ pub unsafe fn test_0() { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -90,6 +92,7 @@ pub unsafe fn test_7() { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/std/expr/expr.prim/out/refcount/expr.prim.this.rs b/tests/std/expr/expr.prim/out/refcount/expr.prim.this.rs index 2464ac6df8..445566aeef 100644 --- a/tests/std/expr/expr.prim/out/refcount/expr.prim.this.rs +++ b/tests/std/expr/expr.prim/out/refcount/expr.prim.this.rs @@ -7,7 +7,16 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, CppFrom, Destructible, Copyable, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + CppFrom, + Destructible, + TriviallyCopyable, + Copyable, )] #[cpp_from(i32, construct, value)] #[byte_size(16)] @@ -39,6 +48,7 @@ pub fn test_0() { FnPtrArg, CppFrom, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/std/expr/expr.prim/out/unsafe/expr.prim.this.rs b/tests/std/expr/expr.prim/out/unsafe/expr.prim.this.rs index eaa2d42686..2cd0690628 100644 --- a/tests/std/expr/expr.prim/out/unsafe/expr.prim.this.rs +++ b/tests/std/expr/expr.prim/out/unsafe/expr.prim.this.rs @@ -15,6 +15,7 @@ use std::rc::Rc; ZeroInitializationUnsafe, CppFromUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, )] #[cpp_from(i32, construct, value)] @@ -51,6 +52,7 @@ pub unsafe fn test_0() { ZeroInitializationUnsafe, CppFromUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/std/library/requirements/utility.requirements/allocator.requirements/out/refcount/allocator.requirements.general.rs b/tests/std/library/requirements/utility.requirements/allocator.requirements/out/refcount/allocator.requirements.general.rs index 1dec3736c0..5ae20a7984 100644 --- a/tests/std/library/requirements/utility.requirements/allocator.requirements/out/refcount/allocator.requirements.general.rs +++ b/tests/std/library/requirements/utility.requirements/allocator.requirements/out/refcount/allocator.requirements.general.rs @@ -15,13 +15,23 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] #[byte_size(1)] pub struct p16_rebind_member_Alloc_std_pair_const_int__int___rebind_std_pair_const_int__int__ {} #[derive( - Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, + Copy, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, )] #[byte_size(4)] pub struct p16_rebind_member_Alloc_std_pair_const_int__int__ { @@ -65,6 +75,7 @@ pub fn test_0() { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/std/library/requirements/utility.requirements/allocator.requirements/out/unsafe/allocator.requirements.general.rs b/tests/std/library/requirements/utility.requirements/allocator.requirements/out/unsafe/allocator.requirements.general.rs index 2368ba1774..1be9a3e756 100644 --- a/tests/std/library/requirements/utility.requirements/allocator.requirements/out/unsafe/allocator.requirements.general.rs +++ b/tests/std/library/requirements/utility.requirements/allocator.requirements/out/unsafe/allocator.requirements.general.rs @@ -14,13 +14,21 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] pub struct p16_rebind_member_Alloc_std_pair_const_int__int___rebind_std_pair_const_int__int__ {} #[repr(C)] #[derive( - Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + VaArg, + FnPtrArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub struct p16_rebind_member_Alloc_std_pair_const_int__int__ { pub id: i32, @@ -48,6 +56,7 @@ pub unsafe fn test_0() { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/std/temp/out/refcount/temp.type.rs b/tests/std/temp/out/refcount/temp.type.rs index a8738251f0..e774e6ad73 100644 --- a/tests/std/temp/out/refcount/temp.type.rs +++ b/tests/std/temp/out/refcount/temp.type.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -37,6 +38,7 @@ thread_local!( VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -55,6 +57,7 @@ thread_local!( VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -73,6 +76,7 @@ thread_local!( VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/std/temp/out/unsafe/temp.type.rs b/tests/std/temp/out/unsafe/temp.type.rs index 49a9571e4a..f0888a77cb 100644 --- a/tests/std/temp/out/unsafe/temp.type.rs +++ b/tests/std/temp/out/unsafe/temp.type.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -30,6 +31,7 @@ pub static mut count_0: std::cell::LazyCell = std::cell::LazyCell::new(|| u FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -44,6 +46,7 @@ pub static mut count_1: std::cell::LazyCell = std::cell::LazyCell::new(|| u FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -58,6 +61,7 @@ pub static mut count_2: std::cell::LazyCell = std::cell::LazyCell::new(|| u FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/std/temp/temp.spec/out/refcount/temp.inst.rs b/tests/std/temp/temp.spec/out/refcount/temp.inst.rs index e7b54eace1..c68c34ceb4 100644 --- a/tests/std/temp/temp.spec/out/refcount/temp.inst.rs +++ b/tests/std/temp/temp.spec/out/refcount/temp.inst.rs @@ -7,7 +7,16 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, + Copy, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, )] #[byte_size(4)] pub struct p2_reference_does_not_instantiate_Member { diff --git a/tests/std/temp/temp.spec/out/unsafe/temp.inst.rs b/tests/std/temp/temp.spec/out/unsafe/temp.inst.rs index 9541de48e7..79b46da7a5 100644 --- a/tests/std/temp/temp.spec/out/unsafe/temp.inst.rs +++ b/tests/std/temp/temp.spec/out/unsafe/temp.inst.rs @@ -8,7 +8,14 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + VaArg, + FnPtrArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub struct p2_reference_does_not_instantiate_Member { pub value: i32, diff --git a/tests/std/utilities/utility/out/refcount/forward.rs b/tests/std/utilities/utility/out/refcount/forward.rs index 9fae59df13..8c22889c9a 100644 --- a/tests/std/utilities/utility/out/refcount/forward.rs +++ b/tests/std/utilities/utility/out/refcount/forward.rs @@ -21,6 +21,7 @@ pub fn test_0() { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/std/utilities/utility/out/refcount/utility.as.const.rs b/tests/std/utilities/utility/out/refcount/utility.as.const.rs index 0574c8d526..0f28a31e2f 100644 --- a/tests/std/utilities/utility/out/refcount/utility.as.const.rs +++ b/tests/std/utilities/utility/out/refcount/utility.as.const.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/std/utilities/utility/out/unsafe/forward.rs b/tests/std/utilities/utility/out/unsafe/forward.rs index a81584f74e..979d54538f 100644 --- a/tests/std/utilities/utility/out/unsafe/forward.rs +++ b/tests/std/utilities/utility/out/unsafe/forward.rs @@ -20,6 +20,7 @@ pub unsafe fn test_0() { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/std/utilities/utility/out/unsafe/utility.as.const.rs b/tests/std/utilities/utility/out/unsafe/utility.as.const.rs index f200448202..88fad39535 100644 --- a/tests/std/utilities/utility/out/unsafe/utility.as.const.rs +++ b/tests/std/utilities/utility/out/unsafe/utility.as.const.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/ub/out/refcount/ctor_ref_member.rs b/tests/ub/out/refcount/ctor_ref_member.rs index 3ea9464a52..f2e22d3562 100644 --- a/tests/ub/out/refcount/ctor_ref_member.rs +++ b/tests/ub/out/refcount/ctor_ref_member.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; FnPtrArg, CppFrom, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/ub/out/refcount/self_referencing_initializer.rs b/tests/ub/out/refcount/self_referencing_initializer.rs index b0edecb22b..ef35a04147 100644 --- a/tests/ub/out/refcount/self_referencing_initializer.rs +++ b/tests/ub/out/refcount/self_referencing_initializer.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/ub/out/refcount/ub6.rs b/tests/ub/out/refcount/ub6.rs index 1a84b35490..2c3ac00898 100644 --- a/tests/ub/out/refcount/ub6.rs +++ b/tests/ub/out/refcount/ub6.rs @@ -7,7 +7,16 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(16)] pub struct Pair { diff --git a/tests/ub/out/unsafe/ctor_ref_member.rs b/tests/ub/out/unsafe/ctor_ref_member.rs index c856d98849..d5d9afbf33 100644 --- a/tests/ub/out/unsafe/ctor_ref_member.rs +++ b/tests/ub/out/unsafe/ctor_ref_member.rs @@ -15,6 +15,7 @@ use std::rc::Rc; ZeroInitializationUnsafe, CppFromUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/ub/out/unsafe/self_referencing_initializer.rs b/tests/ub/out/unsafe/self_referencing_initializer.rs index 137783f696..c6020bc9f2 100644 --- a/tests/ub/out/unsafe/self_referencing_initializer.rs +++ b/tests/ub/out/unsafe/self_referencing_initializer.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/ub/out/unsafe/ub6.rs b/tests/ub/out/unsafe/ub6.rs index 0c250640dc..8da8753b4f 100644 --- a/tests/ub/out/unsafe/ub6.rs +++ b/tests/ub/out/unsafe/ub6.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/refcount/05_new.rs b/tests/unit/out/refcount/05_new.rs index 793b504939..788c501c80 100644 --- a/tests/unit/out/refcount/05_new.rs +++ b/tests/unit/out/refcount/05_new.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -29,6 +30,7 @@ pub struct A {} VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/10_struct.rs b/tests/unit/out/refcount/10_struct.rs index b0f7e8846a..ae7268d95a 100644 --- a/tests/unit/out/refcount/10_struct.rs +++ b/tests/unit/out/refcount/10_struct.rs @@ -7,7 +7,16 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(16)] pub struct GraphNode { @@ -18,7 +27,16 @@ pub struct GraphNode { pub next: Ptr, } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(16)] pub struct Graph { @@ -28,7 +46,17 @@ pub struct Graph { #[byte_size(8)] pub adj: Ptr>, } -#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable)] +#[derive( + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, +)] #[byte_size(8)] pub struct Partial { #[offset(0)] @@ -53,13 +81,23 @@ impl Default for Partial { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] #[byte_size(1)] pub struct Declared {} #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(16)] pub struct S { diff --git a/tests/unit/out/refcount/addr_of_global.rs b/tests/unit/out/refcount/addr_of_global.rs index 9f9960c025..586dfc50ff 100644 --- a/tests/unit/out/refcount/addr_of_global.rs +++ b/tests/unit/out/refcount/addr_of_global.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -24,7 +25,16 @@ pub struct Inner { pub value: i32, } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(8)] pub struct Outer { diff --git a/tests/unit/out/refcount/anonymous-struct.rs b/tests/unit/out/refcount/anonymous-struct.rs index 5a0a49c95e..f825707da8 100644 --- a/tests/unit/out/refcount/anonymous-struct.rs +++ b/tests/unit/out/refcount/anonymous-struct.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -34,6 +35,7 @@ pub struct Outer_Named { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -53,6 +55,7 @@ pub struct anon_0 { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -72,6 +75,7 @@ pub struct anon_1 { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -91,6 +95,7 @@ pub struct anon_2 { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -108,6 +113,7 @@ pub struct anon_4 { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -125,6 +131,7 @@ pub struct anon_5 { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -148,6 +155,7 @@ pub struct anon_3 { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -223,6 +231,7 @@ fn main_0() -> i32 { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/anonymous-struct_c.rs b/tests/unit/out/refcount/anonymous-struct_c.rs index 921e980c12..ea4fdb1ce6 100644 --- a/tests/unit/out/refcount/anonymous-struct_c.rs +++ b/tests/unit/out/refcount/anonymous-struct_c.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -34,6 +35,7 @@ pub struct Named { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -53,6 +55,7 @@ pub struct anon_0 { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -72,6 +75,7 @@ pub struct anon_1 { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -91,6 +95,7 @@ pub struct anon_2 { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -108,6 +113,7 @@ pub struct anon_4 { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -125,6 +131,7 @@ pub struct anon_5 { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -148,6 +155,7 @@ pub struct anon_3 { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -229,6 +237,7 @@ fn main_0() -> i32 { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/anonymous_enum.rs b/tests/unit/out/refcount/anonymous_enum.rs index ef1717ec58..c06a15e379 100644 --- a/tests/unit/out/refcount/anonymous_enum.rs +++ b/tests/unit/out/refcount/anonymous_enum.rs @@ -21,6 +21,7 @@ pub const anon_1_SECOND_B: anon_1 = 1; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -44,6 +45,7 @@ pub const anon_2_FIELD_B: anon_2 = 1; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/anonymous_enum_c.rs b/tests/unit/out/refcount/anonymous_enum_c.rs index d1186dbcf0..d6a66068a4 100644 --- a/tests/unit/out/refcount/anonymous_enum_c.rs +++ b/tests/unit/out/refcount/anonymous_enum_c.rs @@ -21,6 +21,7 @@ pub const anon_1_SECOND_B: anon_1 = 1; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -44,6 +45,7 @@ pub const anon_2_FIELD_B: anon_2 = 1; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/any.rs b/tests/unit/out/refcount/any.rs index a2df3aa89f..950dac7819 100644 --- a/tests/unit/out/refcount/any.rs +++ b/tests/unit/out/refcount/any.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/array_const_init.rs b/tests/unit/out/refcount/array_const_init.rs index a560c3fc15..c98ed32b44 100644 --- a/tests/unit/out/refcount/array_const_init.rs +++ b/tests/unit/out/refcount/array_const_init.rs @@ -6,7 +6,17 @@ use std::io::prelude::*; use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; -#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable)] +#[derive( + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, +)] #[byte_size(20)] pub struct S { #[offset(0)] @@ -47,6 +57,7 @@ thread_local!( VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/array_field_addr.rs b/tests/unit/out/refcount/array_field_addr.rs index 6b227c8f37..fcd9adc4bf 100644 --- a/tests/unit/out/refcount/array_field_addr.rs +++ b/tests/unit/out/refcount/array_field_addr.rs @@ -6,7 +6,17 @@ use std::io::prelude::*; use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; -#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable)] +#[derive( + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, +)] #[byte_size(12)] pub struct S { #[offset(0)] diff --git a/tests/unit/out/refcount/array_reference.rs b/tests/unit/out/refcount/array_reference.rs index 4dce815b9a..c659086375 100644 --- a/tests/unit/out/refcount/array_reference.rs +++ b/tests/unit/out/refcount/array_reference.rs @@ -68,6 +68,7 @@ pub fn pick_10(s: Ptr) -> Ptr { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/as_const.rs b/tests/unit/out/refcount/as_const.rs index 38ecf0399f..6789e78b94 100644 --- a/tests/unit/out/refcount/as_const.rs +++ b/tests/unit/out/refcount/as_const.rs @@ -18,6 +18,7 @@ pub const Overload_kConstOverload: Overload = 2; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/assign_rhs_first.rs b/tests/unit/out/refcount/assign_rhs_first.rs index 8fa7ae2c2d..797d5be9e7 100644 --- a/tests/unit/out/refcount/assign_rhs_first.rs +++ b/tests/unit/out/refcount/assign_rhs_first.rs @@ -16,7 +16,16 @@ pub fn advance_1() -> i32 { return 10; } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(8)] pub struct S { diff --git a/tests/unit/out/refcount/assignment_single_eval.rs b/tests/unit/out/refcount/assignment_single_eval.rs index 570bc5a4e4..6b0528d854 100644 --- a/tests/unit/out/refcount/assignment_single_eval.rs +++ b/tests/unit/out/refcount/assignment_single_eval.rs @@ -811,7 +811,16 @@ pub fn test_reference_members_9() { ); } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(8)] pub struct Slot_6 { @@ -820,7 +829,16 @@ pub struct Slot_6 { pub value: Ptr, } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(8)] pub struct Slot_8 { @@ -829,7 +847,16 @@ pub struct Slot_8 { pub value: Ptr, } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(8)] pub struct Slot_10 { @@ -896,7 +923,16 @@ pub fn test_pointer_elements_11() { printf!(b"pointer increments %d %d\n", (*index.borrow()), value); } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(8)] pub struct Holder_12 { @@ -932,7 +968,16 @@ pub fn test_reference_pointer_13() { ); } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(8)] pub struct Node_14 { @@ -1039,6 +1084,7 @@ pub fn test_reference_subfields_18() { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -1048,7 +1094,16 @@ pub struct Index_16 { pub value: u32, } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(8)] pub struct Slot_17 { @@ -1065,6 +1120,7 @@ pub struct Slot_17 { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -1074,7 +1130,16 @@ pub struct Index_19 { pub value: i16, } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(8)] pub struct Slot_20 { @@ -1126,6 +1191,7 @@ pub fn observe_24(mut assigned: i32, mut stored: Ptr) -> i32 { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -1143,6 +1209,7 @@ pub struct GlobalRecord_Inner { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -1395,6 +1462,7 @@ thread_local!( VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -1404,7 +1472,16 @@ pub struct Record_32 { pub value: i32, } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(8)] pub struct Link_33 { @@ -1425,6 +1502,7 @@ thread_local!( VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -1671,6 +1749,7 @@ thread_local!( VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -2035,7 +2114,16 @@ thread_local!( ]))); ); #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(8)] pub struct PointerSelector { @@ -2267,6 +2355,7 @@ pub struct Counts_59 { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -2589,6 +2678,7 @@ fn main_0() -> i32 { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -2597,7 +2687,17 @@ pub struct Index_62 { #[offset(0)] pub value: i32, } -#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable)] +#[derive( + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, +)] #[byte_size(12)] pub struct Owner_63 { #[offset(0)] diff --git a/tests/unit/out/refcount/bounded_struct_ptr.rs b/tests/unit/out/refcount/bounded_struct_ptr.rs index 13d8b24e3a..465ea56223 100644 --- a/tests/unit/out/refcount/bounded_struct_ptr.rs +++ b/tests/unit/out/refcount/bounded_struct_ptr.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/bst.rs b/tests/unit/out/refcount/bst.rs index 3706c10845..2a1f84adf5 100644 --- a/tests/unit/out/refcount/bst.rs +++ b/tests/unit/out/refcount/bst.rs @@ -7,7 +7,16 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(24)] pub struct node_t { diff --git a/tests/unit/out/refcount/c_struct.rs b/tests/unit/out/refcount/c_struct.rs index 5eaa76cdbe..d5778e019d 100644 --- a/tests/unit/out/refcount/c_struct.rs +++ b/tests/unit/out/refcount/c_struct.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -34,6 +35,7 @@ pub struct Point { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -47,7 +49,16 @@ pub struct Line { pub end: Point, } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(16)] pub struct Node { @@ -70,6 +81,7 @@ pub const Color_BLUE: Color = 2; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -89,6 +101,7 @@ pub struct Inner { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/cast.rs b/tests/unit/out/refcount/cast.rs index 78d63149bc..f073501970 100644 --- a/tests/unit/out/refcount/cast.rs +++ b/tests/unit/out/refcount/cast.rs @@ -19,6 +19,7 @@ pub const E_C: E = 2; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -38,6 +39,7 @@ pub struct Pair { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -47,7 +49,17 @@ pub struct Wide { #[offset(0)] pub c: i8, } -#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable)] +#[derive( + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, +)] #[byte_size(40)] pub struct Grid { #[offset(0)] diff --git a/tests/unit/out/refcount/cast_array_to_pointer_decay.rs b/tests/unit/out/refcount/cast_array_to_pointer_decay.rs index cd4f406bc9..0250336e19 100644 --- a/tests/unit/out/refcount/cast_array_to_pointer_decay.rs +++ b/tests/unit/out/refcount/cast_array_to_pointer_decay.rs @@ -16,7 +16,17 @@ pub fn strlen_1(mut s: Ptr) -> i32 { } return c; } -#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable)] +#[derive( + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, +)] #[byte_size(12)] pub struct Row { #[offset(0)] diff --git a/tests/unit/out/refcount/class.rs b/tests/unit/out/refcount/class.rs index e948e0bf4e..3b7da676c3 100644 --- a/tests/unit/out/refcount/class.rs +++ b/tests/unit/out/refcount/class.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -34,6 +35,7 @@ pub struct Pair { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -54,6 +56,7 @@ pub struct Route { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -78,6 +81,7 @@ impl CppEq for Counter { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/class_template_lazy_member.rs b/tests/unit/out/refcount/class_template_lazy_member.rs index 60b36ae596..00a73e5ea4 100644 --- a/tests/unit/out/refcount/class_template_lazy_member.rs +++ b/tests/unit/out/refcount/class_template_lazy_member.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -32,6 +33,7 @@ pub struct Point { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -49,6 +51,7 @@ pub struct Box_int_ { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -67,6 +70,7 @@ pub struct Box_Point_ { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -84,6 +88,7 @@ pub struct Deduced_int_ { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/class_templates.rs b/tests/unit/out/refcount/class_templates.rs index de657fab55..a786643a3c 100644 --- a/tests/unit/out/refcount/class_templates.rs +++ b/tests/unit/out/refcount/class_templates.rs @@ -78,6 +78,7 @@ pub struct MyContainer_float_ { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -100,6 +101,7 @@ impl Boxed_short_ { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -122,6 +124,7 @@ impl Boxed_int_ { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -144,6 +147,7 @@ impl Boxed_long_ { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -163,6 +167,7 @@ pub struct Outer_int__Inner_int_ { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -180,6 +185,7 @@ pub struct Outer_int_ { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -199,6 +205,7 @@ pub struct Outer_long__Inner_int_ { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -218,6 +225,7 @@ pub struct Outer_long__Inner_char_ { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -235,6 +243,7 @@ pub struct Outer_long_ { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/clone_vs_move.rs b/tests/unit/out/refcount/clone_vs_move.rs index aeb644242d..ed29de5983 100644 --- a/tests/unit/out/refcount/clone_vs_move.rs +++ b/tests/unit/out/refcount/clone_vs_move.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -23,7 +24,17 @@ pub struct Bar { #[offset(0)] pub w: i32, } -#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable)] +#[derive( + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, +)] #[byte_size(40)] pub struct Foo { #[offset(0)] @@ -56,7 +67,16 @@ impl Default for Foo { } } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(16)] pub struct Refs { diff --git a/tests/unit/out/refcount/comma_operator.rs b/tests/unit/out/refcount/comma_operator.rs index ee89c19b30..6eafe2162d 100644 --- a/tests/unit/out/refcount/comma_operator.rs +++ b/tests/unit/out/refcount/comma_operator.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/complex_function.rs b/tests/unit/out/refcount/complex_function.rs index dd96d702c7..ed65724fde 100644 --- a/tests/unit/out/refcount/complex_function.rs +++ b/tests/unit/out/refcount/complex_function.rs @@ -24,6 +24,7 @@ pub fn bar_2(x: Ptr) -> Ptr { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -33,7 +34,16 @@ pub struct X1 { pub v: i32, } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(8)] pub struct X2 { @@ -42,7 +52,16 @@ pub struct X2 { pub v: Ptr, } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(8)] pub struct X3 { @@ -51,7 +70,16 @@ pub struct X3 { pub v: Ptr, } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(8)] pub struct X4 { diff --git a/tests/unit/out/refcount/compound_assign_paren.rs b/tests/unit/out/refcount/compound_assign_paren.rs index 8654df7d11..f9c299d748 100644 --- a/tests/unit/out/refcount/compound_assign_paren.rs +++ b/tests/unit/out/refcount/compound_assign_paren.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/concepts.rs b/tests/unit/out/refcount/concepts.rs index 46439f3a75..b834c8956e 100644 --- a/tests/unit/out/refcount/concepts.rs +++ b/tests/unit/out/refcount/concepts.rs @@ -20,6 +20,7 @@ const _: () = assert!( VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/constexpr_function.rs b/tests/unit/out/refcount/constexpr_function.rs index baebd31e6c..507412a593 100644 --- a/tests/unit/out/refcount/constexpr_function.rs +++ b/tests/unit/out/refcount/constexpr_function.rs @@ -30,6 +30,7 @@ pub fn half_3(mut x: f64) -> f64 { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -64,6 +65,7 @@ pub fn imm_7(mut b: bool) -> bool { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/constructor.rs b/tests/unit/out/refcount/constructor.rs index ee68f1df5d..4fad947ff0 100644 --- a/tests/unit/out/refcount/constructor.rs +++ b/tests/unit/out/refcount/constructor.rs @@ -35,6 +35,7 @@ impl Destructible for S { FnPtrArg, CppFrom, Destructible, + TriviallyCopyable, Copyable, )] #[cpp_from(i32, construct_1, value)] diff --git a/tests/unit/out/refcount/conversion_operator_same_translation.rs b/tests/unit/out/refcount/conversion_operator_same_translation.rs index 78690ac1f7..44e3943c5c 100644 --- a/tests/unit/out/refcount/conversion_operator_same_translation.rs +++ b/tests/unit/out/refcount/conversion_operator_same_translation.rs @@ -16,6 +16,7 @@ use std::rc::{Rc, Weak}; FnPtrArg, CppFrom, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -36,6 +37,7 @@ pub struct S { FnPtrArg, CppFrom, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/copy_move_defaulted.rs b/tests/unit/out/refcount/copy_move_defaulted.rs index b83ad1772a..832b443272 100644 --- a/tests/unit/out/refcount/copy_move_defaulted.rs +++ b/tests/unit/out/refcount/copy_move_defaulted.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -45,7 +46,17 @@ impl Default for Explicit { { ::zero_init() } } } -#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable)] +#[derive( + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, +)] #[byte_size(16)] pub struct Implicit { #[offset(0)] diff --git a/tests/unit/out/refcount/default.rs b/tests/unit/out/refcount/default.rs index 10ee070fdd..631264a1f6 100644 --- a/tests/unit/out/refcount/default.rs +++ b/tests/unit/out/refcount/default.rs @@ -6,7 +6,17 @@ use std::io::prelude::*; use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; -#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable)] +#[derive( + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, +)] #[byte_size(144)] pub struct Pointers { #[offset(0)] @@ -43,7 +53,17 @@ impl Default for Pointers { } } } -#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable)] +#[derive( + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, +)] #[byte_size(440)] pub struct SmallArrays { #[offset(0)] @@ -78,7 +98,17 @@ impl Default for SmallArrays { } } } -#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable)] +#[derive( + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, +)] #[byte_size(132)] pub struct BigArray { #[offset(0)] diff --git a/tests/unit/out/refcount/default_function_arguments.rs b/tests/unit/out/refcount/default_function_arguments.rs index cff3390341..1b9f7b6e2f 100644 --- a/tests/unit/out/refcount/default_function_arguments.rs +++ b/tests/unit/out/refcount/default_function_arguments.rs @@ -22,6 +22,7 @@ pub fn baz_1(mut a: Ptr, mut b: Ptr) -> bool { FnPtrArg, CppFrom, Destructible, + TriviallyCopyable, Copyable, )] #[cpp_from(i32, construct, value)] @@ -78,6 +79,7 @@ pub fn first_9(r: Ptr) -> i32 { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/default_in_statics.rs b/tests/unit/out/refcount/default_in_statics.rs index 0c8459ddbd..8d0e5af66b 100644 --- a/tests/unit/out/refcount/default_in_statics.rs +++ b/tests/unit/out/refcount/default_in_statics.rs @@ -7,7 +7,16 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(16)] pub struct Inner { @@ -17,7 +26,17 @@ pub struct Inner { #[byte_size(8)] pub name: Ptr, } -#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable)] +#[derive( + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, +)] #[byte_size(88)] pub struct Outer { #[offset(0)] @@ -64,7 +83,16 @@ impl Default for Outer { } } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(40)] pub struct Foo { diff --git a/tests/unit/out/refcount/destructor_params.rs b/tests/unit/out/refcount/destructor_params.rs index b169f02173..18324be10c 100644 --- a/tests/unit/out/refcount/destructor_params.rs +++ b/tests/unit/out/refcount/destructor_params.rs @@ -42,6 +42,7 @@ pub fn with_default_3(s: S) -> i32 { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/doubly_linked_list.rs b/tests/unit/out/refcount/doubly_linked_list.rs index 2f8d9f12dc..f39c96626a 100644 --- a/tests/unit/out/refcount/doubly_linked_list.rs +++ b/tests/unit/out/refcount/doubly_linked_list.rs @@ -7,7 +7,16 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(24)] pub struct Node { diff --git a/tests/unit/out/refcount/enum_default_in_static.rs b/tests/unit/out/refcount/enum_default_in_static.rs index 0c83cd09dc..e2a939232f 100644 --- a/tests/unit/out/refcount/enum_default_in_static.rs +++ b/tests/unit/out/refcount/enum_default_in_static.rs @@ -19,6 +19,7 @@ pub const Mode_MODE_TWO: Mode = 2; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/enum_int_interop.rs b/tests/unit/out/refcount/enum_int_interop.rs index 65ea7203a7..80ee9934e4 100644 --- a/tests/unit/out/refcount/enum_int_interop.rs +++ b/tests/unit/out/refcount/enum_int_interop.rs @@ -20,7 +20,16 @@ pub const Tag_TAG_ZERO: Tag = 0; pub const Tag_TAG_ONE: Tag = 1; pub const Tag_TAG_TWO: Tag = 2; #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(16)] pub struct Entry { diff --git a/tests/unit/out/refcount/enum_int_interop_c.rs b/tests/unit/out/refcount/enum_int_interop_c.rs index 88326b8ab0..76268186d5 100644 --- a/tests/unit/out/refcount/enum_int_interop_c.rs +++ b/tests/unit/out/refcount/enum_int_interop_c.rs @@ -20,7 +20,16 @@ pub const Tag_enum_TAG_ZERO: Tag_enum = 0; pub const Tag_enum_TAG_ONE: Tag_enum = 1; pub const Tag_enum_TAG_TWO: Tag_enum = 2; #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(16)] pub struct Entry { diff --git a/tests/unit/out/refcount/enum_underlying_type.rs b/tests/unit/out/refcount/enum_underlying_type.rs index 289812f810..d252fd6c1e 100644 --- a/tests/unit/out/refcount/enum_underlying_type.rs +++ b/tests/unit/out/refcount/enum_underlying_type.rs @@ -26,7 +26,16 @@ pub const Scoped_NEG: Scoped = -2; pub const Scoped_POS: Scoped = 2; pub type Empty = bool; #[derive( - Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, + Copy, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, )] #[byte_size(1)] pub struct HoldsEmpty { diff --git a/tests/unit/out/refcount/exprs.rs b/tests/unit/out/refcount/exprs.rs index fbd6ae2577..2f457c8464 100644 --- a/tests/unit/out/refcount/exprs.rs +++ b/tests/unit/out/refcount/exprs.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -24,7 +25,16 @@ pub struct X { pub x: i32, } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(16)] pub struct Y { diff --git a/tests/unit/out/refcount/fft.rs b/tests/unit/out/refcount/fft.rs index d2b9250904..ed71bc0c0f 100644 --- a/tests/unit/out/refcount/fft.rs +++ b/tests/unit/out/refcount/fft.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/field_aliasing.rs b/tests/unit/out/refcount/field_aliasing.rs index 76304864d6..5b50115745 100644 --- a/tests/unit/out/refcount/field_aliasing.rs +++ b/tests/unit/out/refcount/field_aliasing.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -25,7 +26,17 @@ pub struct In { #[offset(4)] pub y: i32, } -#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable)] +#[derive( + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, +)] #[byte_size(32)] pub struct S { #[offset(0)] @@ -53,7 +64,16 @@ impl Default for S { } } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(16)] pub struct Node { diff --git a/tests/unit/out/refcount/field_array_elem_ptr.rs b/tests/unit/out/refcount/field_array_elem_ptr.rs index ce1212d113..308dbd479b 100644 --- a/tests/unit/out/refcount/field_array_elem_ptr.rs +++ b/tests/unit/out/refcount/field_array_elem_ptr.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -25,7 +26,17 @@ pub struct Point { #[offset(4)] pub y: i32, } -#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable)] +#[derive( + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, +)] #[byte_size(48)] pub struct Shape { #[offset(0)] diff --git a/tests/unit/out/refcount/field_method_receiver.rs b/tests/unit/out/refcount/field_method_receiver.rs index b5ae071ba7..85428adc82 100644 --- a/tests/unit/out/refcount/field_method_receiver.rs +++ b/tests/unit/out/refcount/field_method_receiver.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/field_pointers.rs b/tests/unit/out/refcount/field_pointers.rs index b4bc0a1afb..7d56d9dd53 100644 --- a/tests/unit/out/refcount/field_pointers.rs +++ b/tests/unit/out/refcount/field_pointers.rs @@ -6,7 +6,17 @@ use std::io::prelude::*; use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; -#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable)] +#[derive( + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, +)] #[byte_size(12)] pub struct Inner { #[offset(0)] @@ -35,6 +45,7 @@ impl Default for Inner { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/field_pointers_malloced_struct.rs b/tests/unit/out/refcount/field_pointers_malloced_struct.rs index 7841b69904..e117ab85dc 100644 --- a/tests/unit/out/refcount/field_pointers_malloced_struct.rs +++ b/tests/unit/out/refcount/field_pointers_malloced_struct.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/field_reinterpret_write_through.rs b/tests/unit/out/refcount/field_reinterpret_write_through.rs index 5118789f6b..8613df3c01 100644 --- a/tests/unit/out/refcount/field_reinterpret_write_through.rs +++ b/tests/unit/out/refcount/field_reinterpret_write_through.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -25,7 +26,17 @@ pub struct In { #[offset(4)] pub b: i32, } -#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable)] +#[derive( + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, +)] #[byte_size(40)] pub struct S { #[offset(0)] diff --git a/tests/unit/out/refcount/find.rs b/tests/unit/out/refcount/find.rs index 9ffe9bbeb8..499e031ee4 100644 --- a/tests/unit/out/refcount/find.rs +++ b/tests/unit/out/refcount/find.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/first_field_ptr_covers_struct.rs b/tests/unit/out/refcount/first_field_ptr_covers_struct.rs index 856f139bd7..ac72474d07 100644 --- a/tests/unit/out/refcount/first_field_ptr_covers_struct.rs +++ b/tests/unit/out/refcount/first_field_ptr_covers_struct.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -34,6 +35,7 @@ pub struct In { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/first_member_downcast.rs b/tests/unit/out/refcount/first_member_downcast.rs index 195568f94f..fc8c70e03a 100644 --- a/tests/unit/out/refcount/first_member_downcast.rs +++ b/tests/unit/out/refcount/first_member_downcast.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -32,6 +33,7 @@ pub struct base { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/flex_array_member_incomplete.rs b/tests/unit/out/refcount/flex_array_member_incomplete.rs index f1cd55656c..ac869765e8 100644 --- a/tests/unit/out/refcount/flex_array_member_incomplete.rs +++ b/tests/unit/out/refcount/flex_array_member_incomplete.rs @@ -6,7 +6,17 @@ use std::io::prelude::*; use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; -#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable)] +#[derive( + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, +)] #[byte_size(4)] pub struct F { #[offset(0)] diff --git a/tests/unit/out/refcount/flex_array_member_sibling_write.rs b/tests/unit/out/refcount/flex_array_member_sibling_write.rs index fb2308cf26..fff2ac3ab0 100644 --- a/tests/unit/out/refcount/flex_array_member_sibling_write.rs +++ b/tests/unit/out/refcount/flex_array_member_sibling_write.rs @@ -6,7 +6,17 @@ use std::io::prelude::*; use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; -#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable)] +#[derive( + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, +)] #[byte_size(8)] pub struct S { #[offset(0)] @@ -35,6 +45,7 @@ impl Default for S { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -45,7 +56,17 @@ pub struct E { #[offset(4)] pub w: i32, } -#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable)] +#[derive( + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, +)] #[byte_size(16)] pub struct T { #[offset(0)] diff --git a/tests/unit/out/refcount/fn_ptr.rs b/tests/unit/out/refcount/fn_ptr.rs index 6d6f611ac4..ad2d2d6d79 100644 --- a/tests/unit/out/refcount/fn_ptr.rs +++ b/tests/unit/out/refcount/fn_ptr.rs @@ -37,6 +37,7 @@ pub fn identity_hash_6(mut v: bool) -> usize { FnPtrArg, CppFrom, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/fn_ptr_cast.rs b/tests/unit/out/refcount/fn_ptr_cast.rs index 4795535e3a..53536b7ade 100644 --- a/tests/unit/out/refcount/fn_ptr_cast.rs +++ b/tests/unit/out/refcount/fn_ptr_cast.rs @@ -25,7 +25,16 @@ pub fn test_double_cast_2() { assert!(({ (fn2).clone() } == { (fn_).clone() })); } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(8)] pub struct Command { diff --git a/tests/unit/out/refcount/fn_ptr_stable_sort.rs b/tests/unit/out/refcount/fn_ptr_stable_sort.rs index fd8cbc9470..81f74356c1 100644 --- a/tests/unit/out/refcount/fn_ptr_stable_sort.rs +++ b/tests/unit/out/refcount/fn_ptr_stable_sort.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/fn_ptr_struct.rs b/tests/unit/out/refcount/fn_ptr_struct.rs index 5b5a84f3c8..460c147916 100644 --- a/tests/unit/out/refcount/fn_ptr_struct.rs +++ b/tests/unit/out/refcount/fn_ptr_struct.rs @@ -7,7 +7,16 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(16)] pub struct Handler { @@ -32,6 +41,7 @@ pub fn negate_1(mut x: i32) -> i32 { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/fn_ptr_typedef_cast.rs b/tests/unit/out/refcount/fn_ptr_typedef_cast.rs index b8085c2601..4068132b3c 100644 --- a/tests/unit/out/refcount/fn_ptr_typedef_cast.rs +++ b/tests/unit/out/refcount/fn_ptr_typedef_cast.rs @@ -27,6 +27,7 @@ pub fn via_size_t_return_3(mut b: u64) -> usize { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/fn_ptr_vtable.rs b/tests/unit/out/refcount/fn_ptr_vtable.rs index 1e96ee5819..a055ea0c93 100644 --- a/tests/unit/out/refcount/fn_ptr_vtable.rs +++ b/tests/unit/out/refcount/fn_ptr_vtable.rs @@ -7,7 +7,16 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(24)] pub struct Vtable { diff --git a/tests/unit/out/refcount/fn_ref.rs b/tests/unit/out/refcount/fn_ref.rs index bc8234aaf6..9c6a659641 100644 --- a/tests/unit/out/refcount/fn_ref.rs +++ b/tests/unit/out/refcount/fn_ref.rs @@ -22,7 +22,16 @@ pub fn call_forwarded_4(f: FnPtr i32>, mut x: i32) -> i32 { return ({ f.call(x) }); } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(8)] pub struct Holder { diff --git a/tests/unit/out/refcount/friend.rs b/tests/unit/out/refcount/friend.rs index f7d2a25091..562f996f42 100644 --- a/tests/unit/out/refcount/friend.rs +++ b/tests/unit/out/refcount/friend.rs @@ -27,6 +27,7 @@ pub fn scaled_3(v: Ptr, mut k: f64) -> f64 { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -52,6 +53,7 @@ pub fn get_4(w: Ptr) -> i32 { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -72,6 +74,7 @@ pub fn get_5(w: Ptr) -> i64 { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -89,6 +92,7 @@ pub struct W_long_ { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/function_overloading.rs b/tests/unit/out/refcount/function_overloading.rs index b1ab134eb2..8c4d218dce 100644 --- a/tests/unit/out/refcount/function_overloading.rs +++ b/tests/unit/out/refcount/function_overloading.rs @@ -30,6 +30,7 @@ pub fn bar_4(x: Ptr) -> i32 { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/global_call_temporaries.rs b/tests/unit/out/refcount/global_call_temporaries.rs index 3b8182691d..627d877c20 100644 --- a/tests/unit/out/refcount/global_call_temporaries.rs +++ b/tests/unit/out/refcount/global_call_temporaries.rs @@ -103,6 +103,7 @@ thread_local!( VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/global_init_side_effect.rs b/tests/unit/out/refcount/global_init_side_effect.rs index 04c40e3b04..e158196fc8 100644 --- a/tests/unit/out/refcount/global_init_side_effect.rs +++ b/tests/unit/out/refcount/global_init_side_effect.rs @@ -19,6 +19,7 @@ thread_local!( FnPtrArg, CppFrom, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/global_non_const_init.rs b/tests/unit/out/refcount/global_non_const_init.rs index 5fcb3f2525..dbca0ec9b7 100644 --- a/tests/unit/out/refcount/global_non_const_init.rs +++ b/tests/unit/out/refcount/global_non_const_init.rs @@ -33,7 +33,16 @@ thread_local!( Rc::new(RefCell::new((from_call_5.with(|rc| *rc.borrow()) + 1))); ); #[derive( - Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, + Copy, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, )] #[byte_size(4)] pub struct Ctor { @@ -88,6 +97,7 @@ thread_local!( VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -110,7 +120,16 @@ thread_local!( })); ); #[derive( - Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, + Copy, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, )] #[byte_size(4)] pub struct Singleton { diff --git a/tests/unit/out/refcount/global_pointers.rs b/tests/unit/out/refcount/global_pointers.rs index e6e5d870c6..47420f3dfe 100644 --- a/tests/unit/out/refcount/global_pointers.rs +++ b/tests/unit/out/refcount/global_pointers.rs @@ -7,7 +7,16 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(16)] pub struct Entry { diff --git a/tests/unit/out/refcount/global_without_initializer.rs b/tests/unit/out/refcount/global_without_initializer.rs index 3a0b902f95..5e1fc50180 100644 --- a/tests/unit/out/refcount/global_without_initializer.rs +++ b/tests/unit/out/refcount/global_without_initializer.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/goto_aggregate_default.rs b/tests/unit/out/refcount/goto_aggregate_default.rs index 1bd3ed041f..f388002f7e 100644 --- a/tests/unit/out/refcount/goto_aggregate_default.rs +++ b/tests/unit/out/refcount/goto_aggregate_default.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/goto_cleanup.rs b/tests/unit/out/refcount/goto_cleanup.rs index 6c7b2e00f7..eb2bc9c360 100644 --- a/tests/unit/out/refcount/goto_cleanup.rs +++ b/tests/unit/out/refcount/goto_cleanup.rs @@ -77,7 +77,16 @@ pub fn from_switch_2(mut n: i32) -> i32 { panic!("ub: non-void function does not return a value") } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(8)] pub struct wrapper { diff --git a/tests/unit/out/refcount/huffman.rs b/tests/unit/out/refcount/huffman.rs index 9e1598bcfd..b6b3c8e05d 100644 --- a/tests/unit/out/refcount/huffman.rs +++ b/tests/unit/out/refcount/huffman.rs @@ -7,7 +7,16 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(24)] pub struct MinHeapNode { diff --git a/tests/unit/out/refcount/immutable-deref-on-func-call.rs b/tests/unit/out/refcount/immutable-deref-on-func-call.rs index 60f2c6aa0d..17b3f87fec 100644 --- a/tests/unit/out/refcount/immutable-deref-on-func-call.rs +++ b/tests/unit/out/refcount/immutable-deref-on-func-call.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/in_class_field_initializer.rs b/tests/unit/out/refcount/in_class_field_initializer.rs index 9c871e8b49..3006e7846f 100644 --- a/tests/unit/out/refcount/in_class_field_initializer.rs +++ b/tests/unit/out/refcount/in_class_field_initializer.rs @@ -7,7 +7,16 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, + Copy, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, )] #[byte_size(8)] pub struct Inner { @@ -22,7 +31,16 @@ impl Default for Inner { } } #[derive( - Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, + Copy, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, )] #[byte_size(24)] pub struct S { @@ -50,7 +68,16 @@ impl Default for S { } } #[derive( - Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, + Copy, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, )] #[byte_size(8)] pub struct Boxed_int_ { diff --git a/tests/unit/out/refcount/init.rs b/tests/unit/out/refcount/init.rs index 35e6480e8f..9007e43512 100644 --- a/tests/unit/out/refcount/init.rs +++ b/tests/unit/out/refcount/init.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/init_list.rs b/tests/unit/out/refcount/init_list.rs index 97cc998466..00e4078f46 100644 --- a/tests/unit/out/refcount/init_list.rs +++ b/tests/unit/out/refcount/init_list.rs @@ -18,6 +18,7 @@ pub fn f_0(list: Vec) { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -29,7 +30,16 @@ pub struct Pair { pub b: i32, } #[derive( - Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, + Copy, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, )] #[byte_size(8)] pub struct Holder { @@ -50,7 +60,16 @@ pub fn sum_1(p: Ptr) -> i32 { return ({ p.with(|__s| __s.a) } + { p.with(|__s| __s.b) }); } #[derive( - Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, + Copy, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, )] #[byte_size(4)] pub struct Seven { diff --git a/tests/unit/out/refcount/kruskal.rs b/tests/unit/out/refcount/kruskal.rs index 0ca288b4f0..cde1489ad6 100644 --- a/tests/unit/out/refcount/kruskal.rs +++ b/tests/unit/out/refcount/kruskal.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/lambda_as_field.rs b/tests/unit/out/refcount/lambda_as_field.rs index 498186efc2..08654edae0 100644 --- a/tests/unit/out/refcount/lambda_as_field.rs +++ b/tests/unit/out/refcount/lambda_as_field.rs @@ -41,7 +41,17 @@ impl Destructible for Guard__lambda_at_lambda_as_field_cpp_45_13__ { ({ (*(*this).upgrade().deref()).f.call() }); } } -#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable)] +#[derive( + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, +)] #[byte_size(8)] pub struct Holder__lambda_at_lambda_as_field_cpp_39_12__ { #[offset(0)] @@ -65,7 +75,16 @@ impl Default for Holder__lambda_at_lambda_as_field_cpp_39_12__ { } } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(8)] pub struct Holder__lambda_at_lambda_as_field_cpp_51_12__ { diff --git a/tests/unit/out/refcount/lambda_capture_ref.rs b/tests/unit/out/refcount/lambda_capture_ref.rs index 708c81ee8f..3dbdbe1b91 100644 --- a/tests/unit/out/refcount/lambda_capture_ref.rs +++ b/tests/unit/out/refcount/lambda_capture_ref.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/lambda_capture_star_this.rs b/tests/unit/out/refcount/lambda_capture_star_this.rs index 5ac4e1d755..6e0c0342ac 100644 --- a/tests/unit/out/refcount/lambda_capture_star_this.rs +++ b/tests/unit/out/refcount/lambda_capture_star_this.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/lambda_capture_this.rs b/tests/unit/out/refcount/lambda_capture_this.rs index 6dcc0d3a5d..7292b5cfcf 100644 --- a/tests/unit/out/refcount/lambda_capture_this.rs +++ b/tests/unit/out/refcount/lambda_capture_this.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/lambda_capture_value.rs b/tests/unit/out/refcount/lambda_capture_value.rs index dd7ba0095a..da8b85451f 100644 --- a/tests/unit/out/refcount/lambda_capture_value.rs +++ b/tests/unit/out/refcount/lambda_capture_value.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/lambda_decltype_type.rs b/tests/unit/out/refcount/lambda_decltype_type.rs index caf6c587fe..e35b53aa0a 100644 --- a/tests/unit/out/refcount/lambda_decltype_type.rs +++ b/tests/unit/out/refcount/lambda_decltype_type.rs @@ -6,7 +6,17 @@ use std::io::prelude::*; use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; -#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable)] +#[derive( + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, +)] #[byte_size(24)] pub struct Sorted__lambda_at_lambda_decltype_type_cpp_22_18__ { #[offset(0)] @@ -34,7 +44,17 @@ impl Default for Sorted__lambda_at_lambda_decltype_type_cpp_22_18__ { } } } -#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable)] +#[derive( + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, +)] #[byte_size(24)] pub struct Sorted__lambda_at_lambda_decltype_type_cpp_19_23__ { #[offset(0)] diff --git a/tests/unit/out/refcount/lambda_generic_explicit_args.rs b/tests/unit/out/refcount/lambda_generic_explicit_args.rs index 4bab369ba4..2fb46d2802 100644 --- a/tests/unit/out/refcount/lambda_generic_explicit_args.rs +++ b/tests/unit/out/refcount/lambda_generic_explicit_args.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/lambda_immediate_init.rs b/tests/unit/out/refcount/lambda_immediate_init.rs index ddbfd8875f..189bf3557e 100644 --- a/tests/unit/out/refcount/lambda_immediate_init.rs +++ b/tests/unit/out/refcount/lambda_immediate_init.rs @@ -10,7 +10,16 @@ pub fn pick_0(mut x: i32) -> i32 { return x; } #[derive( - Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, + Copy, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, )] #[byte_size(8)] pub struct S { diff --git a/tests/unit/out/refcount/lambda_nested.rs b/tests/unit/out/refcount/lambda_nested.rs index 86099a1d5d..adfa20a4a3 100644 --- a/tests/unit/out/refcount/lambda_nested.rs +++ b/tests/unit/out/refcount/lambda_nested.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/lambda_static_local.rs b/tests/unit/out/refcount/lambda_static_local.rs index 19e5be804d..3bace3038e 100644 --- a/tests/unit/out/refcount/lambda_static_local.rs +++ b/tests/unit/out/refcount/lambda_static_local.rs @@ -87,6 +87,7 @@ thread_local!( VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/libc_struct_without_default.rs b/tests/unit/out/refcount/libc_struct_without_default.rs index bc3a83536c..6e9b1a84e5 100644 --- a/tests/unit/out/refcount/libc_struct_without_default.rs +++ b/tests/unit/out/refcount/libc_struct_without_default.rs @@ -40,7 +40,17 @@ impl Default for UserDefined { } } } -#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable)] +#[derive( + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, +)] #[byte_size(16)] pub struct FieldIsLibcType { #[offset(0)] diff --git a/tests/unit/out/refcount/linked_list.rs b/tests/unit/out/refcount/linked_list.rs index ff42063ca8..6a19627407 100644 --- a/tests/unit/out/refcount/linked_list.rs +++ b/tests/unit/out/refcount/linked_list.rs @@ -7,7 +7,16 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(16)] pub struct Node { diff --git a/tests/unit/out/refcount/local_anon_struct_collision.rs b/tests/unit/out/refcount/local_anon_struct_collision.rs index 160a144651..7e694d2b92 100644 --- a/tests/unit/out/refcount/local_anon_struct_collision.rs +++ b/tests/unit/out/refcount/local_anon_struct_collision.rs @@ -21,6 +21,7 @@ pub fn first_0() -> i32 { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -46,6 +47,7 @@ pub fn second_2() -> i32 { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/local_record_template.rs b/tests/unit/out/refcount/local_record_template.rs index 74cf1465ee..170b10c3cf 100644 --- a/tests/unit/out/refcount/local_record_template.rs +++ b/tests/unit/out/refcount/local_record_template.rs @@ -38,6 +38,7 @@ pub fn wrap_10(mut v: i64) -> i32 { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -55,6 +56,7 @@ pub struct Local_5 { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -76,6 +78,7 @@ pub fn other_11() -> i32 { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -108,6 +111,7 @@ fn main_0() -> i32 { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/map.rs b/tests/unit/out/refcount/map.rs index 94bb6dd99b..4a7e6f07f3 100644 --- a/tests/unit/out/refcount/map.rs +++ b/tests/unit/out/refcount/map.rs @@ -13,7 +13,16 @@ pub fn bar_1(x: Ptr) { x.write((x.read()).wrapping_add(1_u32)); } #[derive( - Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, + Copy, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, )] #[byte_size(8)] pub struct Point { diff --git a/tests/unit/out/refcount/map_key_identity.rs b/tests/unit/out/refcount/map_key_identity.rs index 0ec9a86cb1..ffdc26d200 100644 --- a/tests/unit/out/refcount/map_key_identity.rs +++ b/tests/unit/out/refcount/map_key_identity.rs @@ -18,6 +18,7 @@ thread_local!( VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -45,7 +46,16 @@ pub fn operator_eq_2(a: Ptr, b: Ptr) -> bool { return ({ a.with(|__s| __s.identity) } == { b.with(|__s| __s.identity) }); } #[derive( - Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, + Copy, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, )] #[byte_size(4)] pub struct Mapped { diff --git a/tests/unit/out/refcount/map_try_emplace.rs b/tests/unit/out/refcount/map_try_emplace.rs index 91b4c07264..bb5024b0de 100644 --- a/tests/unit/out/refcount/map_try_emplace.rs +++ b/tests/unit/out/refcount/map_try_emplace.rs @@ -75,7 +75,16 @@ pub fn argument_4(item: Ptr) -> Ptr { return (item).clone(); } #[derive( - Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, + Copy, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, )] #[byte_size(4)] pub struct RefItem { diff --git a/tests/unit/out/refcount/map_try_emplace_lvalues.rs b/tests/unit/out/refcount/map_try_emplace_lvalues.rs index 8b0d8eb496..c99508a1ec 100644 --- a/tests/unit/out/refcount/map_try_emplace_lvalues.rs +++ b/tests/unit/out/refcount/map_try_emplace_lvalues.rs @@ -13,7 +13,16 @@ thread_local!( pub static visits_1: Value = Rc::new(RefCell::new(0)); ); #[derive( - Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, + Copy, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, )] #[byte_size(4)] pub struct Item { @@ -44,7 +53,17 @@ pub fn place_3(n: Ptr) -> Ptr { thread_local!( pub static temporary_calls_4: Value = Rc::new(RefCell::new(0)); ); -#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable)] +#[derive( + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, +)] #[byte_size(12)] pub struct Temporary { #[offset(0)] @@ -66,7 +85,16 @@ impl Default for Temporary { } } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(12)] pub struct Nested { @@ -119,7 +147,16 @@ impl Default for Noncopy { } } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, CppFrom, Destructible, Copyable, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + CppFrom, + Destructible, + TriviallyCopyable, + Copyable, )] #[cpp_from(i32, construct_1, ptr)] #[byte_size(8)] diff --git a/tests/unit/out/refcount/memcpy_struct_bytes.rs b/tests/unit/out/refcount/memcpy_struct_bytes.rs index 91d682ee59..50cba01c60 100644 --- a/tests/unit/out/refcount/memcpy_struct_bytes.rs +++ b/tests/unit/out/refcount/memcpy_struct_bytes.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/memcpy_struct_layouts.rs b/tests/unit/out/refcount/memcpy_struct_layouts.rs index 7775a6e873..93881aa084 100644 --- a/tests/unit/out/refcount/memcpy_struct_layouts.rs +++ b/tests/unit/out/refcount/memcpy_struct_layouts.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -38,6 +39,7 @@ pub struct packed { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -59,6 +61,7 @@ pub struct reordered { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -78,6 +81,7 @@ pub struct tail { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -89,7 +93,17 @@ pub struct nested { #[offset(16)] pub c: i8, } -#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable)] +#[derive( + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, +)] #[byte_size(8)] pub struct array { #[offset(0)] diff --git a/tests/unit/out/refcount/memcpy_struct_struct.rs b/tests/unit/out/refcount/memcpy_struct_struct.rs index 830e7b3bbb..38529d22bc 100644 --- a/tests/unit/out/refcount/memcpy_struct_struct.rs +++ b/tests/unit/out/refcount/memcpy_struct_struct.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/memset_struct_tail.rs b/tests/unit/out/refcount/memset_struct_tail.rs index f153f64372..7c45f16525 100644 --- a/tests/unit/out/refcount/memset_struct_tail.rs +++ b/tests/unit/out/refcount/memset_struct_tail.rs @@ -6,7 +6,17 @@ use std::io::prelude::*; use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; -#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable)] +#[derive( + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, +)] #[byte_size(32)] pub struct S { #[offset(0)] diff --git a/tests/unit/out/refcount/nested_structs.rs b/tests/unit/out/refcount/nested_structs.rs index 0a458a2036..9272a7afa2 100644 --- a/tests/unit/out/refcount/nested_structs.rs +++ b/tests/unit/out/refcount/nested_structs.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -32,6 +33,7 @@ pub struct Level0_Level1_1_Level2_1_Level3_1 { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -51,6 +53,7 @@ pub struct Level0_Level1_1_Level2_1_Level3_2 { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -68,6 +71,7 @@ pub struct Level0_Level1_1_Level2_1 { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -85,6 +89,7 @@ pub struct Level0_Level1_1 { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -104,6 +109,7 @@ pub struct Level0_Level1_2 { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/new.rs b/tests/unit/out/refcount/new.rs index 221cae51ee..db370992a7 100644 --- a/tests/unit/out/refcount/new.rs +++ b/tests/unit/out/refcount/new.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/new_bst.rs b/tests/unit/out/refcount/new_bst.rs index 858cab58f3..dc4409f397 100644 --- a/tests/unit/out/refcount/new_bst.rs +++ b/tests/unit/out/refcount/new_bst.rs @@ -7,7 +7,16 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(24)] pub struct node_t { diff --git a/tests/unit/out/refcount/new_struct.rs b/tests/unit/out/refcount/new_struct.rs index 4cc30a0eb4..6c6621a42a 100644 --- a/tests/unit/out/refcount/new_struct.rs +++ b/tests/unit/out/refcount/new_struct.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -34,6 +35,7 @@ pub struct Pair { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/nttp_distinct_specializations.rs b/tests/unit/out/refcount/nttp_distinct_specializations.rs index b5dc29044c..02d7dafa3d 100644 --- a/tests/unit/out/refcount/nttp_distinct_specializations.rs +++ b/tests/unit/out/refcount/nttp_distinct_specializations.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -34,6 +35,7 @@ pub struct S_2_ { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -51,6 +53,7 @@ pub struct S_1_ { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/offsetof.rs b/tests/unit/out/refcount/offsetof.rs index 36994ff6b2..2b80d58402 100644 --- a/tests/unit/out/refcount/offsetof.rs +++ b/tests/unit/out/refcount/offsetof.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -27,7 +28,17 @@ pub struct Layout { #[offset(8)] pub c: u16, } -#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable)] +#[derive( + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, +)] #[byte_size(66)] pub struct Frame { #[offset(0)] diff --git a/tests/unit/out/refcount/opaque_forward_decl.rs b/tests/unit/out/refcount/opaque_forward_decl.rs index 8cf372314e..7e22002f1b 100644 --- a/tests/unit/out/refcount/opaque_forward_decl.rs +++ b/tests/unit/out/refcount/opaque_forward_decl.rs @@ -7,7 +7,16 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(16)] pub struct container { diff --git a/tests/unit/out/refcount/opaque_record_copy.rs b/tests/unit/out/refcount/opaque_record_copy.rs index 895fb5a3d3..1da80b8d79 100644 --- a/tests/unit/out/refcount/opaque_record_copy.rs +++ b/tests/unit/out/refcount/opaque_record_copy.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -29,6 +30,7 @@ pub struct Probe {} VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/opaque_then_defined.rs b/tests/unit/out/refcount/opaque_then_defined.rs index 2431b3fa76..edde86f54d 100644 --- a/tests/unit/out/refcount/opaque_then_defined.rs +++ b/tests/unit/out/refcount/opaque_then_defined.rs @@ -7,7 +7,16 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(16)] pub struct list { @@ -18,7 +27,16 @@ pub struct list { pub size: i32, } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(16)] pub struct node { diff --git a/tests/unit/out/refcount/operator_arithmetic_free.rs b/tests/unit/out/refcount/operator_arithmetic_free.rs index 0e6fc29041..2c26109484 100644 --- a/tests/unit/out/refcount/operator_arithmetic_free.rs +++ b/tests/unit/out/refcount/operator_arithmetic_free.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/operator_arithmetic_member.rs b/tests/unit/out/refcount/operator_arithmetic_member.rs index e6cfbe1295..bb2b2ae7f3 100644 --- a/tests/unit/out/refcount/operator_arithmetic_member.rs +++ b/tests/unit/out/refcount/operator_arithmetic_member.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/operator_bitwise_free.rs b/tests/unit/out/refcount/operator_bitwise_free.rs index 6e924fec5e..33d0ca1d10 100644 --- a/tests/unit/out/refcount/operator_bitwise_free.rs +++ b/tests/unit/out/refcount/operator_bitwise_free.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/operator_bitwise_member.rs b/tests/unit/out/refcount/operator_bitwise_member.rs index 87bf27bf14..dea131ace8 100644 --- a/tests/unit/out/refcount/operator_bitwise_member.rs +++ b/tests/unit/out/refcount/operator_bitwise_member.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/operator_comparison_defaulted.rs b/tests/unit/out/refcount/operator_comparison_defaulted.rs index 24c07de6a9..f6d188442d 100644 --- a/tests/unit/out/refcount/operator_comparison_defaulted.rs +++ b/tests/unit/out/refcount/operator_comparison_defaulted.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -39,6 +40,7 @@ impl CppEq for Eq { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -68,6 +70,7 @@ impl CppEq for Cmp { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -95,6 +98,7 @@ impl CppEq for Both { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -122,6 +126,7 @@ impl CppEq for OrdOnly { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -149,6 +154,7 @@ impl CppEq for Inner { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -179,6 +185,7 @@ impl CppEq for Outer { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -198,7 +205,16 @@ impl CppEq for Secondary { } } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(8)] pub struct PtrMember { diff --git a/tests/unit/out/refcount/operator_comparison_free.rs b/tests/unit/out/refcount/operator_comparison_free.rs index f71a6e8aee..5223c2501d 100644 --- a/tests/unit/out/refcount/operator_comparison_free.rs +++ b/tests/unit/out/refcount/operator_comparison_free.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -66,6 +67,7 @@ pub fn operator_lt_7(mut a: i32, b: Ptr) -> bool { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/operator_comparison_member.rs b/tests/unit/out/refcount/operator_comparison_member.rs index 05666dc49e..5a6c2e1763 100644 --- a/tests/unit/out/refcount/operator_comparison_member.rs +++ b/tests/unit/out/refcount/operator_comparison_member.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/operator_comparison_mixed.rs b/tests/unit/out/refcount/operator_comparison_mixed.rs index 471115e727..fa55140b48 100644 --- a/tests/unit/out/refcount/operator_comparison_mixed.rs +++ b/tests/unit/out/refcount/operator_comparison_mixed.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/operator_comparison_nonbool.rs b/tests/unit/out/refcount/operator_comparison_nonbool.rs index 3ce340e94a..a2c92ff47f 100644 --- a/tests/unit/out/refcount/operator_comparison_nonbool.rs +++ b/tests/unit/out/refcount/operator_comparison_nonbool.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -60,6 +61,7 @@ pub fn operator_ge_5(mut a: X, mut b: X) -> i32 { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -77,6 +79,7 @@ pub struct Result { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -94,6 +97,7 @@ pub struct Custom { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -122,6 +126,7 @@ impl CppEq for Mixed { FnPtrArg, CppFrom, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -140,6 +145,7 @@ pub struct MyBool { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -201,6 +207,7 @@ thread_local!( VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/operator_compound_assignment_free.rs b/tests/unit/out/refcount/operator_compound_assignment_free.rs index 56b85f7015..b3a3824a9f 100644 --- a/tests/unit/out/refcount/operator_compound_assignment_free.rs +++ b/tests/unit/out/refcount/operator_compound_assignment_free.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/operator_compound_assignment_member.rs b/tests/unit/out/refcount/operator_compound_assignment_member.rs index 2617630e38..3ebf598309 100644 --- a/tests/unit/out/refcount/operator_compound_assignment_member.rs +++ b/tests/unit/out/refcount/operator_compound_assignment_member.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/operator_friend.rs b/tests/unit/out/refcount/operator_friend.rs index c39d0b434a..33a54f3062 100644 --- a/tests/unit/out/refcount/operator_friend.rs +++ b/tests/unit/out/refcount/operator_friend.rs @@ -19,6 +19,7 @@ pub fn operator_eq_0(_a0: Ptr, _a1: Ptr) -> bool { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -58,6 +59,7 @@ pub fn operator_eq_2(_a0: Ptr, _a1: Ptr) -> bool { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -96,6 +98,7 @@ pub fn operator_add_5(x: Ptr, y: Ptr) -> Inline { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -123,6 +126,7 @@ impl CppEq for Inline { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -160,6 +164,7 @@ pub fn operator_eq_10(x: Ptr, y: Ptr) -> bool { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -187,6 +192,7 @@ impl CppEq for Tmpl_int_ { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -207,6 +213,7 @@ pub fn operator_eq_11(_a0: Ptr, _a1: Ptr VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/operator_less_than.rs b/tests/unit/out/refcount/operator_less_than.rs index 5eeef3d0d0..45d7b6bb6c 100644 --- a/tests/unit/out/refcount/operator_less_than.rs +++ b/tests/unit/out/refcount/operator_less_than.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/operator_logical_free.rs b/tests/unit/out/refcount/operator_logical_free.rs index 48c1b5c6bc..7efdc067c8 100644 --- a/tests/unit/out/refcount/operator_logical_free.rs +++ b/tests/unit/out/refcount/operator_logical_free.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/operator_logical_member.rs b/tests/unit/out/refcount/operator_logical_member.rs index 5345dbd5f5..4f4f581c1e 100644 --- a/tests/unit/out/refcount/operator_logical_member.rs +++ b/tests/unit/out/refcount/operator_logical_member.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/operator_member_pointer_free.rs b/tests/unit/out/refcount/operator_member_pointer_free.rs index 2c66cb5afb..a8d20f16f0 100644 --- a/tests/unit/out/refcount/operator_member_pointer_free.rs +++ b/tests/unit/out/refcount/operator_member_pointer_free.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -23,7 +24,17 @@ pub struct Inner { #[offset(0)] pub x: i32, } -#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable)] +#[derive( + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, +)] #[byte_size(16)] pub struct S { #[offset(0)] diff --git a/tests/unit/out/refcount/operator_member_pointer_member.rs b/tests/unit/out/refcount/operator_member_pointer_member.rs index 86d4510d24..c086488ce5 100644 --- a/tests/unit/out/refcount/operator_member_pointer_member.rs +++ b/tests/unit/out/refcount/operator_member_pointer_member.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -32,6 +33,7 @@ pub struct Inner { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -45,7 +47,17 @@ impl Table { thread_local!( pub static table_0: Value> = Rc::new(RefCell::new(Box::new([7, 8, 9]))); ); -#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable)] +#[derive( + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, +)] #[byte_size(16)] pub struct S { #[offset(0)] diff --git a/tests/unit/out/refcount/operator_other_free.rs b/tests/unit/out/refcount/operator_other_free.rs index 409ab783e2..9fea00ed34 100644 --- a/tests/unit/out/refcount/operator_other_free.rs +++ b/tests/unit/out/refcount/operator_other_free.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/operator_other_member.rs b/tests/unit/out/refcount/operator_other_member.rs index 6fcd805ee8..d91b490e81 100644 --- a/tests/unit/out/refcount/operator_other_member.rs +++ b/tests/unit/out/refcount/operator_other_member.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -35,6 +36,7 @@ impl Static { FnPtrArg, CppFrom, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/operator_overloads.rs b/tests/unit/out/refcount/operator_overloads.rs index 8846356ec0..85a2d36afb 100644 --- a/tests/unit/out/refcount/operator_overloads.rs +++ b/tests/unit/out/refcount/operator_overloads.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/operator_qualifiers.rs b/tests/unit/out/refcount/operator_qualifiers.rs index 1f63235bb0..3ed1b3597f 100644 --- a/tests/unit/out/refcount/operator_qualifiers.rs +++ b/tests/unit/out/refcount/operator_qualifiers.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/operator_three_way.rs b/tests/unit/out/refcount/operator_three_way.rs index 1483c52297..6402d6e398 100644 --- a/tests/unit/out/refcount/operator_three_way.rs +++ b/tests/unit/out/refcount/operator_three_way.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/operator_traits.rs b/tests/unit/out/refcount/operator_traits.rs index 6ad9644827..b6c7f9c0b6 100644 --- a/tests/unit/out/refcount/operator_traits.rs +++ b/tests/unit/out/refcount/operator_traits.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -42,6 +43,7 @@ impl CppEq for Lt { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -64,6 +66,7 @@ impl CppEq for Eq { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -91,6 +94,7 @@ impl CppEq for Cmp { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -124,6 +128,7 @@ pub fn operator_eq_1(a: Ptr, b: Ptr) -> bool { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/overload_mangling.rs b/tests/unit/out/refcount/overload_mangling.rs index 8d5fc58c8d..1ae9bb8f96 100644 --- a/tests/unit/out/refcount/overload_mangling.rs +++ b/tests/unit/out/refcount/overload_mangling.rs @@ -28,6 +28,7 @@ pub fn twice_2(mut n: i32) -> i32 { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -42,6 +43,7 @@ pub struct Access_S_ {} VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -59,6 +61,7 @@ pub struct S { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/pair_converting_construction.rs b/tests/unit/out/refcount/pair_converting_construction.rs index 2024ff7b28..9f2afd6b6e 100644 --- a/tests/unit/out/refcount/pair_converting_construction.rs +++ b/tests/unit/out/refcount/pair_converting_construction.rs @@ -16,6 +16,7 @@ use std::rc::{Rc, Weak}; FnPtrArg, CppFrom, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -35,6 +36,7 @@ pub struct Celsius { FnPtrArg, CppFrom, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -54,6 +56,7 @@ pub struct Meters { FnPtrArg, CppFrom, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -73,6 +76,7 @@ pub struct Label { FnPtrArg, CppFrom, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -95,6 +99,7 @@ pub struct Owner { FnPtrArg, CppFrom, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -114,6 +119,7 @@ pub struct Holder { FnPtrArg, CppFrom, Destructible, + TriviallyCopyable, Copyable, )] #[cpp_from(i32, construct, value)] @@ -142,6 +148,7 @@ impl Default for Fallback { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -160,6 +167,7 @@ pub struct Counter { FnPtrArg, CppFrom, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -179,6 +187,7 @@ pub struct Observer { FnPtrArg, CppFrom, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -198,6 +207,7 @@ pub struct Tag { FnPtrArg, CppFrom, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/pod.rs b/tests/unit/out/refcount/pod.rs index 93604057df..0ad57e6f58 100644 --- a/tests/unit/out/refcount/pod.rs +++ b/tests/unit/out/refcount/pod.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/pointer_array.rs b/tests/unit/out/refcount/pointer_array.rs index 5a6f756a60..97581343fd 100644 --- a/tests/unit/out/refcount/pointer_array.rs +++ b/tests/unit/out/refcount/pointer_array.rs @@ -6,7 +6,17 @@ use std::io::prelude::*; use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; -#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable)] +#[derive( + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, +)] #[byte_size(24)] pub struct StackArray { #[offset(0)] diff --git a/tests/unit/out/refcount/pointers.rs b/tests/unit/out/refcount/pointers.rs index 00b9e937ac..510b5b0ace 100644 --- a/tests/unit/out/refcount/pointers.rs +++ b/tests/unit/out/refcount/pointers.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/ptr_cast_init.rs b/tests/unit/out/refcount/ptr_cast_init.rs index 73cfebcf5f..9a9a1a785e 100644 --- a/tests/unit/out/refcount/ptr_cast_init.rs +++ b/tests/unit/out/refcount/ptr_cast_init.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -34,6 +35,7 @@ pub struct header { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/push_emplace_back.rs b/tests/unit/out/refcount/push_emplace_back.rs index 0c7f4806cd..393b4e2e8e 100644 --- a/tests/unit/out/refcount/push_emplace_back.rs +++ b/tests/unit/out/refcount/push_emplace_back.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -24,7 +25,16 @@ pub struct Chunk { pub data: i32, } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(16)] pub struct Writer { @@ -143,6 +153,7 @@ pub fn self_ref_push_6(mut comps: Ptr>) { FnPtrArg, CppFrom, Destructible, + TriviallyCopyable, Copyable, )] #[cpp_from(i32, construct_1, value)] @@ -365,7 +376,17 @@ pub fn emplace_from_element_14(mut v: Ptr>>) { v.with_mut(|__v: &mut Vec>| __v.push(__tmp_14)); }; } -#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable)] +#[derive( + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, +)] #[byte_size(24)] pub struct Plain { #[offset(0)] @@ -407,6 +428,7 @@ thread_local!( VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/random.rs b/tests/unit/out/refcount/random.rs index 2ffcd7de94..4612fdf593 100644 --- a/tests/unit/out/refcount/random.rs +++ b/tests/unit/out/refcount/random.rs @@ -6,7 +6,17 @@ use std::io::prelude::*; use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; -#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable)] +#[derive( + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, +)] #[byte_size(72)] pub struct Pair { #[offset(0)] @@ -60,6 +70,7 @@ pub fn zero_0() -> i32 { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/reference_wrapper.rs b/tests/unit/out/refcount/reference_wrapper.rs index a04c1d154d..0031d6d505 100644 --- a/tests/unit/out/refcount/reference_wrapper.rs +++ b/tests/unit/out/refcount/reference_wrapper.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/references.rs b/tests/unit/out/refcount/references.rs index 6ff278f0e7..f3ba099ac2 100644 --- a/tests/unit/out/refcount/references.rs +++ b/tests/unit/out/refcount/references.rs @@ -6,7 +6,17 @@ use std::io::prelude::*; use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; -#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable)] +#[derive( + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, +)] #[byte_size(16)] pub struct Pair { #[offset(0)] @@ -30,7 +40,16 @@ impl Default for Pair { } } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(16)] pub struct Nested { diff --git a/tests/unit/out/refcount/refs_as_args.rs b/tests/unit/out/refcount/refs_as_args.rs index b2dfbc5d6a..fa14d671fb 100644 --- a/tests/unit/out/refcount/refs_as_args.rs +++ b/tests/unit/out/refcount/refs_as_args.rs @@ -39,6 +39,7 @@ pub fn more_refs_0(x1: i32, x2: i32, r1: Ptr, r2: Ptr) { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/reinterpret_cast_ptr_cmp.rs b/tests/unit/out/refcount/reinterpret_cast_ptr_cmp.rs index efe2391dbf..27d4cdb584 100644 --- a/tests/unit/out/refcount/reinterpret_cast_ptr_cmp.rs +++ b/tests/unit/out/refcount/reinterpret_cast_ptr_cmp.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -25,7 +26,17 @@ pub struct S { #[offset(4)] pub y: i32, } -#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable)] +#[derive( + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, +)] #[byte_size(28)] pub struct W { #[offset(0)] @@ -45,7 +56,17 @@ impl Default for W { } } } -#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable)] +#[derive( + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, +)] #[byte_size(32)] pub struct P { #[offset(0)] diff --git a/tests/unit/out/refcount/reinterpret_cast_struct.rs b/tests/unit/out/refcount/reinterpret_cast_struct.rs index 9d25cc866c..762768e98d 100644 --- a/tests/unit/out/refcount/reinterpret_cast_struct.rs +++ b/tests/unit/out/refcount/reinterpret_cast_struct.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/reinterpret_cast_struct_to_struct.rs b/tests/unit/out/refcount/reinterpret_cast_struct_to_struct.rs index 2e5f87afc4..bbda224d7c 100644 --- a/tests/unit/out/refcount/reinterpret_cast_struct_to_struct.rs +++ b/tests/unit/out/refcount/reinterpret_cast_struct_to_struct.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -34,6 +35,7 @@ pub struct Point { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/reserved_keywords.rs b/tests/unit/out/refcount/reserved_keywords.rs index fcc83ace8d..614215f853 100644 --- a/tests/unit/out/refcount/reserved_keywords.rs +++ b/tests/unit/out/refcount/reserved_keywords.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -106,6 +107,7 @@ pub struct S { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -123,6 +125,7 @@ pub struct type_ { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/return_move.rs b/tests/unit/out/refcount/return_move.rs index 6efac38e6b..d0af211e1a 100644 --- a/tests/unit/out/refcount/return_move.rs +++ b/tests/unit/out/refcount/return_move.rs @@ -7,7 +7,16 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(16)] pub struct node { @@ -18,7 +27,16 @@ pub struct node { pub next: Ptr, } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(16)] pub struct pair_t { diff --git a/tests/unit/out/refcount/rvalue_struct.rs b/tests/unit/out/refcount/rvalue_struct.rs index 411b2fa2f9..d48e183b9a 100644 --- a/tests/unit/out/refcount/rvalue_struct.rs +++ b/tests/unit/out/refcount/rvalue_struct.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/scalar_builtin_construct_destruct.rs b/tests/unit/out/refcount/scalar_builtin_construct_destruct.rs index ed4aea1f54..f79583da4d 100644 --- a/tests/unit/out/refcount/scalar_builtin_construct_destruct.rs +++ b/tests/unit/out/refcount/scalar_builtin_construct_destruct.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/self_referencing_initializer.rs b/tests/unit/out/refcount/self_referencing_initializer.rs index 1d66d96e9a..5e9b2460e8 100644 --- a/tests/unit/out/refcount/self_referencing_initializer.rs +++ b/tests/unit/out/refcount/self_referencing_initializer.rs @@ -7,7 +7,16 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(8)] pub struct list_head { @@ -16,7 +25,16 @@ pub struct list_head { pub next: Ptr, } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(16)] pub struct node { @@ -26,7 +44,17 @@ pub struct node { #[byte_size(8)] pub value_ptr: Ptr, } -#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable)] +#[derive( + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, +)] #[byte_size(16)] pub struct node_with_defaults { #[offset(0)] diff --git a/tests/unit/out/refcount/size_t_static_member.rs b/tests/unit/out/refcount/size_t_static_member.rs index 770ab41197..fdf3cfe6d7 100644 --- a/tests/unit/out/refcount/size_t_static_member.rs +++ b/tests/unit/out/refcount/size_t_static_member.rs @@ -18,6 +18,7 @@ thread_local!( VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -35,6 +36,7 @@ thread_local!( VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/size_t_template_param.rs b/tests/unit/out/refcount/size_t_template_param.rs index a4ba0a95ed..732a7fe720 100644 --- a/tests/unit/out/refcount/size_t_template_param.rs +++ b/tests/unit/out/refcount/size_t_template_param.rs @@ -20,6 +20,7 @@ pub fn array_ref_0(a: Ptr) -> u64 { FnPtrArg, CppFrom, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -39,6 +40,7 @@ pub struct PtrCtor_unsigned_long_ { FnPtrArg, CppFrom, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/static_local.rs b/tests/unit/out/refcount/static_local.rs index 3ed175144e..592e14439f 100644 --- a/tests/unit/out/refcount/static_local.rs +++ b/tests/unit/out/refcount/static_local.rs @@ -42,6 +42,7 @@ thread_local!( VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/static_var_in_class.rs b/tests/unit/out/refcount/static_var_in_class.rs index 8d391a6b1b..18c32915d4 100644 --- a/tests/unit/out/refcount/static_var_in_class.rs +++ b/tests/unit/out/refcount/static_var_in_class.rs @@ -18,6 +18,7 @@ thread_local!( VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -37,6 +38,7 @@ pub const anon_3_kValue: anon_3 = 3; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/stdcopy.rs b/tests/unit/out/refcount/stdcopy.rs index 6d528d4b26..efca0fbcac 100644 --- a/tests/unit/out/refcount/stdcopy.rs +++ b/tests/unit/out/refcount/stdcopy.rs @@ -16,6 +16,7 @@ use std::rc::{Rc, Weak}; FnPtrArg, CppFrom, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/strdup.rs b/tests/unit/out/refcount/strdup.rs index 9b7f36ba1c..9ef21abec9 100644 --- a/tests/unit/out/refcount/strdup.rs +++ b/tests/unit/out/refcount/strdup.rs @@ -7,7 +7,16 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(8)] pub struct record { diff --git a/tests/unit/out/refcount/string_literal_ptr_init.rs b/tests/unit/out/refcount/string_literal_ptr_init.rs index a9db369bff..3aa7ccb71b 100644 --- a/tests/unit/out/refcount/string_literal_ptr_init.rs +++ b/tests/unit/out/refcount/string_literal_ptr_init.rs @@ -7,7 +7,16 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(24)] pub struct label { diff --git a/tests/unit/out/refcount/string_substr.rs b/tests/unit/out/refcount/string_substr.rs index 9654157b5f..3010b4fad8 100644 --- a/tests/unit/out/refcount/string_substr.rs +++ b/tests/unit/out/refcount/string_substr.rs @@ -7,7 +7,16 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(8)] pub struct Text { diff --git a/tests/unit/out/refcount/struct_2d_array_field.rs b/tests/unit/out/refcount/struct_2d_array_field.rs index 8d55fa4e4c..af5e08aa4c 100644 --- a/tests/unit/out/refcount/struct_2d_array_field.rs +++ b/tests/unit/out/refcount/struct_2d_array_field.rs @@ -6,7 +6,17 @@ use std::io::prelude::*; use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; -#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable)] +#[derive( + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, +)] #[byte_size(40)] pub struct table { #[offset(0)] diff --git a/tests/unit/out/refcount/struct_ctor.rs b/tests/unit/out/refcount/struct_ctor.rs index 5c43658f37..29ba151c96 100644 --- a/tests/unit/out/refcount/struct_ctor.rs +++ b/tests/unit/out/refcount/struct_ctor.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -38,6 +39,7 @@ pub fn foo_0(x: Ptr) -> Ptr { FnPtrArg, CppFrom, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -48,7 +50,16 @@ pub struct Value_ { pub v: i32, } #[derive( - Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, + Copy, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, )] #[byte_size(8)] pub struct Ptr_ { diff --git a/tests/unit/out/refcount/struct_default_ctor.rs b/tests/unit/out/refcount/struct_default_ctor.rs index 86fbc7a211..fcb23804af 100644 --- a/tests/unit/out/refcount/struct_default_ctor.rs +++ b/tests/unit/out/refcount/struct_default_ctor.rs @@ -7,7 +7,16 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, + Copy, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, )] #[byte_size(8)] pub struct S { @@ -36,6 +45,7 @@ impl Default for S { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -44,7 +54,17 @@ pub struct Declared { #[offset(0)] pub v: i32, } -#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable)] +#[derive( + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, +)] #[byte_size(16)] pub struct Holder { #[offset(0)] @@ -65,7 +85,16 @@ thread_local!( pub static kInit_0: Value = Rc::new(RefCell::new(3)); ); #[derive( - Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, + Copy, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, )] #[byte_size(4)] pub struct FromStatic { diff --git a/tests/unit/out/refcount/struct_member_array_adjacency.rs b/tests/unit/out/refcount/struct_member_array_adjacency.rs index 0f42dbdec4..d08635aa8e 100644 --- a/tests/unit/out/refcount/struct_member_array_adjacency.rs +++ b/tests/unit/out/refcount/struct_member_array_adjacency.rs @@ -6,7 +6,17 @@ use std::io::prelude::*; use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; -#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable)] +#[derive( + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, +)] #[byte_size(32)] pub struct pair { #[offset(0)] diff --git a/tests/unit/out/refcount/struct_ptr.rs b/tests/unit/out/refcount/struct_ptr.rs index 645a01d1e2..fb20d7e384 100644 --- a/tests/unit/out/refcount/struct_ptr.rs +++ b/tests/unit/out/refcount/struct_ptr.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/structured_binding_range_for.rs b/tests/unit/out/refcount/structured_binding_range_for.rs index 7569d20585..108974a8d8 100644 --- a/tests/unit/out/refcount/structured_binding_range_for.rs +++ b/tests/unit/out/refcount/structured_binding_range_for.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/structured_binding_ref.rs b/tests/unit/out/refcount/structured_binding_ref.rs index 6e61003ae0..bd4d1598e0 100644 --- a/tests/unit/out/refcount/structured_binding_ref.rs +++ b/tests/unit/out/refcount/structured_binding_ref.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/structured_binding_trivial.rs b/tests/unit/out/refcount/structured_binding_trivial.rs index 49f6ed7177..0a858eb277 100644 --- a/tests/unit/out/refcount/structured_binding_trivial.rs +++ b/tests/unit/out/refcount/structured_binding_trivial.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/tag_vs_identifier_collision.rs b/tests/unit/out/refcount/tag_vs_identifier_collision.rs index 626a554da7..f74af165ad 100644 --- a/tests/unit/out/refcount/tag_vs_identifier_collision.rs +++ b/tests/unit/out/refcount/tag_vs_identifier_collision.rs @@ -19,6 +19,7 @@ pub const widget_enum_MODE_DONE: widget_enum = 2; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -38,6 +39,7 @@ pub struct widget { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -48,7 +50,9 @@ pub struct point_struct { #[offset(4)] pub y: i32, } -#[derive(VaArg, FnPtrArg, Destructible, Copyable, ByteRepr, Clone, ZeroInitialization)] +#[derive( + VaArg, FnPtrArg, Destructible, TriviallyCopyable, Copyable, ByteRepr, Clone, ZeroInitialization, +)] #[byte_size(4)] pub struct point { #[offset(0)] @@ -71,7 +75,9 @@ impl Default for point { } } } -#[derive(VaArg, FnPtrArg, Destructible, Copyable, ByteRepr, Clone, ZeroInitialization)] +#[derive( + VaArg, FnPtrArg, Destructible, TriviallyCopyable, Copyable, ByteRepr, Clone, ZeroInitialization, +)] #[byte_size(4)] pub struct slot_union { #[offset(0)] @@ -106,6 +112,7 @@ pub const slot_SLOT_B: slot = 1; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -123,6 +130,7 @@ pub struct Inner { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -141,6 +149,7 @@ pub struct Outer { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/template_default_arg.rs b/tests/unit/out/refcount/template_default_arg.rs index 30b1ab8560..dbb60dbc75 100644 --- a/tests/unit/out/refcount/template_default_arg.rs +++ b/tests/unit/out/refcount/template_default_arg.rs @@ -16,6 +16,7 @@ use std::rc::{Rc, Weak}; FnPtrArg, CppFrom, Destructible, + TriviallyCopyable, Copyable, )] #[cpp_from(i32, construct_1, value)] @@ -36,7 +37,16 @@ impl Default for A { } } #[derive( - Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, + Copy, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, )] #[byte_size(4)] pub struct B { @@ -64,6 +74,7 @@ impl Default for B { FnPtrArg, CppFrom, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -95,6 +106,7 @@ pub fn always_given_3(mut x: NoDefault) -> i32 { FnPtrArg, CppFrom, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/template_static_member.rs b/tests/unit/out/refcount/template_static_member.rs index 94e9f890ae..437d622b32 100644 --- a/tests/unit/out/refcount/template_static_member.rs +++ b/tests/unit/out/refcount/template_static_member.rs @@ -18,6 +18,7 @@ thread_local!( VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -35,6 +36,7 @@ thread_local!( VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -52,6 +54,7 @@ thread_local!( VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -72,6 +75,7 @@ thread_local!( VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -92,6 +96,7 @@ thread_local!( VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/temporary_field_ctor_arg.rs b/tests/unit/out/refcount/temporary_field_ctor_arg.rs index fcc400eb16..6faceac316 100644 --- a/tests/unit/out/refcount/temporary_field_ctor_arg.rs +++ b/tests/unit/out/refcount/temporary_field_ctor_arg.rs @@ -42,6 +42,7 @@ pub fn make_0() -> Outer { FnPtrArg, CppFrom, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/this.rs b/tests/unit/out/refcount/this.rs index 6dab3b2ea8..6535d79cc7 100644 --- a/tests/unit/out/refcount/this.rs +++ b/tests/unit/out/refcount/this.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; FnPtrArg, CppFrom, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -40,6 +41,7 @@ pub fn bump_0(mut p: Ptr) { FnPtrArg, CppFrom, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/typedef-anon-struct.rs b/tests/unit/out/refcount/typedef-anon-struct.rs index 5510475574..9c9246cac3 100644 --- a/tests/unit/out/refcount/typedef-anon-struct.rs +++ b/tests/unit/out/refcount/typedef-anon-struct.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/unary_expr_or_type_trait.rs b/tests/unit/out/refcount/unary_expr_or_type_trait.rs index 3b5fb0661b..b7e8a55cfa 100644 --- a/tests/unit/out/refcount/unary_expr_or_type_trait.rs +++ b/tests/unit/out/refcount/unary_expr_or_type_trait.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/unboxed_locals.rs b/tests/unit/out/refcount/unboxed_locals.rs index ff2b8f3c91..c3b541ba36 100644 --- a/tests/unit/out/refcount/unboxed_locals.rs +++ b/tests/unit/out/refcount/unboxed_locals.rs @@ -23,6 +23,7 @@ pub fn inc_1(r: Ptr) { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/unboxed_records.rs b/tests/unit/out/refcount/unboxed_records.rs index ddb769339e..da87ae877a 100644 --- a/tests/unit/out/refcount/unboxed_records.rs +++ b/tests/unit/out/refcount/unboxed_records.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -25,7 +26,17 @@ pub struct Inner { #[offset(4)] pub b: i32, } -#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable)] +#[derive( + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, +)] #[byte_size(48)] pub struct Cookie { #[offset(0)] @@ -58,7 +69,16 @@ impl Default for Cookie { } } #[derive( - Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, + Copy, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, )] #[byte_size(4)] pub struct Counter { diff --git a/tests/unit/out/refcount/union_addrof_external.rs b/tests/unit/out/refcount/union_addrof_external.rs index ca4c741423..2428b5a248 100644 --- a/tests/unit/out/refcount/union_addrof_external.rs +++ b/tests/unit/out/refcount/union_addrof_external.rs @@ -6,7 +6,17 @@ use std::io::prelude::*; use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; -#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable)] +#[derive( + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, +)] #[byte_size(16)] pub struct record { #[offset(0)] @@ -32,7 +42,9 @@ impl Default for record { } } } -#[derive(VaArg, FnPtrArg, Destructible, Copyable, ByteRepr, Clone, ZeroInitialization)] +#[derive( + VaArg, FnPtrArg, Destructible, TriviallyCopyable, Copyable, ByteRepr, Clone, ZeroInitialization, +)] #[byte_size(128)] pub struct anon_0 { #[offset(0)] @@ -56,7 +68,16 @@ impl Default for anon_0 { } } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(128)] pub struct Container { diff --git a/tests/unit/out/refcount/union_basic.rs b/tests/unit/out/refcount/union_basic.rs index f2c09a44d4..49e772bf6a 100644 --- a/tests/unit/out/refcount/union_basic.rs +++ b/tests/unit/out/refcount/union_basic.rs @@ -6,7 +6,9 @@ use std::io::prelude::*; use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; -#[derive(VaArg, FnPtrArg, Destructible, Copyable, ByteRepr, Clone, ZeroInitialization)] +#[derive( + VaArg, FnPtrArg, Destructible, TriviallyCopyable, Copyable, ByteRepr, Clone, ZeroInitialization, +)] #[byte_size(4)] pub struct basic { #[offset(0)] @@ -29,7 +31,9 @@ impl Default for basic { } } } -#[derive(VaArg, FnPtrArg, Destructible, Copyable, ByteRepr, Clone, ZeroInitialization)] +#[derive( + VaArg, FnPtrArg, Destructible, TriviallyCopyable, Copyable, ByteRepr, Clone, ZeroInitialization, +)] #[byte_size(1)] pub struct empty { #[offset(0)] @@ -45,7 +49,9 @@ impl Default for empty { } } } -#[derive(VaArg, FnPtrArg, Destructible, Copyable, ByteRepr, Clone, ZeroInitialization)] +#[derive( + VaArg, FnPtrArg, Destructible, TriviallyCopyable, Copyable, ByteRepr, Clone, ZeroInitialization, +)] #[byte_size(8)] pub struct underscores { #[offset(0)] @@ -123,7 +129,9 @@ fn main_0() -> i32 { assert!(((__ + ___) == 3)); return 0; } -#[derive(VaArg, FnPtrArg, Destructible, Copyable, ByteRepr, Clone, ZeroInitialization)] +#[derive( + VaArg, FnPtrArg, Destructible, TriviallyCopyable, Copyable, ByteRepr, Clone, ZeroInitialization, +)] #[byte_size(4)] pub struct anon_0 { #[offset(0)] diff --git a/tests/unit/out/refcount/union_cross_arm_cast.rs b/tests/unit/out/refcount/union_cross_arm_cast.rs index a6ff07790f..ce0dbe8fda 100644 --- a/tests/unit/out/refcount/union_cross_arm_cast.rs +++ b/tests/unit/out/refcount/union_cross_arm_cast.rs @@ -6,7 +6,17 @@ use std::io::prelude::*; use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; -#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable)] +#[derive( + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, +)] #[byte_size(16)] pub struct shape_a { #[offset(0)] @@ -26,7 +36,17 @@ impl Default for shape_a { } } } -#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable)] +#[derive( + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, +)] #[byte_size(28)] pub struct shape_b { #[offset(0)] @@ -55,7 +75,9 @@ impl Default for shape_b { } } } -#[derive(VaArg, FnPtrArg, Destructible, Copyable, ByteRepr, Clone, ZeroInitialization)] +#[derive( + VaArg, FnPtrArg, Destructible, TriviallyCopyable, Copyable, ByteRepr, Clone, ZeroInitialization, +)] #[byte_size(64)] pub struct anon_0 { #[offset(0)] @@ -82,7 +104,16 @@ impl Default for anon_0 { } } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(68)] pub struct Container { diff --git a/tests/unit/out/refcount/union_field_alignment.rs b/tests/unit/out/refcount/union_field_alignment.rs index e689bccc26..ecaf33055b 100644 --- a/tests/unit/out/refcount/union_field_alignment.rs +++ b/tests/unit/out/refcount/union_field_alignment.rs @@ -6,7 +6,9 @@ use std::io::prelude::*; use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; -#[derive(VaArg, FnPtrArg, Destructible, Copyable, ByteRepr, Clone, ZeroInitialization)] +#[derive( + VaArg, FnPtrArg, Destructible, TriviallyCopyable, Copyable, ByteRepr, Clone, ZeroInitialization, +)] #[byte_size(8)] pub struct anon_0 { #[offset(0)] @@ -30,7 +32,16 @@ impl Default for anon_0 { } } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(16)] pub struct node { diff --git a/tests/unit/out/refcount/union_flex_array_member.rs b/tests/unit/out/refcount/union_flex_array_member.rs index c7414be3fd..a7f3458080 100644 --- a/tests/unit/out/refcount/union_flex_array_member.rs +++ b/tests/unit/out/refcount/union_flex_array_member.rs @@ -6,7 +6,9 @@ use std::io::prelude::*; use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; -#[derive(VaArg, FnPtrArg, Destructible, Copyable, ByteRepr, Clone, ZeroInitialization)] +#[derive( + VaArg, FnPtrArg, Destructible, TriviallyCopyable, Copyable, ByteRepr, Clone, ZeroInitialization, +)] #[byte_size(8)] pub struct anon_0 { #[offset(0)] @@ -30,7 +32,16 @@ impl Default for anon_0 { } } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(24)] pub struct node { diff --git a/tests/unit/out/refcount/union_memset_memcpy.rs b/tests/unit/out/refcount/union_memset_memcpy.rs index 514f11afab..25d4f6717f 100644 --- a/tests/unit/out/refcount/union_memset_memcpy.rs +++ b/tests/unit/out/refcount/union_memset_memcpy.rs @@ -6,7 +6,17 @@ use std::io::prelude::*; use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; -#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable)] +#[derive( + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, +)] #[byte_size(16)] pub struct shape_a { #[offset(0)] @@ -26,7 +36,17 @@ impl Default for shape_a { } } } -#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable)] +#[derive( + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, +)] #[byte_size(16)] pub struct shape_b { #[offset(0)] @@ -52,7 +72,9 @@ impl Default for shape_b { } } } -#[derive(VaArg, FnPtrArg, Destructible, Copyable, ByteRepr, Clone, ZeroInitialization)] +#[derive( + VaArg, FnPtrArg, Destructible, TriviallyCopyable, Copyable, ByteRepr, Clone, ZeroInitialization, +)] #[byte_size(256)] pub struct anon_0 { #[offset(0)] @@ -79,7 +101,16 @@ impl Default for anon_0 { } } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(256)] pub struct Container { diff --git a/tests/unit/out/refcount/union_nested.rs b/tests/unit/out/refcount/union_nested.rs index 807644bd3f..1f9cfa6b9c 100644 --- a/tests/unit/out/refcount/union_nested.rs +++ b/tests/unit/out/refcount/union_nested.rs @@ -6,7 +6,17 @@ use std::io::prelude::*; use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; -#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable)] +#[derive( + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, +)] #[byte_size(16)] pub struct record { #[offset(0)] @@ -26,7 +36,9 @@ impl Default for record { } } } -#[derive(VaArg, FnPtrArg, Destructible, Copyable, ByteRepr, Clone, ZeroInitialization)] +#[derive( + VaArg, FnPtrArg, Destructible, TriviallyCopyable, Copyable, ByteRepr, Clone, ZeroInitialization, +)] #[byte_size(128)] pub struct anon_0 { #[offset(0)] @@ -50,7 +62,16 @@ impl Default for anon_0 { } } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(128)] pub struct inner { @@ -58,7 +79,9 @@ pub struct inner { #[byte_size(128)] pub view: anon_0, } -#[derive(VaArg, FnPtrArg, Destructible, Copyable, ByteRepr, Clone, ZeroInitialization)] +#[derive( + VaArg, FnPtrArg, Destructible, TriviallyCopyable, Copyable, ByteRepr, Clone, ZeroInitialization, +)] #[byte_size(128)] pub struct anon_1 { #[offset(0)] @@ -82,7 +105,16 @@ impl Default for anon_1 { } } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(144)] pub struct Outer { diff --git a/tests/unit/out/refcount/union_pointer_pun_address.rs b/tests/unit/out/refcount/union_pointer_pun_address.rs index b1833bf0fd..214359649b 100644 --- a/tests/unit/out/refcount/union_pointer_pun_address.rs +++ b/tests/unit/out/refcount/union_pointer_pun_address.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -24,7 +25,16 @@ pub struct node_a { pub n: i32, } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(16)] pub struct node_b { @@ -47,7 +57,9 @@ fn main_0() -> i32 { assert!(({ (out).to_any() } == { (a.as_pointer()).to_any() })); return 0; } -#[derive(VaArg, FnPtrArg, Destructible, Copyable, ByteRepr, Clone, ZeroInitialization)] +#[derive( + VaArg, FnPtrArg, Destructible, TriviallyCopyable, Copyable, ByteRepr, Clone, ZeroInitialization, +)] #[byte_size(8)] pub struct anon_0 { #[offset(0)] diff --git a/tests/unit/out/refcount/union_pointer_pun_writethrough.rs b/tests/unit/out/refcount/union_pointer_pun_writethrough.rs index 8d229bf8d2..5be7aa8146 100644 --- a/tests/unit/out/refcount/union_pointer_pun_writethrough.rs +++ b/tests/unit/out/refcount/union_pointer_pun_writethrough.rs @@ -18,7 +18,9 @@ fn main_0() -> i32 { assert!(({ ((*x.borrow()) == 42_i64) })); return 0; } -#[derive(VaArg, FnPtrArg, Destructible, Copyable, ByteRepr, Clone, ZeroInitialization)] +#[derive( + VaArg, FnPtrArg, Destructible, TriviallyCopyable, Copyable, ByteRepr, Clone, ZeroInitialization, +)] #[byte_size(8)] pub struct anon_0 { #[offset(0)] diff --git a/tests/unit/out/refcount/union_struct_dual_use.rs b/tests/unit/out/refcount/union_struct_dual_use.rs index d366f54ebc..645db424f9 100644 --- a/tests/unit/out/refcount/union_struct_dual_use.rs +++ b/tests/unit/out/refcount/union_struct_dual_use.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -28,7 +29,9 @@ pub struct Inner { pub fn sum_inner_0(mut i: Ptr) -> i32 { return ({ i.with(|__s| __s.a) } + { i.with(|__s| __s.b) }); } -#[derive(VaArg, FnPtrArg, Destructible, Copyable, ByteRepr, Clone, ZeroInitialization)] +#[derive( + VaArg, FnPtrArg, Destructible, TriviallyCopyable, Copyable, ByteRepr, Clone, ZeroInitialization, +)] #[byte_size(16)] pub struct anon_1 { #[offset(0)] @@ -52,7 +55,16 @@ impl Default for anon_1 { } } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(16)] pub struct Outer { diff --git a/tests/unit/out/refcount/union_tagged_many_arms.rs b/tests/unit/out/refcount/union_tagged_many_arms.rs index 1e70242f07..259defddbf 100644 --- a/tests/unit/out/refcount/union_tagged_many_arms.rs +++ b/tests/unit/out/refcount/union_tagged_many_arms.rs @@ -12,7 +12,9 @@ pub const Tag_enum_T_NUM_U: Tag_enum = 1; pub const Tag_enum_T_TEXT: Tag_enum = 2; pub const Tag_enum_T_FLOAT: Tag_enum = 3; pub const Tag_enum_T_REF: Tag_enum = 4; -#[derive(VaArg, FnPtrArg, Destructible, Copyable, ByteRepr, Clone, ZeroInitialization)] +#[derive( + VaArg, FnPtrArg, Destructible, TriviallyCopyable, Copyable, ByteRepr, Clone, ZeroInitialization, +)] #[byte_size(8)] pub struct anon_0 { #[offset(0)] @@ -45,7 +47,16 @@ impl Default for anon_0 { } } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(16)] pub struct Slot { diff --git a/tests/unit/out/refcount/union_tagged_simple.rs b/tests/unit/out/refcount/union_tagged_simple.rs index fe497f915f..c953287182 100644 --- a/tests/unit/out/refcount/union_tagged_simple.rs +++ b/tests/unit/out/refcount/union_tagged_simple.rs @@ -9,7 +9,9 @@ use std::rc::{Rc, Weak}; pub type Kind_enum = u32; pub const Kind_enum_KIND_NONE: Kind_enum = 0; pub const Kind_enum_KIND_DONE: Kind_enum = 1; -#[derive(VaArg, FnPtrArg, Destructible, Copyable, ByteRepr, Clone, ZeroInitialization)] +#[derive( + VaArg, FnPtrArg, Destructible, TriviallyCopyable, Copyable, ByteRepr, Clone, ZeroInitialization, +)] #[byte_size(8)] pub struct anon_0 { #[offset(0)] @@ -33,7 +35,16 @@ impl Default for anon_0 { } } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(24)] pub struct Event { diff --git a/tests/unit/out/refcount/union_tagged_struct_arms.rs b/tests/unit/out/refcount/union_tagged_struct_arms.rs index 4003a5d6a0..89ab921cd8 100644 --- a/tests/unit/out/refcount/union_tagged_struct_arms.rs +++ b/tests/unit/out/refcount/union_tagged_struct_arms.rs @@ -11,7 +11,16 @@ pub const Choice_enum_C_LIST: Choice_enum = 1; pub const Choice_enum_C_LETTERS: Choice_enum = 2; pub const Choice_enum_C_INTEGERS: Choice_enum = 3; #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(24)] pub struct anon_1 { @@ -32,6 +41,7 @@ pub struct anon_1 { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -55,6 +65,7 @@ pub struct anon_2 { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -71,7 +82,9 @@ pub struct anon_3 { #[offset(32)] pub width: i32, } -#[derive(VaArg, FnPtrArg, Destructible, Copyable, ByteRepr, Clone, ZeroInitialization)] +#[derive( + VaArg, FnPtrArg, Destructible, TriviallyCopyable, Copyable, ByteRepr, Clone, ZeroInitialization, +)] #[byte_size(40)] pub struct anon_0 { #[offset(0)] @@ -98,7 +111,16 @@ impl Default for anon_0 { } } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(48)] pub struct Branch { diff --git a/tests/unit/out/refcount/union_void_ptr_sized_deref.rs b/tests/unit/out/refcount/union_void_ptr_sized_deref.rs index 93289f2704..7bf9f4e19b 100644 --- a/tests/unit/out/refcount/union_void_ptr_sized_deref.rs +++ b/tests/unit/out/refcount/union_void_ptr_sized_deref.rs @@ -10,7 +10,9 @@ pub type Width_enum = u32; pub const Width_enum_W_64: Width_enum = 0; pub const Width_enum_W_32: Width_enum = 1; pub const Width_enum_W_16: Width_enum = 2; -#[derive(VaArg, FnPtrArg, Destructible, Copyable, ByteRepr, Clone, ZeroInitialization)] +#[derive( + VaArg, FnPtrArg, Destructible, TriviallyCopyable, Copyable, ByteRepr, Clone, ZeroInitialization, +)] #[byte_size(8)] pub struct anon_0 { #[offset(0)] @@ -40,7 +42,16 @@ impl Default for anon_0 { } } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(16)] pub struct Sink { diff --git a/tests/unit/out/refcount/unique_ptr.rs b/tests/unit/out/refcount/unique_ptr.rs index 18e0086c33..0a3289789e 100644 --- a/tests/unit/out/refcount/unique_ptr.rs +++ b/tests/unit/out/refcount/unique_ptr.rs @@ -25,6 +25,7 @@ pub struct SafePointer { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/unique_ptr_field_reset.rs b/tests/unit/out/refcount/unique_ptr_field_reset.rs index 473c7af871..7f757b4804 100644 --- a/tests/unit/out/refcount/unique_ptr_field_reset.rs +++ b/tests/unit/out/refcount/unique_ptr_field_reset.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/unique_ptr_nested.rs b/tests/unit/out/refcount/unique_ptr_nested.rs index 6fe8251cf4..f98a913437 100644 --- a/tests/unit/out/refcount/unique_ptr_nested.rs +++ b/tests/unit/out/refcount/unique_ptr_nested.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/unique_ptr_struct.rs b/tests/unit/out/refcount/unique_ptr_struct.rs index 5a0ddaa844..221dcfab5b 100644 --- a/tests/unit/out/refcount/unique_ptr_struct.rs +++ b/tests/unit/out/refcount/unique_ptr_struct.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/va_arg_mixed_types.rs b/tests/unit/out/refcount/va_arg_mixed_types.rs index 904f4e39b6..de889e0015 100644 --- a/tests/unit/out/refcount/va_arg_mixed_types.rs +++ b/tests/unit/out/refcount/va_arg_mixed_types.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/va_arg_non_primitive_ptrs.rs b/tests/unit/out/refcount/va_arg_non_primitive_ptrs.rs index 3a648b500c..0a2b3cdb42 100644 --- a/tests/unit/out/refcount/va_arg_non_primitive_ptrs.rs +++ b/tests/unit/out/refcount/va_arg_non_primitive_ptrs.rs @@ -7,7 +7,16 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(16)] pub struct node { diff --git a/tests/unit/out/refcount/va_arg_struct_ctx.rs b/tests/unit/out/refcount/va_arg_struct_ctx.rs index 22299d2d3c..bc138a02a8 100644 --- a/tests/unit/out/refcount/va_arg_struct_ctx.rs +++ b/tests/unit/out/refcount/va_arg_struct_ctx.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -34,7 +35,9 @@ pub fn set_error_0(mut ctx: Ptr, fmt: Ptr, __args: Box<[VaArg]>) { field!(ctx, last_error).write((*ap.borrow_mut()).arg::()); } } -#[derive(VaArg, FnPtrArg, Destructible, Copyable, ByteRepr, Clone, ZeroInitialization)] +#[derive( + VaArg, FnPtrArg, Destructible, TriviallyCopyable, Copyable, ByteRepr, Clone, ZeroInitialization, +)] #[byte_size(8)] pub struct value { #[offset(0)] diff --git a/tests/unit/out/refcount/va_arg_void_ptr.rs b/tests/unit/out/refcount/va_arg_void_ptr.rs index 77278d4a99..ca2c5911ad 100644 --- a/tests/unit/out/refcount/va_arg_void_ptr.rs +++ b/tests/unit/out/refcount/va_arg_void_ptr.rs @@ -7,7 +7,16 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(16)] pub struct registry { diff --git a/tests/unit/out/refcount/va_list_field.rs b/tests/unit/out/refcount/va_list_field.rs index ae44147db9..f941d3cc68 100644 --- a/tests/unit/out/refcount/va_list_field.rs +++ b/tests/unit/out/refcount/va_list_field.rs @@ -66,7 +66,16 @@ pub fn sum_ptr_2(n: i32, __args: Box<[VaArg]>) -> i32 { return total; } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, + Default, )] #[byte_size(8)] pub struct Cursor_3 { diff --git a/tests/unit/out/refcount/vector.rs b/tests/unit/out/refcount/vector.rs index bc3a138280..9834d08a6d 100644 --- a/tests/unit/out/refcount/vector.rs +++ b/tests/unit/out/refcount/vector.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/vector_iter_range_ctor.rs b/tests/unit/out/refcount/vector_iter_range_ctor.rs index be0a3c3fb5..8154937ca1 100644 --- a/tests/unit/out/refcount/vector_iter_range_ctor.rs +++ b/tests/unit/out/refcount/vector_iter_range_ctor.rs @@ -16,6 +16,7 @@ use std::rc::{Rc, Weak}; FnPtrArg, CppFrom, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -35,6 +36,7 @@ pub struct Degrees { FnPtrArg, CppFrom, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/vector_subscript_direct.rs b/tests/unit/out/refcount/vector_subscript_direct.rs index f1f86648d1..ad0081ca62 100644 --- a/tests/unit/out/refcount/vector_subscript_direct.rs +++ b/tests/unit/out/refcount/vector_subscript_direct.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/vector_with_allocator.rs b/tests/unit/out/refcount/vector_with_allocator.rs index 95579428e4..a6fc89c2d4 100644 --- a/tests/unit/out/refcount/vector_with_allocator.rs +++ b/tests/unit/out/refcount/vector_with_allocator.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -29,6 +30,7 @@ pub struct TestAllocator_int_ {} VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/void_cast.rs b/tests/unit/out/refcount/void_cast.rs index f22c65815f..9f965cdacd 100644 --- a/tests/unit/out/refcount/void_cast.rs +++ b/tests/unit/out/refcount/void_cast.rs @@ -46,6 +46,7 @@ pub fn bump_and_return_4() -> i32 { VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/unsafe/05_new.rs b/tests/unit/out/unsafe/05_new.rs index e184846aad..041cc64def 100644 --- a/tests/unit/out/unsafe/05_new.rs +++ b/tests/unit/out/unsafe/05_new.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -26,6 +27,7 @@ pub struct A {} FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/10_struct.rs b/tests/unit/out/unsafe/10_struct.rs index 230b88f19f..57a940d385 100644 --- a/tests/unit/out/unsafe/10_struct.rs +++ b/tests/unit/out/unsafe/10_struct.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -29,6 +30,7 @@ pub struct GraphNode { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -50,7 +52,14 @@ impl Graph { } #[repr(C)] #[derive( - Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + VaArg, + FnPtrArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub struct Partial { pub p: *mut i32, @@ -77,6 +86,7 @@ impl Default for Partial { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -90,6 +100,7 @@ impl Declared {} FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/addr_of_global.rs b/tests/unit/out/unsafe/addr_of_global.rs index 6bf331e8f7..448c3e2af3 100644 --- a/tests/unit/out/unsafe/addr_of_global.rs +++ b/tests/unit/out/unsafe/addr_of_global.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -28,6 +29,7 @@ pub struct Inner { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/anonymous-struct.rs b/tests/unit/out/unsafe/anonymous-struct.rs index fce183f9a2..5985ca0bc0 100644 --- a/tests/unit/out/unsafe/anonymous-struct.rs +++ b/tests/unit/out/unsafe/anonymous-struct.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -29,6 +30,7 @@ pub struct Outer_Named { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -44,6 +46,7 @@ pub struct anon_0 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -59,6 +62,7 @@ pub struct anon_1 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -74,6 +78,7 @@ pub struct anon_2 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -88,6 +93,7 @@ pub struct anon_4 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -102,6 +108,7 @@ pub struct anon_5 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -118,6 +125,7 @@ pub struct anon_3 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -183,6 +191,7 @@ unsafe fn main_0() -> i32 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/anonymous-struct_c.rs b/tests/unit/out/unsafe/anonymous-struct_c.rs index 509da3b233..511f8acab2 100644 --- a/tests/unit/out/unsafe/anonymous-struct_c.rs +++ b/tests/unit/out/unsafe/anonymous-struct_c.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -29,6 +30,7 @@ pub struct Named { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -44,6 +46,7 @@ pub struct anon_0 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -59,6 +62,7 @@ pub struct anon_1 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -74,6 +78,7 @@ pub struct anon_2 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -88,6 +93,7 @@ pub struct anon_4 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -102,6 +108,7 @@ pub struct anon_5 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -118,6 +125,7 @@ pub struct anon_3 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -189,6 +197,7 @@ unsafe fn main_0() -> i32 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/anonymous_enum.rs b/tests/unit/out/unsafe/anonymous_enum.rs index 066af2d3ed..057a2519fa 100644 --- a/tests/unit/out/unsafe/anonymous_enum.rs +++ b/tests/unit/out/unsafe/anonymous_enum.rs @@ -20,6 +20,7 @@ pub const anon_1_SECOND_B: anon_1 = 1; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -40,6 +41,7 @@ pub const anon_2_FIELD_B: anon_2 = 1; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/anonymous_enum_c.rs b/tests/unit/out/unsafe/anonymous_enum_c.rs index f8ddc173e8..3b1910757d 100644 --- a/tests/unit/out/unsafe/anonymous_enum_c.rs +++ b/tests/unit/out/unsafe/anonymous_enum_c.rs @@ -20,6 +20,7 @@ pub const anon_1_SECOND_B: anon_1 = 1; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -40,6 +41,7 @@ pub const anon_2_FIELD_B: anon_2 = 1; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/any.rs b/tests/unit/out/unsafe/any.rs index 48c87082b1..1517c3df98 100644 --- a/tests/unit/out/unsafe/any.rs +++ b/tests/unit/out/unsafe/any.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/array_const_init.rs b/tests/unit/out/unsafe/array_const_init.rs index fc0bfe4233..9630936a3c 100644 --- a/tests/unit/out/unsafe/array_const_init.rs +++ b/tests/unit/out/unsafe/array_const_init.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -37,6 +38,7 @@ pub static mut s_0: std::cell::LazyCell = std::cell::LazyCell::new(|| unsafe FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/array_field_addr.rs b/tests/unit/out/unsafe/array_field_addr.rs index ab89391816..95d8fc9e53 100644 --- a/tests/unit/out/unsafe/array_field_addr.rs +++ b/tests/unit/out/unsafe/array_field_addr.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/array_reference.rs b/tests/unit/out/unsafe/array_reference.rs index c0873c5a6e..596b6dd301 100644 --- a/tests/unit/out/unsafe/array_reference.rs +++ b/tests/unit/out/unsafe/array_reference.rs @@ -64,6 +64,7 @@ pub unsafe fn pick_10(s: *const [libc::c_char; 5]) -> *const [libc::c_char; 5] { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/as_const.rs b/tests/unit/out/unsafe/as_const.rs index 33d7afa5ea..159376f61d 100644 --- a/tests/unit/out/unsafe/as_const.rs +++ b/tests/unit/out/unsafe/as_const.rs @@ -17,6 +17,7 @@ pub const Overload_kConstOverload: Overload = 2; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/assign_rhs_first.rs b/tests/unit/out/unsafe/assign_rhs_first.rs index 44907d339d..7b8230333c 100644 --- a/tests/unit/out/unsafe/assign_rhs_first.rs +++ b/tests/unit/out/unsafe/assign_rhs_first.rs @@ -20,6 +20,7 @@ pub unsafe fn advance_1() -> i32 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/assignment_single_eval.rs b/tests/unit/out/unsafe/assignment_single_eval.rs index cf86ead1b9..33006d3ae1 100644 --- a/tests/unit/out/unsafe/assignment_single_eval.rs +++ b/tests/unit/out/unsafe/assignment_single_eval.rs @@ -843,6 +843,7 @@ pub unsafe fn test_reference_members_9() { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -857,6 +858,7 @@ pub struct Slot_6 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -871,6 +873,7 @@ pub struct Slot_8 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -929,6 +932,7 @@ pub unsafe fn test_pointer_elements_11() { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -964,6 +968,7 @@ pub unsafe fn test_reference_pointer_13() { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -1046,6 +1051,7 @@ pub unsafe fn test_reference_subfields_18() { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -1060,6 +1066,7 @@ pub struct Index_16 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -1074,6 +1081,7 @@ pub struct Slot_17 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -1088,6 +1096,7 @@ pub struct Index_19 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -1137,6 +1146,7 @@ pub unsafe fn observe_24(mut assigned: i32, mut stored: *const i32) -> i32 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -1151,6 +1161,7 @@ pub struct GlobalRecord_Inner { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -1426,6 +1437,7 @@ static mut flag_31: std::cell::LazyCell = std::cell::LazyCell::new(|| unsa FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -1440,6 +1452,7 @@ pub struct Record_32 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -1456,6 +1469,7 @@ pub static mut selected_values_34: std::cell::LazyCell<[u32; 3]> = FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -1684,6 +1698,7 @@ pub static mut global_rows_46: std::cell::LazyCell<[[u32; 2]; 2]> = FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -1952,6 +1967,7 @@ pub static mut scoped_pointers_53: std::cell::LazyCell<[*mut u32; 1]> = FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -2134,6 +2150,7 @@ pub struct Counts_59 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -2445,6 +2462,7 @@ unsafe fn main_0() -> i32 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -2459,6 +2477,7 @@ pub struct Index_62 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/bounded_struct_ptr.rs b/tests/unit/out/unsafe/bounded_struct_ptr.rs index a56c5e762a..babf1c099f 100644 --- a/tests/unit/out/unsafe/bounded_struct_ptr.rs +++ b/tests/unit/out/unsafe/bounded_struct_ptr.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/bst.rs b/tests/unit/out/unsafe/bst.rs index dd9688cb32..ddd5a75247 100644 --- a/tests/unit/out/unsafe/bst.rs +++ b/tests/unit/out/unsafe/bst.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/c_struct.rs b/tests/unit/out/unsafe/c_struct.rs index 3e10ddfb2d..4f7d137dc8 100644 --- a/tests/unit/out/unsafe/c_struct.rs +++ b/tests/unit/out/unsafe/c_struct.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -29,6 +30,7 @@ pub struct Point { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -44,6 +46,7 @@ pub struct Line { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -63,6 +66,7 @@ pub const Color_BLUE: Color = 2; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -78,6 +82,7 @@ pub struct Inner { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/cast.rs b/tests/unit/out/unsafe/cast.rs index 32ec6cbd23..e14105cd59 100644 --- a/tests/unit/out/unsafe/cast.rs +++ b/tests/unit/out/unsafe/cast.rs @@ -18,6 +18,7 @@ pub const E_C: E = 2; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -33,6 +34,7 @@ pub struct Pair { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -47,6 +49,7 @@ pub struct Wide { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/cast_array_to_pointer_decay.rs b/tests/unit/out/unsafe/cast_array_to_pointer_decay.rs index d8caf25784..89c1c98d88 100644 --- a/tests/unit/out/unsafe/cast_array_to_pointer_decay.rs +++ b/tests/unit/out/unsafe/cast_array_to_pointer_decay.rs @@ -24,6 +24,7 @@ pub unsafe fn strlen_1(mut s: *mut libc::c_char) -> i32 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/class.rs b/tests/unit/out/unsafe/class.rs index 95d24f2b3d..e2bdf5eae9 100644 --- a/tests/unit/out/unsafe/class.rs +++ b/tests/unit/out/unsafe/class.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -58,6 +59,7 @@ impl Pair { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -80,6 +82,7 @@ impl Route { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -111,6 +114,7 @@ impl std::cmp::Eq for Counter {} FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/class_template_lazy_member.rs b/tests/unit/out/unsafe/class_template_lazy_member.rs index 66317dfa2f..86d66b63a8 100644 --- a/tests/unit/out/unsafe/class_template_lazy_member.rs +++ b/tests/unit/out/unsafe/class_template_lazy_member.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -28,6 +29,7 @@ pub struct Point { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -47,6 +49,7 @@ impl Box_int_ { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -66,6 +69,7 @@ impl Box_Point_ { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -85,6 +89,7 @@ impl Deduced_int_ { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/class_templates.rs b/tests/unit/out/unsafe/class_templates.rs index 09e1e3c799..70aec70bcb 100644 --- a/tests/unit/out/unsafe/class_templates.rs +++ b/tests/unit/out/unsafe/class_templates.rs @@ -137,6 +137,7 @@ impl MyContainer_float_ { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -159,6 +160,7 @@ impl Boxed_short_ { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -181,6 +183,7 @@ impl Boxed_int_ { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -203,6 +206,7 @@ impl Boxed_long_ { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -223,6 +227,7 @@ impl Outer_int__Inner_int_ { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -242,6 +247,7 @@ impl Outer_int_ { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -262,6 +268,7 @@ impl Outer_long__Inner_int_ { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -282,6 +289,7 @@ impl Outer_long__Inner_char_ { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -301,6 +309,7 @@ impl Outer_long_ { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/clone_vs_move.rs b/tests/unit/out/unsafe/clone_vs_move.rs index ed780956b4..fc76e031c0 100644 --- a/tests/unit/out/unsafe/clone_vs_move.rs +++ b/tests/unit/out/unsafe/clone_vs_move.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -28,6 +29,7 @@ pub struct Bar { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -46,6 +48,7 @@ pub struct Foo { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/comma_operator.rs b/tests/unit/out/unsafe/comma_operator.rs index b13c468668..dbdd962d71 100644 --- a/tests/unit/out/unsafe/comma_operator.rs +++ b/tests/unit/out/unsafe/comma_operator.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/complex_function.rs b/tests/unit/out/unsafe/complex_function.rs index affaad74ec..b10b7d49d4 100644 --- a/tests/unit/out/unsafe/complex_function.rs +++ b/tests/unit/out/unsafe/complex_function.rs @@ -23,6 +23,7 @@ pub unsafe fn bar_2(x: *mut i32) -> *mut i32 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -37,6 +38,7 @@ pub struct X1 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -56,6 +58,7 @@ impl X2 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -75,6 +78,7 @@ impl X3 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/compound_assign_paren.rs b/tests/unit/out/unsafe/compound_assign_paren.rs index be193150cb..1da54ab99a 100644 --- a/tests/unit/out/unsafe/compound_assign_paren.rs +++ b/tests/unit/out/unsafe/compound_assign_paren.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/concepts.rs b/tests/unit/out/unsafe/concepts.rs index c8a2276495..e88a9624f9 100644 --- a/tests/unit/out/unsafe/concepts.rs +++ b/tests/unit/out/unsafe/concepts.rs @@ -19,6 +19,7 @@ const _: () = assert!( FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/constexpr_function.rs b/tests/unit/out/unsafe/constexpr_function.rs index af01c711a5..c10340f799 100644 --- a/tests/unit/out/unsafe/constexpr_function.rs +++ b/tests/unit/out/unsafe/constexpr_function.rs @@ -29,6 +29,7 @@ pub unsafe fn half_3(mut x: f64) -> f64 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -64,6 +65,7 @@ pub unsafe fn imm_7(mut b: bool) -> bool { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/constructor.rs b/tests/unit/out/unsafe/constructor.rs index 9c9fb88285..fc4ffd01cd 100644 --- a/tests/unit/out/unsafe/constructor.rs +++ b/tests/unit/out/unsafe/constructor.rs @@ -45,6 +45,7 @@ impl DestructibleUnsafe for S { ZeroInitializationUnsafe, CppFromUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, )] #[cpp_from(i32, construct_1, value)] diff --git a/tests/unit/out/unsafe/conversion_operator_same_translation.rs b/tests/unit/out/unsafe/conversion_operator_same_translation.rs index 69fdad1457..f321a956de 100644 --- a/tests/unit/out/unsafe/conversion_operator_same_translation.rs +++ b/tests/unit/out/unsafe/conversion_operator_same_translation.rs @@ -15,6 +15,7 @@ use std::rc::Rc; ZeroInitializationUnsafe, CppFromUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -40,6 +41,7 @@ impl S { ZeroInitializationUnsafe, CppFromUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/copy_move_defaulted.rs b/tests/unit/out/unsafe/copy_move_defaulted.rs index 7b42eea712..32a5c5e1e1 100644 --- a/tests/unit/out/unsafe/copy_move_defaulted.rs +++ b/tests/unit/out/unsafe/copy_move_defaulted.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -48,6 +49,7 @@ impl DestructibleUnsafe for Explicit { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/default.rs b/tests/unit/out/unsafe/default.rs index db86e237ca..a8968fc265 100644 --- a/tests/unit/out/unsafe/default.rs +++ b/tests/unit/out/unsafe/default.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -32,6 +33,7 @@ pub struct Pointers { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -43,7 +45,14 @@ pub struct SmallArrays { } #[repr(C)] #[derive( - Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + VaArg, + FnPtrArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub struct BigArray { pub a: [i32; 33], diff --git a/tests/unit/out/unsafe/default_function_arguments.rs b/tests/unit/out/unsafe/default_function_arguments.rs index 4de0765623..315f964fba 100644 --- a/tests/unit/out/unsafe/default_function_arguments.rs +++ b/tests/unit/out/unsafe/default_function_arguments.rs @@ -21,6 +21,7 @@ pub unsafe fn baz_1(mut a: *mut i32, mut b: *mut i32) -> bool { ZeroInitializationUnsafe, CppFromUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, )] #[cpp_from(i32, construct, value)] @@ -77,6 +78,7 @@ pub unsafe fn first_9(r: *mut [i32; 3]) -> i32 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/default_in_statics.rs b/tests/unit/out/unsafe/default_in_statics.rs index 254bc6e763..e7cc601662 100644 --- a/tests/unit/out/unsafe/default_in_statics.rs +++ b/tests/unit/out/unsafe/default_in_statics.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -29,6 +30,7 @@ pub struct Inner { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -50,6 +52,7 @@ pub struct Outer { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/destructor_params.rs b/tests/unit/out/unsafe/destructor_params.rs index 5d35a8e9fc..0e81b43b86 100644 --- a/tests/unit/out/unsafe/destructor_params.rs +++ b/tests/unit/out/unsafe/destructor_params.rs @@ -34,6 +34,7 @@ pub unsafe fn with_default_3(mut s: S) -> i32 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/doubly_linked_list.rs b/tests/unit/out/unsafe/doubly_linked_list.rs index 1cce38f8cb..4a85d45824 100644 --- a/tests/unit/out/unsafe/doubly_linked_list.rs +++ b/tests/unit/out/unsafe/doubly_linked_list.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/enum_default_in_static.rs b/tests/unit/out/unsafe/enum_default_in_static.rs index 0bd954a6ce..29e8538098 100644 --- a/tests/unit/out/unsafe/enum_default_in_static.rs +++ b/tests/unit/out/unsafe/enum_default_in_static.rs @@ -18,6 +18,7 @@ pub const Mode_MODE_TWO: Mode = 2; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/enum_int_interop.rs b/tests/unit/out/unsafe/enum_int_interop.rs index b079413208..fc27955386 100644 --- a/tests/unit/out/unsafe/enum_int_interop.rs +++ b/tests/unit/out/unsafe/enum_int_interop.rs @@ -27,6 +27,7 @@ pub const Tag_TAG_TWO: Tag = 2; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/enum_int_interop_c.rs b/tests/unit/out/unsafe/enum_int_interop_c.rs index c28d97772b..f850f70e10 100644 --- a/tests/unit/out/unsafe/enum_int_interop_c.rs +++ b/tests/unit/out/unsafe/enum_int_interop_c.rs @@ -27,6 +27,7 @@ pub const Tag_enum_TAG_TWO: Tag_enum = 2; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/enum_underlying_type.rs b/tests/unit/out/unsafe/enum_underlying_type.rs index d957cd98ed..998c91f5b1 100644 --- a/tests/unit/out/unsafe/enum_underlying_type.rs +++ b/tests/unit/out/unsafe/enum_underlying_type.rs @@ -27,7 +27,14 @@ pub const Scoped_POS: Scoped = 2; pub type Empty = bool; #[repr(C)] #[derive( - Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + VaArg, + FnPtrArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub struct HoldsEmpty { pub e: Empty, diff --git a/tests/unit/out/unsafe/exprs.rs b/tests/unit/out/unsafe/exprs.rs index 61e152ca29..ae37efcc36 100644 --- a/tests/unit/out/unsafe/exprs.rs +++ b/tests/unit/out/unsafe/exprs.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -28,6 +29,7 @@ pub struct X { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/fft.rs b/tests/unit/out/unsafe/fft.rs index 788a6c6834..3a89ee473e 100644 --- a/tests/unit/out/unsafe/fft.rs +++ b/tests/unit/out/unsafe/fft.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/field_aliasing.rs b/tests/unit/out/unsafe/field_aliasing.rs index 6f02452a3b..f7a0dff37e 100644 --- a/tests/unit/out/unsafe/field_aliasing.rs +++ b/tests/unit/out/unsafe/field_aliasing.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -29,6 +30,7 @@ pub struct In { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -46,6 +48,7 @@ pub struct S { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/field_array_elem_ptr.rs b/tests/unit/out/unsafe/field_array_elem_ptr.rs index a9674c8fee..5e64672553 100644 --- a/tests/unit/out/unsafe/field_array_elem_ptr.rs +++ b/tests/unit/out/unsafe/field_array_elem_ptr.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -29,6 +30,7 @@ pub struct Point { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/field_method_receiver.rs b/tests/unit/out/unsafe/field_method_receiver.rs index daeb0af970..ed7c8322bc 100644 --- a/tests/unit/out/unsafe/field_method_receiver.rs +++ b/tests/unit/out/unsafe/field_method_receiver.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/field_pointers.rs b/tests/unit/out/unsafe/field_pointers.rs index 4dd1e1449c..f31160c797 100644 --- a/tests/unit/out/unsafe/field_pointers.rs +++ b/tests/unit/out/unsafe/field_pointers.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -29,6 +30,7 @@ pub struct Inner { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/field_pointers_malloced_struct.rs b/tests/unit/out/unsafe/field_pointers_malloced_struct.rs index 8b21831780..8851382acf 100644 --- a/tests/unit/out/unsafe/field_pointers_malloced_struct.rs +++ b/tests/unit/out/unsafe/field_pointers_malloced_struct.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/field_reinterpret_write_through.rs b/tests/unit/out/unsafe/field_reinterpret_write_through.rs index 70ebbf27a0..d2418a9ad2 100644 --- a/tests/unit/out/unsafe/field_reinterpret_write_through.rs +++ b/tests/unit/out/unsafe/field_reinterpret_write_through.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -29,6 +30,7 @@ pub struct In { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/find.rs b/tests/unit/out/unsafe/find.rs index d4e2d4d9e7..73cb8bbfde 100644 --- a/tests/unit/out/unsafe/find.rs +++ b/tests/unit/out/unsafe/find.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/first_field_ptr_covers_struct.rs b/tests/unit/out/unsafe/first_field_ptr_covers_struct.rs index 43a7044886..faa1ce4563 100644 --- a/tests/unit/out/unsafe/first_field_ptr_covers_struct.rs +++ b/tests/unit/out/unsafe/first_field_ptr_covers_struct.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -29,6 +30,7 @@ pub struct In { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/first_member_downcast.rs b/tests/unit/out/unsafe/first_member_downcast.rs index 66c8c06c7f..32bf2c1b76 100644 --- a/tests/unit/out/unsafe/first_member_downcast.rs +++ b/tests/unit/out/unsafe/first_member_downcast.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -28,6 +29,7 @@ pub struct base { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/flex_array_member_incomplete.rs b/tests/unit/out/unsafe/flex_array_member_incomplete.rs index d6858e1859..f2363773bd 100644 --- a/tests/unit/out/unsafe/flex_array_member_incomplete.rs +++ b/tests/unit/out/unsafe/flex_array_member_incomplete.rs @@ -8,7 +8,14 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + VaArg, + FnPtrArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub struct F { pub n: i32, diff --git a/tests/unit/out/unsafe/flex_array_member_sibling_write.rs b/tests/unit/out/unsafe/flex_array_member_sibling_write.rs index 47fc857aa4..7a45bfaf35 100644 --- a/tests/unit/out/unsafe/flex_array_member_sibling_write.rs +++ b/tests/unit/out/unsafe/flex_array_member_sibling_write.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -29,6 +30,7 @@ pub struct S { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -44,6 +46,7 @@ pub struct E { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/fn_ptr.rs b/tests/unit/out/unsafe/fn_ptr.rs index fe93278c2a..5deb01ec8c 100644 --- a/tests/unit/out/unsafe/fn_ptr.rs +++ b/tests/unit/out/unsafe/fn_ptr.rs @@ -40,6 +40,7 @@ pub unsafe fn identity_hash_6(mut v: bool) -> usize { ZeroInitializationUnsafe, CppFromUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/fn_ptr_cast.rs b/tests/unit/out/unsafe/fn_ptr_cast.rs index aa381b191f..e3ef54b6f6 100644 --- a/tests/unit/out/unsafe/fn_ptr_cast.rs +++ b/tests/unit/out/unsafe/fn_ptr_cast.rs @@ -37,6 +37,7 @@ pub unsafe fn test_double_cast_2() { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/fn_ptr_stable_sort.rs b/tests/unit/out/unsafe/fn_ptr_stable_sort.rs index d32ebd39f3..78a6c6467a 100644 --- a/tests/unit/out/unsafe/fn_ptr_stable_sort.rs +++ b/tests/unit/out/unsafe/fn_ptr_stable_sort.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/fn_ptr_struct.rs b/tests/unit/out/unsafe/fn_ptr_struct.rs index db38c500b5..d3930d4c56 100644 --- a/tests/unit/out/unsafe/fn_ptr_struct.rs +++ b/tests/unit/out/unsafe/fn_ptr_struct.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -35,6 +36,7 @@ pub unsafe fn negate_1(mut x: i32) -> i32 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/fn_ptr_typedef_cast.rs b/tests/unit/out/unsafe/fn_ptr_typedef_cast.rs index 4591740e50..3c256f7b56 100644 --- a/tests/unit/out/unsafe/fn_ptr_typedef_cast.rs +++ b/tests/unit/out/unsafe/fn_ptr_typedef_cast.rs @@ -26,6 +26,7 @@ pub unsafe fn via_size_t_return_3(mut b: u64) -> usize { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/fn_ptr_vtable.rs b/tests/unit/out/unsafe/fn_ptr_vtable.rs index 3d73178885..72648df0ad 100644 --- a/tests/unit/out/unsafe/fn_ptr_vtable.rs +++ b/tests/unit/out/unsafe/fn_ptr_vtable.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/fn_ref.rs b/tests/unit/out/unsafe/fn_ref.rs index cc3c0559cb..71b5ce70ec 100644 --- a/tests/unit/out/unsafe/fn_ref.rs +++ b/tests/unit/out/unsafe/fn_ref.rs @@ -29,6 +29,7 @@ pub unsafe fn call_forwarded_4(f: Option i32>, mut x: i32) -> FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/friend.rs b/tests/unit/out/unsafe/friend.rs index 2cf436a218..6816b83c02 100644 --- a/tests/unit/out/unsafe/friend.rs +++ b/tests/unit/out/unsafe/friend.rs @@ -26,6 +26,7 @@ pub unsafe fn scaled_3(v: *const V, mut k: f64) -> f64 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -49,6 +50,7 @@ pub unsafe fn get_4(w: *const W_int_) -> i32 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -66,6 +68,7 @@ pub unsafe fn get_5(w: *const W_long_) -> i64 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -80,6 +83,7 @@ pub struct W_long_ { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/function_overloading.rs b/tests/unit/out/unsafe/function_overloading.rs index c8b7a2de0a..1b9aa042f9 100644 --- a/tests/unit/out/unsafe/function_overloading.rs +++ b/tests/unit/out/unsafe/function_overloading.rs @@ -29,6 +29,7 @@ pub unsafe fn bar_4(x: *mut i32) -> i32 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/global_call_temporaries.rs b/tests/unit/out/unsafe/global_call_temporaries.rs index 7dec1b2bac..c4b3a2ecbb 100644 --- a/tests/unit/out/unsafe/global_call_temporaries.rs +++ b/tests/unit/out/unsafe/global_call_temporaries.rs @@ -84,6 +84,7 @@ pub static mut call_assigned_6: std::cell::LazyCell = std::cell::LazyCell:: FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/global_init_side_effect.rs b/tests/unit/out/unsafe/global_init_side_effect.rs index fcc5912e85..e14b10d871 100644 --- a/tests/unit/out/unsafe/global_init_side_effect.rs +++ b/tests/unit/out/unsafe/global_init_side_effect.rs @@ -16,6 +16,7 @@ pub static mut total_0: std::cell::LazyCell = std::cell::LazyCell::new(|| u ZeroInitializationUnsafe, CppFromUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/global_non_const_init.rs b/tests/unit/out/unsafe/global_non_const_init.rs index beb3c2869a..e2daf1e67f 100644 --- a/tests/unit/out/unsafe/global_non_const_init.rs +++ b/tests/unit/out/unsafe/global_non_const_init.rs @@ -29,7 +29,14 @@ pub static mut depends_on_call_6: std::cell::LazyCell = std::cell::LazyCell }); #[repr(C)] #[derive( - Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + VaArg, + FnPtrArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub struct Ctor { pub v: i32, @@ -90,6 +97,7 @@ pub static mut inline_member_11: std::cell::LazyCell = std::cell::LazyCell FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -111,7 +119,14 @@ static mut local_ctor_14: std::cell::LazyCell = std::cell::LazyCell::new(| }); #[repr(C)] #[derive( - Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + VaArg, + FnPtrArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub struct Singleton { pub hits: i32, diff --git a/tests/unit/out/unsafe/global_pointers.rs b/tests/unit/out/unsafe/global_pointers.rs index c2a842b5a2..6bbe743362 100644 --- a/tests/unit/out/unsafe/global_pointers.rs +++ b/tests/unit/out/unsafe/global_pointers.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/global_without_initializer.rs b/tests/unit/out/unsafe/global_without_initializer.rs index b79958bf2d..f0ac4f736b 100644 --- a/tests/unit/out/unsafe/global_without_initializer.rs +++ b/tests/unit/out/unsafe/global_without_initializer.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/goto_aggregate_default.rs b/tests/unit/out/unsafe/goto_aggregate_default.rs index 9101602a1a..5f3b0f194c 100644 --- a/tests/unit/out/unsafe/goto_aggregate_default.rs +++ b/tests/unit/out/unsafe/goto_aggregate_default.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/goto_cleanup.rs b/tests/unit/out/unsafe/goto_cleanup.rs index 2712123684..f8684cf662 100644 --- a/tests/unit/out/unsafe/goto_cleanup.rs +++ b/tests/unit/out/unsafe/goto_cleanup.rs @@ -84,6 +84,7 @@ pub unsafe fn from_switch_2(mut n: i32) -> i32 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/huffman.rs b/tests/unit/out/unsafe/huffman.rs index 459852d53a..35cea0ebca 100644 --- a/tests/unit/out/unsafe/huffman.rs +++ b/tests/unit/out/unsafe/huffman.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/immutable-deref-on-func-call.rs b/tests/unit/out/unsafe/immutable-deref-on-func-call.rs index a5a31f3f8c..37dbf723d1 100644 --- a/tests/unit/out/unsafe/immutable-deref-on-func-call.rs +++ b/tests/unit/out/unsafe/immutable-deref-on-func-call.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/in_class_field_initializer.rs b/tests/unit/out/unsafe/in_class_field_initializer.rs index b4bcd25826..6a2e3d9018 100644 --- a/tests/unit/out/unsafe/in_class_field_initializer.rs +++ b/tests/unit/out/unsafe/in_class_field_initializer.rs @@ -8,7 +8,14 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + VaArg, + FnPtrArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub struct Inner { pub x: i32, @@ -21,7 +28,14 @@ impl Default for Inner { } #[repr(C)] #[derive( - Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + VaArg, + FnPtrArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub struct S { pub a: i32, @@ -43,7 +57,14 @@ impl Default for S { } #[repr(C)] #[derive( - Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + VaArg, + FnPtrArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub struct Boxed_int_ { pub v: i32, diff --git a/tests/unit/out/unsafe/init.rs b/tests/unit/out/unsafe/init.rs index 725246c345..cba15d0ec2 100644 --- a/tests/unit/out/unsafe/init.rs +++ b/tests/unit/out/unsafe/init.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/init_list.rs b/tests/unit/out/unsafe/init_list.rs index 72295a1bee..d60f1b2720 100644 --- a/tests/unit/out/unsafe/init_list.rs +++ b/tests/unit/out/unsafe/init_list.rs @@ -15,6 +15,7 @@ pub unsafe fn f_0(mut list: Vec) {} FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -24,7 +25,14 @@ pub struct Pair { } #[repr(C)] #[derive( - Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + VaArg, + FnPtrArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub struct Holder { pub p: Pair, @@ -49,7 +57,14 @@ pub unsafe fn sum_1(p: *const Pair) -> i32 { } #[repr(C)] #[derive( - Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + VaArg, + FnPtrArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub struct Seven { pub v: i32, diff --git a/tests/unit/out/unsafe/kruskal.rs b/tests/unit/out/unsafe/kruskal.rs index 08c1614074..8275d0f08b 100644 --- a/tests/unit/out/unsafe/kruskal.rs +++ b/tests/unit/out/unsafe/kruskal.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/lambda_as_field.rs b/tests/unit/out/unsafe/lambda_as_field.rs index d174d1b218..4f439ef4e3 100644 --- a/tests/unit/out/unsafe/lambda_as_field.rs +++ b/tests/unit/out/unsafe/lambda_as_field.rs @@ -38,7 +38,15 @@ impl DestructibleUnsafe for Guard__lambda_at_lambda_as_field_cpp_45_13__ { } } #[repr(C)] -#[derive(Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe)] +#[derive( + Clone, + VaArg, + FnPtrArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, +)] pub struct Holder__lambda_at_lambda_as_field_cpp_39_12__ { pub f: FnPtr i32>, pub calls: i32, @@ -65,7 +73,14 @@ impl Default for Holder__lambda_at_lambda_as_field_cpp_39_12__ { } #[repr(C)] #[derive( - Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, Default, + Clone, + VaArg, + FnPtrArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, + Default, )] pub struct Holder__lambda_at_lambda_as_field_cpp_51_12__ { pub f: FnPtr i32>, diff --git a/tests/unit/out/unsafe/lambda_capture_ref.rs b/tests/unit/out/unsafe/lambda_capture_ref.rs index 1685860930..14e29f19f0 100644 --- a/tests/unit/out/unsafe/lambda_capture_ref.rs +++ b/tests/unit/out/unsafe/lambda_capture_ref.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/lambda_capture_star_this.rs b/tests/unit/out/unsafe/lambda_capture_star_this.rs index dae883e98c..b8bfc984c2 100644 --- a/tests/unit/out/unsafe/lambda_capture_star_this.rs +++ b/tests/unit/out/unsafe/lambda_capture_star_this.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/lambda_capture_this.rs b/tests/unit/out/unsafe/lambda_capture_this.rs index 5aa1013497..8c26eb30ed 100644 --- a/tests/unit/out/unsafe/lambda_capture_this.rs +++ b/tests/unit/out/unsafe/lambda_capture_this.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/lambda_capture_value.rs b/tests/unit/out/unsafe/lambda_capture_value.rs index b6083ad486..562dce0964 100644 --- a/tests/unit/out/unsafe/lambda_capture_value.rs +++ b/tests/unit/out/unsafe/lambda_capture_value.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/lambda_decltype_type.rs b/tests/unit/out/unsafe/lambda_decltype_type.rs index 9ea037c436..e6cb7a7e32 100644 --- a/tests/unit/out/unsafe/lambda_decltype_type.rs +++ b/tests/unit/out/unsafe/lambda_decltype_type.rs @@ -7,7 +7,15 @@ use std::io::{Read, Seek, Write}; use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] -#[derive(Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe)] +#[derive( + Clone, + VaArg, + FnPtrArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, +)] pub struct Sorted__lambda_at_lambda_decltype_type_cpp_22_18__ { pub items: [i32; 4], pub size: i32, @@ -45,7 +53,15 @@ impl Default for Sorted__lambda_at_lambda_decltype_type_cpp_22_18__ { } } #[repr(C)] -#[derive(Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe)] +#[derive( + Clone, + VaArg, + FnPtrArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, +)] pub struct Sorted__lambda_at_lambda_decltype_type_cpp_19_23__ { pub items: [i32; 4], pub size: i32, diff --git a/tests/unit/out/unsafe/lambda_generic_explicit_args.rs b/tests/unit/out/unsafe/lambda_generic_explicit_args.rs index 76d3641c9a..a6d47a7dd1 100644 --- a/tests/unit/out/unsafe/lambda_generic_explicit_args.rs +++ b/tests/unit/out/unsafe/lambda_generic_explicit_args.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/lambda_immediate_init.rs b/tests/unit/out/unsafe/lambda_immediate_init.rs index 5b07f0316b..609738fc73 100644 --- a/tests/unit/out/unsafe/lambda_immediate_init.rs +++ b/tests/unit/out/unsafe/lambda_immediate_init.rs @@ -11,7 +11,14 @@ pub unsafe fn pick_0(mut x: i32) -> i32 { } #[repr(C)] #[derive( - Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + VaArg, + FnPtrArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub struct S { pub j: i32, diff --git a/tests/unit/out/unsafe/lambda_nested.rs b/tests/unit/out/unsafe/lambda_nested.rs index 2a114684a1..952898cdb2 100644 --- a/tests/unit/out/unsafe/lambda_nested.rs +++ b/tests/unit/out/unsafe/lambda_nested.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/lambda_static_local.rs b/tests/unit/out/unsafe/lambda_static_local.rs index 3509967e9d..5a1876b031 100644 --- a/tests/unit/out/unsafe/lambda_static_local.rs +++ b/tests/unit/out/unsafe/lambda_static_local.rs @@ -75,6 +75,7 @@ static mut calls_3: std::cell::LazyCell = std::cell::LazyCell::new(|| unsaf FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/libc_struct_without_default.rs b/tests/unit/out/unsafe/libc_struct_without_default.rs index 81034583ab..9f8e3a07d5 100644 --- a/tests/unit/out/unsafe/libc_struct_without_default.rs +++ b/tests/unit/out/unsafe/libc_struct_without_default.rs @@ -35,7 +35,14 @@ impl Default for UserDefined { } #[repr(C)] #[derive( - Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + VaArg, + FnPtrArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub struct FieldIsLibcType { pub addr: libc::sockaddr, diff --git a/tests/unit/out/unsafe/linked_list.rs b/tests/unit/out/unsafe/linked_list.rs index 371dd6530f..49073d09c0 100644 --- a/tests/unit/out/unsafe/linked_list.rs +++ b/tests/unit/out/unsafe/linked_list.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/local_anon_struct_collision.rs b/tests/unit/out/unsafe/local_anon_struct_collision.rs index b144e4e780..19420cf7c8 100644 --- a/tests/unit/out/unsafe/local_anon_struct_collision.rs +++ b/tests/unit/out/unsafe/local_anon_struct_collision.rs @@ -20,6 +20,7 @@ pub unsafe fn first_0() -> i32 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -41,6 +42,7 @@ pub unsafe fn second_2() -> i32 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/local_record_template.rs b/tests/unit/out/unsafe/local_record_template.rs index 79539375cd..94e3e7ec17 100644 --- a/tests/unit/out/unsafe/local_record_template.rs +++ b/tests/unit/out/unsafe/local_record_template.rs @@ -37,6 +37,7 @@ pub unsafe fn wrap_10(mut v: i64) -> i32 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -51,6 +52,7 @@ pub struct Local_5 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -69,6 +71,7 @@ pub unsafe fn other_11() -> i32 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -99,6 +102,7 @@ unsafe fn main_0() -> i32 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/map.rs b/tests/unit/out/unsafe/map.rs index dbbd091e90..aff016636a 100644 --- a/tests/unit/out/unsafe/map.rs +++ b/tests/unit/out/unsafe/map.rs @@ -14,7 +14,14 @@ pub unsafe fn bar_1(x: *mut u32) { } #[repr(C)] #[derive( - Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + VaArg, + FnPtrArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub struct Point { pub x: i32, diff --git a/tests/unit/out/unsafe/map_key_identity.rs b/tests/unit/out/unsafe/map_key_identity.rs index 824fd3e5e7..77ee88dfda 100644 --- a/tests/unit/out/unsafe/map_key_identity.rs +++ b/tests/unit/out/unsafe/map_key_identity.rs @@ -16,6 +16,7 @@ pub static mut default_constructions_0: std::cell::LazyCell = FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -55,7 +56,14 @@ pub unsafe fn operator_eq_2(a: *const Key, b: *const Key) -> bool { } #[repr(C)] #[derive( - Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + VaArg, + FnPtrArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub struct Mapped { pub value: i32, diff --git a/tests/unit/out/unsafe/map_try_emplace.rs b/tests/unit/out/unsafe/map_try_emplace.rs index 0550465470..03e85d4ae5 100644 --- a/tests/unit/out/unsafe/map_try_emplace.rs +++ b/tests/unit/out/unsafe/map_try_emplace.rs @@ -73,7 +73,14 @@ pub unsafe fn argument_4(item: *mut Item) -> *mut Item { } #[repr(C)] #[derive( - Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + VaArg, + FnPtrArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub struct RefItem { pub value: i32, diff --git a/tests/unit/out/unsafe/map_try_emplace_lvalues.rs b/tests/unit/out/unsafe/map_try_emplace_lvalues.rs index 8c96802af2..efcd84d2e2 100644 --- a/tests/unit/out/unsafe/map_try_emplace_lvalues.rs +++ b/tests/unit/out/unsafe/map_try_emplace_lvalues.rs @@ -10,7 +10,14 @@ pub static mut made_0: std::cell::LazyCell = std::cell::LazyCell::new(|| un pub static mut visits_1: std::cell::LazyCell = std::cell::LazyCell::new(|| unsafe { 0 }); #[repr(C)] #[derive( - Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + VaArg, + FnPtrArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub struct Item { pub value: i32, @@ -50,7 +57,14 @@ pub static mut temporary_calls_4: std::cell::LazyCell = std::cell::LazyCell::new(|| unsafe { 0 }); #[repr(C)] #[derive( - Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + VaArg, + FnPtrArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub struct Temporary { pub n: i32, @@ -82,6 +96,7 @@ impl Default for Temporary { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -160,6 +175,7 @@ impl Default for Noncopy { ZeroInitializationUnsafe, CppFromUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, )] #[cpp_from(i32, construct_1, ptr)] diff --git a/tests/unit/out/unsafe/memcpy_struct_bytes.rs b/tests/unit/out/unsafe/memcpy_struct_bytes.rs index e8fd1940fd..b5d73ffb3d 100644 --- a/tests/unit/out/unsafe/memcpy_struct_bytes.rs +++ b/tests/unit/out/unsafe/memcpy_struct_bytes.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/memcpy_struct_layouts.rs b/tests/unit/out/unsafe/memcpy_struct_layouts.rs index 6ed39f84e4..e7ff617014 100644 --- a/tests/unit/out/unsafe/memcpy_struct_layouts.rs +++ b/tests/unit/out/unsafe/memcpy_struct_layouts.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -31,6 +32,7 @@ pub struct packed { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -47,6 +49,7 @@ pub struct reordered { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -62,6 +65,7 @@ pub struct tail { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -77,6 +81,7 @@ pub struct nested { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/memcpy_struct_struct.rs b/tests/unit/out/unsafe/memcpy_struct_struct.rs index d58f77c503..f1fafa0861 100644 --- a/tests/unit/out/unsafe/memcpy_struct_struct.rs +++ b/tests/unit/out/unsafe/memcpy_struct_struct.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/memset_struct_tail.rs b/tests/unit/out/unsafe/memset_struct_tail.rs index 84ea69f2e4..9de95fb539 100644 --- a/tests/unit/out/unsafe/memset_struct_tail.rs +++ b/tests/unit/out/unsafe/memset_struct_tail.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/nested_structs.rs b/tests/unit/out/unsafe/nested_structs.rs index 176d47dca7..b1a927435b 100644 --- a/tests/unit/out/unsafe/nested_structs.rs +++ b/tests/unit/out/unsafe/nested_structs.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -28,6 +29,7 @@ pub struct Level0_Level1_1_Level2_1_Level3_1 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -43,6 +45,7 @@ pub struct Level0_Level1_1_Level2_1_Level3_2 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -57,6 +60,7 @@ pub struct Level0_Level1_1_Level2_1 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -71,6 +75,7 @@ pub struct Level0_Level1_1 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -86,6 +91,7 @@ pub struct Level0_Level1_2 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/new.rs b/tests/unit/out/unsafe/new.rs index fffe780a13..f1370dd9b7 100644 --- a/tests/unit/out/unsafe/new.rs +++ b/tests/unit/out/unsafe/new.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/new_bst.rs b/tests/unit/out/unsafe/new_bst.rs index 34e337a77f..da6abd1ad6 100644 --- a/tests/unit/out/unsafe/new_bst.rs +++ b/tests/unit/out/unsafe/new_bst.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/new_struct.rs b/tests/unit/out/unsafe/new_struct.rs index 1ef439b45e..7f5630c25c 100644 --- a/tests/unit/out/unsafe/new_struct.rs +++ b/tests/unit/out/unsafe/new_struct.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -29,6 +30,7 @@ pub struct Pair { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/nttp_distinct_specializations.rs b/tests/unit/out/unsafe/nttp_distinct_specializations.rs index 3b054d4c42..a64d4ab646 100644 --- a/tests/unit/out/unsafe/nttp_distinct_specializations.rs +++ b/tests/unit/out/unsafe/nttp_distinct_specializations.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -34,6 +35,7 @@ impl S_2_ { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -53,6 +55,7 @@ impl S_1_ { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/offsetof.rs b/tests/unit/out/unsafe/offsetof.rs index 733562f72d..ffa7299065 100644 --- a/tests/unit/out/unsafe/offsetof.rs +++ b/tests/unit/out/unsafe/offsetof.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -24,7 +25,14 @@ pub struct Layout { } #[repr(C)] #[derive( - Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + VaArg, + FnPtrArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub struct Frame { pub tag: u16, diff --git a/tests/unit/out/unsafe/opaque_forward_decl.rs b/tests/unit/out/unsafe/opaque_forward_decl.rs index e83c379a67..8a10558a3f 100644 --- a/tests/unit/out/unsafe/opaque_forward_decl.rs +++ b/tests/unit/out/unsafe/opaque_forward_decl.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/opaque_record_copy.rs b/tests/unit/out/unsafe/opaque_record_copy.rs index 339738a10d..b4c5df9d05 100644 --- a/tests/unit/out/unsafe/opaque_record_copy.rs +++ b/tests/unit/out/unsafe/opaque_record_copy.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -26,6 +27,7 @@ pub struct Probe {} FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/opaque_then_defined.rs b/tests/unit/out/unsafe/opaque_then_defined.rs index 6cbb61093d..77fdeab957 100644 --- a/tests/unit/out/unsafe/opaque_then_defined.rs +++ b/tests/unit/out/unsafe/opaque_then_defined.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -29,6 +30,7 @@ pub struct list { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/operator_arithmetic_free.rs b/tests/unit/out/unsafe/operator_arithmetic_free.rs index 897ff4c9a1..3906668e03 100644 --- a/tests/unit/out/unsafe/operator_arithmetic_free.rs +++ b/tests/unit/out/unsafe/operator_arithmetic_free.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/operator_arithmetic_member.rs b/tests/unit/out/unsafe/operator_arithmetic_member.rs index b05bb0adab..347f4fd71a 100644 --- a/tests/unit/out/unsafe/operator_arithmetic_member.rs +++ b/tests/unit/out/unsafe/operator_arithmetic_member.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/operator_bitwise_free.rs b/tests/unit/out/unsafe/operator_bitwise_free.rs index 97df16f7a3..a5c8807928 100644 --- a/tests/unit/out/unsafe/operator_bitwise_free.rs +++ b/tests/unit/out/unsafe/operator_bitwise_free.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/operator_bitwise_member.rs b/tests/unit/out/unsafe/operator_bitwise_member.rs index a220c433db..2d2daeca6e 100644 --- a/tests/unit/out/unsafe/operator_bitwise_member.rs +++ b/tests/unit/out/unsafe/operator_bitwise_member.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/operator_comparison_defaulted.rs b/tests/unit/out/unsafe/operator_comparison_defaulted.rs index 0eb9295006..48520ceb9b 100644 --- a/tests/unit/out/unsafe/operator_comparison_defaulted.rs +++ b/tests/unit/out/unsafe/operator_comparison_defaulted.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -41,6 +42,7 @@ impl std::cmp::Eq for Eq {} FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -95,6 +97,7 @@ impl std::cmp::Eq for Cmp {} FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -140,6 +143,7 @@ impl std::cmp::Eq for Both {} FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -182,6 +186,7 @@ impl std::cmp::Eq for OrdOnly {} FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -227,6 +232,7 @@ impl std::cmp::Eq for Inner {} FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -285,6 +291,7 @@ impl std::cmp::Eq for Outer {} FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -341,6 +348,7 @@ impl std::cmp::Eq for Secondary {} FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/operator_comparison_free.rs b/tests/unit/out/unsafe/operator_comparison_free.rs index 8ea736c45d..cc81d5ec9c 100644 --- a/tests/unit/out/unsafe/operator_comparison_free.rs +++ b/tests/unit/out/unsafe/operator_comparison_free.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -76,6 +77,7 @@ pub unsafe fn operator_lt_7(mut a: i32, b: *const S) -> bool { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/operator_comparison_member.rs b/tests/unit/out/unsafe/operator_comparison_member.rs index ec6e818099..46ba021117 100644 --- a/tests/unit/out/unsafe/operator_comparison_member.rs +++ b/tests/unit/out/unsafe/operator_comparison_member.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/operator_comparison_mixed.rs b/tests/unit/out/unsafe/operator_comparison_mixed.rs index 042b17fc02..9b79b773bb 100644 --- a/tests/unit/out/unsafe/operator_comparison_mixed.rs +++ b/tests/unit/out/unsafe/operator_comparison_mixed.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/operator_comparison_nonbool.rs b/tests/unit/out/unsafe/operator_comparison_nonbool.rs index f65487b612..9c94e01f51 100644 --- a/tests/unit/out/unsafe/operator_comparison_nonbool.rs +++ b/tests/unit/out/unsafe/operator_comparison_nonbool.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -70,6 +71,7 @@ pub unsafe fn operator_ge_5(mut a: X, mut b: X) -> i32 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -84,6 +86,7 @@ pub struct Result { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -105,6 +108,7 @@ impl Custom { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -157,6 +161,7 @@ impl std::cmp::Eq for Mixed {} ZeroInitializationUnsafe, CppFromUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -180,6 +185,7 @@ impl MyBool { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -264,6 +270,7 @@ pub static mut ref_true_8: std::cell::LazyCell = std::cell::LazyCell::n FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/operator_compound_assignment_free.rs b/tests/unit/out/unsafe/operator_compound_assignment_free.rs index 483871891e..8fac39d9f5 100644 --- a/tests/unit/out/unsafe/operator_compound_assignment_free.rs +++ b/tests/unit/out/unsafe/operator_compound_assignment_free.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/operator_compound_assignment_member.rs b/tests/unit/out/unsafe/operator_compound_assignment_member.rs index 91febb12b4..695f45e803 100644 --- a/tests/unit/out/unsafe/operator_compound_assignment_member.rs +++ b/tests/unit/out/unsafe/operator_compound_assignment_member.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/operator_friend.rs b/tests/unit/out/unsafe/operator_friend.rs index 7799dce798..d628963b02 100644 --- a/tests/unit/out/unsafe/operator_friend.rs +++ b/tests/unit/out/unsafe/operator_friend.rs @@ -17,6 +17,7 @@ pub unsafe fn operator_eq_0(_a0: *const Defaulted, _a1: *const Defaulted) -> boo FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -53,6 +54,7 @@ pub unsafe fn operator_eq_2(_a0: *const DefaultedOrd, _a1: *const DefaultedOrd) FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -94,6 +96,7 @@ pub unsafe fn operator_add_5(x: *const Inline, y: *const Inline) -> Inline { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -132,6 +135,7 @@ impl std::cmp::Eq for Inline {} FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -170,6 +174,7 @@ pub unsafe fn operator_eq_10(x: *const Tmpl_int_, y: *const Tmpl_long_) -> bool FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -208,6 +213,7 @@ impl std::cmp::Eq for Tmpl_int_ {} FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -228,6 +234,7 @@ pub unsafe fn operator_eq_11( FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/operator_less_than.rs b/tests/unit/out/unsafe/operator_less_than.rs index ba57f1cc2f..dc088a7530 100644 --- a/tests/unit/out/unsafe/operator_less_than.rs +++ b/tests/unit/out/unsafe/operator_less_than.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/operator_logical_free.rs b/tests/unit/out/unsafe/operator_logical_free.rs index 0ae987db8a..85069d9554 100644 --- a/tests/unit/out/unsafe/operator_logical_free.rs +++ b/tests/unit/out/unsafe/operator_logical_free.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/operator_logical_member.rs b/tests/unit/out/unsafe/operator_logical_member.rs index 6657800073..6f64653667 100644 --- a/tests/unit/out/unsafe/operator_logical_member.rs +++ b/tests/unit/out/unsafe/operator_logical_member.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/operator_member_pointer_free.rs b/tests/unit/out/unsafe/operator_member_pointer_free.rs index 2d63c460e4..efd5c25cff 100644 --- a/tests/unit/out/unsafe/operator_member_pointer_free.rs +++ b/tests/unit/out/unsafe/operator_member_pointer_free.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -28,6 +29,7 @@ pub struct Inner { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/operator_member_pointer_member.rs b/tests/unit/out/unsafe/operator_member_pointer_member.rs index 2310c2c8a1..a4350d620b 100644 --- a/tests/unit/out/unsafe/operator_member_pointer_member.rs +++ b/tests/unit/out/unsafe/operator_member_pointer_member.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -28,6 +29,7 @@ pub struct Inner { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -47,6 +49,7 @@ pub static mut table_0: std::cell::LazyCell<[i32; 3]> = FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/operator_other_free.rs b/tests/unit/out/unsafe/operator_other_free.rs index ebcd624688..f0aa3d0812 100644 --- a/tests/unit/out/unsafe/operator_other_free.rs +++ b/tests/unit/out/unsafe/operator_other_free.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/operator_other_member.rs b/tests/unit/out/unsafe/operator_other_member.rs index 1b6bd43fb8..8188ff0f73 100644 --- a/tests/unit/out/unsafe/operator_other_member.rs +++ b/tests/unit/out/unsafe/operator_other_member.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -32,6 +33,7 @@ impl Static { ZeroInitializationUnsafe, CppFromUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/operator_overloads.rs b/tests/unit/out/unsafe/operator_overloads.rs index 363ea990d4..0daac089a3 100644 --- a/tests/unit/out/unsafe/operator_overloads.rs +++ b/tests/unit/out/unsafe/operator_overloads.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/operator_qualifiers.rs b/tests/unit/out/unsafe/operator_qualifiers.rs index 8504bc5024..f159c75391 100644 --- a/tests/unit/out/unsafe/operator_qualifiers.rs +++ b/tests/unit/out/unsafe/operator_qualifiers.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/operator_three_way.rs b/tests/unit/out/unsafe/operator_three_way.rs index f2671b3d7e..68880cbe84 100644 --- a/tests/unit/out/unsafe/operator_three_way.rs +++ b/tests/unit/out/unsafe/operator_three_way.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/operator_traits.rs b/tests/unit/out/unsafe/operator_traits.rs index b5b860a20d..45dd3ad6d2 100644 --- a/tests/unit/out/unsafe/operator_traits.rs +++ b/tests/unit/out/unsafe/operator_traits.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -60,6 +61,7 @@ impl std::cmp::Eq for Lt {} FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -85,6 +87,7 @@ impl std::cmp::Eq for Eq {} FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -123,6 +126,7 @@ impl std::cmp::Eq for Cmp {} FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -167,6 +171,7 @@ pub unsafe fn operator_eq_1(a: *const Free, b: *const Free) -> bool { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/overload_mangling.rs b/tests/unit/out/unsafe/overload_mangling.rs index c9317a9a21..26ff80a792 100644 --- a/tests/unit/out/unsafe/overload_mangling.rs +++ b/tests/unit/out/unsafe/overload_mangling.rs @@ -23,6 +23,7 @@ pub unsafe fn twice_2(mut n: i32) -> i32 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -49,6 +50,7 @@ impl Access_S_ { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -132,6 +134,7 @@ impl S { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/pair_converting_construction.rs b/tests/unit/out/unsafe/pair_converting_construction.rs index 1c1c0e130a..885edd46da 100644 --- a/tests/unit/out/unsafe/pair_converting_construction.rs +++ b/tests/unit/out/unsafe/pair_converting_construction.rs @@ -15,6 +15,7 @@ use std::rc::Rc; ZeroInitializationUnsafe, CppFromUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -36,6 +37,7 @@ impl Celsius { ZeroInitializationUnsafe, CppFromUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -57,6 +59,7 @@ impl Meters { ZeroInitializationUnsafe, CppFromUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -78,6 +81,7 @@ impl Label { ZeroInitializationUnsafe, CppFromUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -106,6 +110,7 @@ impl Owner { ZeroInitializationUnsafe, CppFromUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -127,6 +132,7 @@ impl Holder { ZeroInitializationUnsafe, CppFromUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, )] #[cpp_from(i32, construct, value)] @@ -157,6 +163,7 @@ impl Default for Fallback { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -172,6 +179,7 @@ pub struct Counter { ZeroInitializationUnsafe, CppFromUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -199,6 +207,7 @@ impl Tag { ZeroInitializationUnsafe, CppFromUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -215,6 +224,7 @@ pub struct Tag { ZeroInitializationUnsafe, CppFromUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/pod.rs b/tests/unit/out/unsafe/pod.rs index 9ee5ea9f79..9faa6ab9b7 100644 --- a/tests/unit/out/unsafe/pod.rs +++ b/tests/unit/out/unsafe/pod.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/pointer_array.rs b/tests/unit/out/unsafe/pointer_array.rs index fa1f3cc073..6d746272c0 100644 --- a/tests/unit/out/unsafe/pointer_array.rs +++ b/tests/unit/out/unsafe/pointer_array.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/pointers.rs b/tests/unit/out/unsafe/pointers.rs index be4c591924..26524925b4 100644 --- a/tests/unit/out/unsafe/pointers.rs +++ b/tests/unit/out/unsafe/pointers.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/ptr_cast_init.rs b/tests/unit/out/unsafe/ptr_cast_init.rs index b2e14fe6b1..15d9e2c5e0 100644 --- a/tests/unit/out/unsafe/ptr_cast_init.rs +++ b/tests/unit/out/unsafe/ptr_cast_init.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -29,6 +30,7 @@ pub struct header { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/push_emplace_back.rs b/tests/unit/out/unsafe/push_emplace_back.rs index 3a871ff6ca..7b69248edd 100644 --- a/tests/unit/out/unsafe/push_emplace_back.rs +++ b/tests/unit/out/unsafe/push_emplace_back.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -28,6 +29,7 @@ pub struct Chunk { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -127,6 +129,7 @@ pub unsafe fn self_ref_push_6(mut comps: *mut Vec) { ZeroInitializationUnsafe, CppFromUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, )] #[cpp_from(i32, construct_1, value)] @@ -270,6 +273,7 @@ pub unsafe fn emplace_from_element_14(mut v: *mut Vec>) { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -294,6 +298,7 @@ pub static mut all_counted_16: std::cell::LazyCell<*mut Vec> = FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/random.rs b/tests/unit/out/unsafe/random.rs index eab06ff22a..e38fe02e5f 100644 --- a/tests/unit/out/unsafe/random.rs +++ b/tests/unit/out/unsafe/random.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -57,6 +58,7 @@ pub unsafe fn zero_0() -> i32 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/reference_wrapper.rs b/tests/unit/out/unsafe/reference_wrapper.rs index 9f3e3ed9fd..1bce59cd0d 100644 --- a/tests/unit/out/unsafe/reference_wrapper.rs +++ b/tests/unit/out/unsafe/reference_wrapper.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/references.rs b/tests/unit/out/unsafe/references.rs index af6126c6a7..9e847e2cb2 100644 --- a/tests/unit/out/unsafe/references.rs +++ b/tests/unit/out/unsafe/references.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -30,6 +31,7 @@ pub struct Pair { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/refs_as_args.rs b/tests/unit/out/unsafe/refs_as_args.rs index 2f7fd2c9dc..f6166c7ed7 100644 --- a/tests/unit/out/unsafe/refs_as_args.rs +++ b/tests/unit/out/unsafe/refs_as_args.rs @@ -25,6 +25,7 @@ pub unsafe fn more_refs_0(mut x1: i32, mut x2: i32, r1: *mut i32, r2: *const i32 FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/reinterpret_cast_ptr_cmp.rs b/tests/unit/out/unsafe/reinterpret_cast_ptr_cmp.rs index fa19cfabc8..cc3d354b20 100644 --- a/tests/unit/out/unsafe/reinterpret_cast_ptr_cmp.rs +++ b/tests/unit/out/unsafe/reinterpret_cast_ptr_cmp.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -29,6 +30,7 @@ pub struct S { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -44,6 +46,7 @@ pub struct W { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/reinterpret_cast_struct.rs b/tests/unit/out/unsafe/reinterpret_cast_struct.rs index 795706815f..a3984eb6b1 100644 --- a/tests/unit/out/unsafe/reinterpret_cast_struct.rs +++ b/tests/unit/out/unsafe/reinterpret_cast_struct.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/reinterpret_cast_struct_to_struct.rs b/tests/unit/out/unsafe/reinterpret_cast_struct_to_struct.rs index 98b5c7d4f7..2eacbfb83f 100644 --- a/tests/unit/out/unsafe/reinterpret_cast_struct_to_struct.rs +++ b/tests/unit/out/unsafe/reinterpret_cast_struct_to_struct.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -29,6 +30,7 @@ pub struct Point { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/reserved_keywords.rs b/tests/unit/out/unsafe/reserved_keywords.rs index 2a022c5622..9fc31e9fc6 100644 --- a/tests/unit/out/unsafe/reserved_keywords.rs +++ b/tests/unit/out/unsafe/reserved_keywords.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -65,6 +66,7 @@ pub struct S { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -79,6 +81,7 @@ pub struct type_ { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/return_move.rs b/tests/unit/out/unsafe/return_move.rs index 1f16547898..8830e486b5 100644 --- a/tests/unit/out/unsafe/return_move.rs +++ b/tests/unit/out/unsafe/return_move.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -29,6 +30,7 @@ pub struct node { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/rvalue_struct.rs b/tests/unit/out/unsafe/rvalue_struct.rs index b6583fd5b2..d1d4c88f3d 100644 --- a/tests/unit/out/unsafe/rvalue_struct.rs +++ b/tests/unit/out/unsafe/rvalue_struct.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/scalar_builtin_construct_destruct.rs b/tests/unit/out/unsafe/scalar_builtin_construct_destruct.rs index 757edd3664..b5eb981b0a 100644 --- a/tests/unit/out/unsafe/scalar_builtin_construct_destruct.rs +++ b/tests/unit/out/unsafe/scalar_builtin_construct_destruct.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/self_referencing_initializer.rs b/tests/unit/out/unsafe/self_referencing_initializer.rs index 9b6fe56f36..c7400ea11a 100644 --- a/tests/unit/out/unsafe/self_referencing_initializer.rs +++ b/tests/unit/out/unsafe/self_referencing_initializer.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -28,6 +29,7 @@ pub struct list_head { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -37,7 +39,14 @@ pub struct node { } #[repr(C)] #[derive( - Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + VaArg, + FnPtrArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub struct node_with_defaults { pub next: *mut node_with_defaults, diff --git a/tests/unit/out/unsafe/size_t_static_member.rs b/tests/unit/out/unsafe/size_t_static_member.rs index 0b70647185..0de6005546 100644 --- a/tests/unit/out/unsafe/size_t_static_member.rs +++ b/tests/unit/out/unsafe/size_t_static_member.rs @@ -15,6 +15,7 @@ pub static mut c_0: std::cell::LazyCell = std::cell::LazyCell::new(|| uns FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -29,6 +30,7 @@ pub static mut table_size_1: std::cell::LazyCell = FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/size_t_template_param.rs b/tests/unit/out/unsafe/size_t_template_param.rs index 445087702b..508e802558 100644 --- a/tests/unit/out/unsafe/size_t_template_param.rs +++ b/tests/unit/out/unsafe/size_t_template_param.rs @@ -19,6 +19,7 @@ pub unsafe fn array_ref_0(a: *mut [u64; 3]) -> u64 { ZeroInitializationUnsafe, CppFromUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -40,6 +41,7 @@ impl PtrCtor_unsigned_long_ { ZeroInitializationUnsafe, CppFromUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/static_local.rs b/tests/unit/out/unsafe/static_local.rs index b466c9f317..49031e80b9 100644 --- a/tests/unit/out/unsafe/static_local.rs +++ b/tests/unit/out/unsafe/static_local.rs @@ -29,6 +29,7 @@ static mut x_7: std::cell::LazyCell = std::cell::LazyCell::new(|| unsafe { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/static_var_in_class.rs b/tests/unit/out/unsafe/static_var_in_class.rs index de33e44eb5..97aa33cb94 100644 --- a/tests/unit/out/unsafe/static_var_in_class.rs +++ b/tests/unit/out/unsafe/static_var_in_class.rs @@ -15,6 +15,7 @@ static mut inner_const_0: std::cell::LazyCell = std::cell::LazyCell::new(|| FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -35,6 +36,7 @@ pub const anon_3_kValue: anon_3 = 3; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/stdcopy.rs b/tests/unit/out/unsafe/stdcopy.rs index 4a0b3d3449..e4e849da52 100644 --- a/tests/unit/out/unsafe/stdcopy.rs +++ b/tests/unit/out/unsafe/stdcopy.rs @@ -15,6 +15,7 @@ use std::rc::Rc; ZeroInitializationUnsafe, CppFromUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/strdup.rs b/tests/unit/out/unsafe/strdup.rs index 3eb8a6b96e..c521370ba5 100644 --- a/tests/unit/out/unsafe/strdup.rs +++ b/tests/unit/out/unsafe/strdup.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/string_literal_ptr_init.rs b/tests/unit/out/unsafe/string_literal_ptr_init.rs index 0c5d83689c..21068d4dfe 100644 --- a/tests/unit/out/unsafe/string_literal_ptr_init.rs +++ b/tests/unit/out/unsafe/string_literal_ptr_init.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/string_substr.rs b/tests/unit/out/unsafe/string_substr.rs index 932647e8a4..967c666cf5 100644 --- a/tests/unit/out/unsafe/string_substr.rs +++ b/tests/unit/out/unsafe/string_substr.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/struct_2d_array_field.rs b/tests/unit/out/unsafe/struct_2d_array_field.rs index 2e5488765e..2eed298726 100644 --- a/tests/unit/out/unsafe/struct_2d_array_field.rs +++ b/tests/unit/out/unsafe/struct_2d_array_field.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/struct_ctor.rs b/tests/unit/out/unsafe/struct_ctor.rs index 936b1a2049..982bfccf28 100644 --- a/tests/unit/out/unsafe/struct_ctor.rs +++ b/tests/unit/out/unsafe/struct_ctor.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -47,6 +48,7 @@ pub unsafe fn foo_0(x: *mut i32) -> *mut i32 { ZeroInitializationUnsafe, CppFromUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -61,7 +63,14 @@ impl Value_ { } #[repr(C)] #[derive( - Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + VaArg, + FnPtrArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub struct Ptr_ { pub v1: Value_, diff --git a/tests/unit/out/unsafe/struct_default_ctor.rs b/tests/unit/out/unsafe/struct_default_ctor.rs index f1402b710a..0e6ba0a22b 100644 --- a/tests/unit/out/unsafe/struct_default_ctor.rs +++ b/tests/unit/out/unsafe/struct_default_ctor.rs @@ -8,7 +8,14 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + VaArg, + FnPtrArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub struct S { pub a: i32, @@ -39,6 +46,7 @@ impl Default for S { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -54,6 +62,7 @@ impl Declared {} FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -63,7 +72,14 @@ pub struct Holder { pub static mut kInit_0: std::cell::LazyCell = std::cell::LazyCell::new(|| unsafe { 3 }); #[repr(C)] #[derive( - Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + VaArg, + FnPtrArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub struct FromStatic { pub v: i32, diff --git a/tests/unit/out/unsafe/struct_member_array_adjacency.rs b/tests/unit/out/unsafe/struct_member_array_adjacency.rs index 019d55c669..2656c8ae5d 100644 --- a/tests/unit/out/unsafe/struct_member_array_adjacency.rs +++ b/tests/unit/out/unsafe/struct_member_array_adjacency.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/struct_ptr.rs b/tests/unit/out/unsafe/struct_ptr.rs index 3cdf384bb2..9fbe59a3dc 100644 --- a/tests/unit/out/unsafe/struct_ptr.rs +++ b/tests/unit/out/unsafe/struct_ptr.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/structured_binding_range_for.rs b/tests/unit/out/unsafe/structured_binding_range_for.rs index fc845b2d96..decdc51094 100644 --- a/tests/unit/out/unsafe/structured_binding_range_for.rs +++ b/tests/unit/out/unsafe/structured_binding_range_for.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/structured_binding_ref.rs b/tests/unit/out/unsafe/structured_binding_ref.rs index 86de454fa1..d06987fd18 100644 --- a/tests/unit/out/unsafe/structured_binding_ref.rs +++ b/tests/unit/out/unsafe/structured_binding_ref.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/structured_binding_trivial.rs b/tests/unit/out/unsafe/structured_binding_trivial.rs index e295e8c2fe..4d1191a728 100644 --- a/tests/unit/out/unsafe/structured_binding_trivial.rs +++ b/tests/unit/out/unsafe/structured_binding_trivial.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/tag_vs_identifier_collision.rs b/tests/unit/out/unsafe/tag_vs_identifier_collision.rs index 0a102a8f47..62eb28ef27 100644 --- a/tests/unit/out/unsafe/tag_vs_identifier_collision.rs +++ b/tests/unit/out/unsafe/tag_vs_identifier_collision.rs @@ -18,6 +18,7 @@ pub const widget_enum_MODE_DONE: widget_enum = 2; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -33,6 +34,7 @@ pub struct widget { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -42,7 +44,14 @@ pub struct point_struct { } #[repr(C)] #[derive( - Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + FnPtrArg, + VaArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub union point { pub whole: i32, @@ -55,7 +64,14 @@ impl Default for point { } #[repr(C)] #[derive( - Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + FnPtrArg, + VaArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub union slot_union { pub i: i32, @@ -77,6 +93,7 @@ pub const slot_SLOT_B: slot = 1; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -91,6 +108,7 @@ pub struct Inner { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -105,6 +123,7 @@ pub struct Outer { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/template_default_arg.rs b/tests/unit/out/unsafe/template_default_arg.rs index 4f1ce78d44..0be8eece59 100644 --- a/tests/unit/out/unsafe/template_default_arg.rs +++ b/tests/unit/out/unsafe/template_default_arg.rs @@ -15,6 +15,7 @@ use std::rc::Rc; ZeroInitializationUnsafe, CppFromUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, )] #[cpp_from(i32, construct_1, value)] @@ -42,7 +43,14 @@ impl Default for A { } #[repr(C)] #[derive( - Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + VaArg, + FnPtrArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub struct B { pub v: i32, @@ -72,6 +80,7 @@ impl Default for B { ZeroInitializationUnsafe, CppFromUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -105,6 +114,7 @@ pub unsafe fn always_given_3(mut x: NoDefault) -> i32 { ZeroInitializationUnsafe, CppFromUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/template_static_member.rs b/tests/unit/out/unsafe/template_static_member.rs index efa4c745bc..47ac994744 100644 --- a/tests/unit/out/unsafe/template_static_member.rs +++ b/tests/unit/out/unsafe/template_static_member.rs @@ -15,6 +15,7 @@ pub static mut s_0: std::cell::LazyCell = std::cell::LazyCell::new(|| unsaf FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -29,6 +30,7 @@ pub static mut s_1: std::cell::LazyCell = FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -42,6 +44,7 @@ pub static mut s_2: std::cell::LazyCell = std::cell::LazyCell::new(|| unsaf FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -56,6 +59,7 @@ pub static mut hi_4: std::cell::LazyCell = std::cell::LazyCell::new(|| unsa FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -71,6 +75,7 @@ pub static mut hi_6: std::cell::LazyCell = std::cell::LazyCell::new(|| unsa FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/temporary_field_ctor_arg.rs b/tests/unit/out/unsafe/temporary_field_ctor_arg.rs index 8f1208c5d7..4c988758cc 100644 --- a/tests/unit/out/unsafe/temporary_field_ctor_arg.rs +++ b/tests/unit/out/unsafe/temporary_field_ctor_arg.rs @@ -37,6 +37,7 @@ pub unsafe fn make_0() -> Outer { ZeroInitializationUnsafe, CppFromUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/this.rs b/tests/unit/out/unsafe/this.rs index b7ddd5bd62..1fc64bb99c 100644 --- a/tests/unit/out/unsafe/this.rs +++ b/tests/unit/out/unsafe/this.rs @@ -15,6 +15,7 @@ use std::rc::Rc; ZeroInitializationUnsafe, CppFromUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -119,6 +120,7 @@ pub unsafe fn bump_0(mut p: *mut S) { ZeroInitializationUnsafe, CppFromUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/typedef-anon-struct.rs b/tests/unit/out/unsafe/typedef-anon-struct.rs index 63a62e6c25..03557fd799 100644 --- a/tests/unit/out/unsafe/typedef-anon-struct.rs +++ b/tests/unit/out/unsafe/typedef-anon-struct.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/unary_expr_or_type_trait.rs b/tests/unit/out/unsafe/unary_expr_or_type_trait.rs index 9e636e2ad0..ca2ccbcb1c 100644 --- a/tests/unit/out/unsafe/unary_expr_or_type_trait.rs +++ b/tests/unit/out/unsafe/unary_expr_or_type_trait.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/unboxed_locals.rs b/tests/unit/out/unsafe/unboxed_locals.rs index bdaa13d7f4..87b8ca6ac8 100644 --- a/tests/unit/out/unsafe/unboxed_locals.rs +++ b/tests/unit/out/unsafe/unboxed_locals.rs @@ -20,6 +20,7 @@ pub unsafe fn inc_1(r: *mut i32) { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/unboxed_records.rs b/tests/unit/out/unsafe/unboxed_records.rs index b2ff9a2a4a..d0852370af 100644 --- a/tests/unit/out/unsafe/unboxed_records.rs +++ b/tests/unit/out/unsafe/unboxed_records.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -29,6 +30,7 @@ pub struct Inner { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -41,7 +43,14 @@ pub struct Cookie { } #[repr(C)] #[derive( - Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + VaArg, + FnPtrArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub struct Counter { pub n: i32, diff --git a/tests/unit/out/unsafe/union_addrof_external.rs b/tests/unit/out/unsafe/union_addrof_external.rs index 583405c164..41a91a7fce 100644 --- a/tests/unit/out/unsafe/union_addrof_external.rs +++ b/tests/unit/out/unsafe/union_addrof_external.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -25,7 +26,14 @@ pub struct record { } #[repr(C)] #[derive( - Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + FnPtrArg, + VaArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub union anon_0 { pub h: record, @@ -44,6 +52,7 @@ impl Default for anon_0 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/union_basic.rs b/tests/unit/out/unsafe/union_basic.rs index 5e3631b289..13e17e67c5 100644 --- a/tests/unit/out/unsafe/union_basic.rs +++ b/tests/unit/out/unsafe/union_basic.rs @@ -8,7 +8,14 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + FnPtrArg, + VaArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub union basic { pub i: i32, @@ -21,7 +28,14 @@ impl Default for basic { } #[repr(C)] #[derive( - Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + FnPtrArg, + VaArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub union empty { __empty: u8, @@ -33,7 +47,14 @@ impl Default for empty { } #[repr(C)] #[derive( - Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + FnPtrArg, + VaArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub union underscores { pub __: i32, @@ -98,7 +119,14 @@ unsafe fn main_0() -> i32 { } #[repr(C)] #[derive( - Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + FnPtrArg, + VaArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub union anon_0 { pub ai: i32, diff --git a/tests/unit/out/unsafe/union_cross_arm_cast.rs b/tests/unit/out/unsafe/union_cross_arm_cast.rs index 95cbe7c41b..98dd8dfca2 100644 --- a/tests/unit/out/unsafe/union_cross_arm_cast.rs +++ b/tests/unit/out/unsafe/union_cross_arm_cast.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -29,6 +30,7 @@ pub struct shape_a { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -41,7 +43,14 @@ pub struct shape_b { } #[repr(C)] #[derive( - Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + FnPtrArg, + VaArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub union anon_0 { pub a: shape_a, @@ -61,6 +70,7 @@ impl Default for anon_0 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/union_field_alignment.rs b/tests/unit/out/unsafe/union_field_alignment.rs index b5eabbc966..6d11667278 100644 --- a/tests/unit/out/unsafe/union_field_alignment.rs +++ b/tests/unit/out/unsafe/union_field_alignment.rs @@ -8,7 +8,14 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + FnPtrArg, + VaArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub union anon_0 { pub bytes: [u8; 1], @@ -27,6 +34,7 @@ impl Default for anon_0 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/union_flex_array_member.rs b/tests/unit/out/unsafe/union_flex_array_member.rs index 036b79f72e..506a11bf3a 100644 --- a/tests/unit/out/unsafe/union_flex_array_member.rs +++ b/tests/unit/out/unsafe/union_flex_array_member.rs @@ -8,7 +8,14 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + FnPtrArg, + VaArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub union anon_0 { pub bytes: [u8; 1], @@ -27,6 +34,7 @@ impl Default for anon_0 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/union_memset_memcpy.rs b/tests/unit/out/unsafe/union_memset_memcpy.rs index 863410f1d5..a5747e788d 100644 --- a/tests/unit/out/unsafe/union_memset_memcpy.rs +++ b/tests/unit/out/unsafe/union_memset_memcpy.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -29,6 +30,7 @@ pub struct shape_a { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -40,7 +42,14 @@ pub struct shape_b { } #[repr(C)] #[derive( - Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + FnPtrArg, + VaArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub union anon_0 { pub a: shape_a, @@ -60,6 +69,7 @@ impl Default for anon_0 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/union_nested.rs b/tests/unit/out/unsafe/union_nested.rs index da8865c764..2b4486b2ce 100644 --- a/tests/unit/out/unsafe/union_nested.rs +++ b/tests/unit/out/unsafe/union_nested.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -23,7 +24,14 @@ pub struct record { } #[repr(C)] #[derive( - Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + FnPtrArg, + VaArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub union anon_0 { pub h: record, @@ -42,6 +50,7 @@ impl Default for anon_0 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -50,7 +59,14 @@ pub struct inner { } #[repr(C)] #[derive( - Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + FnPtrArg, + VaArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub union anon_1 { pub h: record, @@ -69,6 +85,7 @@ impl Default for anon_1 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/union_pointer_pun_address.rs b/tests/unit/out/unsafe/union_pointer_pun_address.rs index e5dc87af40..cac995bfe0 100644 --- a/tests/unit/out/unsafe/union_pointer_pun_address.rs +++ b/tests/unit/out/unsafe/union_pointer_pun_address.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -28,6 +29,7 @@ pub struct node_a { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -51,7 +53,14 @@ unsafe fn main_0() -> i32 { } #[repr(C)] #[derive( - Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + FnPtrArg, + VaArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub union anon_0 { pub to_a: *mut node_a, diff --git a/tests/unit/out/unsafe/union_pointer_pun_writethrough.rs b/tests/unit/out/unsafe/union_pointer_pun_writethrough.rs index 55c72a4cf7..d4dd65d477 100644 --- a/tests/unit/out/unsafe/union_pointer_pun_writethrough.rs +++ b/tests/unit/out/unsafe/union_pointer_pun_writethrough.rs @@ -22,7 +22,14 @@ unsafe fn main_0() -> i32 { } #[repr(C)] #[derive( - Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + FnPtrArg, + VaArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub union anon_0 { pub as_unsigned: *mut u64, diff --git a/tests/unit/out/unsafe/union_struct_dual_use.rs b/tests/unit/out/unsafe/union_struct_dual_use.rs index f1e97f226b..31160a3938 100644 --- a/tests/unit/out/unsafe/union_struct_dual_use.rs +++ b/tests/unit/out/unsafe/union_struct_dual_use.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -26,7 +27,14 @@ pub unsafe fn sum_inner_0(mut i: *mut Inner) -> i32 { } #[repr(C)] #[derive( - Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + FnPtrArg, + VaArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub union anon_1 { pub inner: Inner, @@ -45,6 +53,7 @@ impl Default for anon_1 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/union_tagged_many_arms.rs b/tests/unit/out/unsafe/union_tagged_many_arms.rs index 680550d074..b18c1a3971 100644 --- a/tests/unit/out/unsafe/union_tagged_many_arms.rs +++ b/tests/unit/out/unsafe/union_tagged_many_arms.rs @@ -14,7 +14,14 @@ pub const Tag_enum_T_FLOAT: Tag_enum = 3; pub const Tag_enum_T_REF: Tag_enum = 4; #[repr(C)] #[derive( - Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + FnPtrArg, + VaArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub union anon_0 { pub text: *const libc::c_char, @@ -36,6 +43,7 @@ impl Default for anon_0 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/union_tagged_simple.rs b/tests/unit/out/unsafe/union_tagged_simple.rs index 3bca5d919b..e11bcc8d75 100644 --- a/tests/unit/out/unsafe/union_tagged_simple.rs +++ b/tests/unit/out/unsafe/union_tagged_simple.rs @@ -11,7 +11,14 @@ pub const Kind_enum_KIND_NONE: Kind_enum = 0; pub const Kind_enum_KIND_DONE: Kind_enum = 1; #[repr(C)] #[derive( - Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + FnPtrArg, + VaArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub union anon_0 { pub obj: *mut ::libc::c_void, @@ -30,6 +37,7 @@ impl Default for anon_0 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/union_tagged_struct_arms.rs b/tests/unit/out/unsafe/union_tagged_struct_arms.rs index c361a1f66d..898814120d 100644 --- a/tests/unit/out/unsafe/union_tagged_struct_arms.rs +++ b/tests/unit/out/unsafe/union_tagged_struct_arms.rs @@ -18,6 +18,7 @@ pub const Choice_enum_C_INTEGERS: Choice_enum = 3; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -34,6 +35,7 @@ pub struct anon_1 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -51,6 +53,7 @@ pub struct anon_2 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -63,7 +66,14 @@ pub struct anon_3 { } #[repr(C)] #[derive( - Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + FnPtrArg, + VaArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub union anon_0 { pub list: anon_1, @@ -83,6 +93,7 @@ impl Default for anon_0 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/union_void_ptr_sized_deref.rs b/tests/unit/out/unsafe/union_void_ptr_sized_deref.rs index 551333dd54..958a89adb0 100644 --- a/tests/unit/out/unsafe/union_void_ptr_sized_deref.rs +++ b/tests/unit/out/unsafe/union_void_ptr_sized_deref.rs @@ -12,7 +12,14 @@ pub const Width_enum_W_32: Width_enum = 1; pub const Width_enum_W_16: Width_enum = 2; #[repr(C)] #[derive( - Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + FnPtrArg, + VaArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub union anon_0 { pub text: *const libc::c_char, @@ -33,6 +40,7 @@ impl Default for anon_0 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/unique_ptr.rs b/tests/unit/out/unsafe/unique_ptr.rs index 566763cf2f..805b55a29e 100644 --- a/tests/unit/out/unsafe/unique_ptr.rs +++ b/tests/unit/out/unsafe/unique_ptr.rs @@ -36,6 +36,7 @@ impl SafePointer { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/unique_ptr_field_reset.rs b/tests/unit/out/unsafe/unique_ptr_field_reset.rs index 2526277683..aa3776cefb 100644 --- a/tests/unit/out/unsafe/unique_ptr_field_reset.rs +++ b/tests/unit/out/unsafe/unique_ptr_field_reset.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/unique_ptr_nested.rs b/tests/unit/out/unsafe/unique_ptr_nested.rs index ded6fbf65f..e1cde20315 100644 --- a/tests/unit/out/unsafe/unique_ptr_nested.rs +++ b/tests/unit/out/unsafe/unique_ptr_nested.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/unique_ptr_struct.rs b/tests/unit/out/unsafe/unique_ptr_struct.rs index 4cd3a36d1f..63507db816 100644 --- a/tests/unit/out/unsafe/unique_ptr_struct.rs +++ b/tests/unit/out/unsafe/unique_ptr_struct.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/va_arg_mixed_types.rs b/tests/unit/out/unsafe/va_arg_mixed_types.rs index e25e9b87f5..c8740b7932 100644 --- a/tests/unit/out/unsafe/va_arg_mixed_types.rs +++ b/tests/unit/out/unsafe/va_arg_mixed_types.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/va_arg_non_primitive_ptrs.rs b/tests/unit/out/unsafe/va_arg_non_primitive_ptrs.rs index 17717a61e9..2b287f3ca0 100644 --- a/tests/unit/out/unsafe/va_arg_non_primitive_ptrs.rs +++ b/tests/unit/out/unsafe/va_arg_non_primitive_ptrs.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/va_arg_struct_ctx.rs b/tests/unit/out/unsafe/va_arg_struct_ctx.rs index f14ad832d4..385895e4f4 100644 --- a/tests/unit/out/unsafe/va_arg_struct_ctx.rs +++ b/tests/unit/out/unsafe/va_arg_struct_ctx.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -34,7 +35,14 @@ pub unsafe fn set_error_0( } #[repr(C)] #[derive( - Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + FnPtrArg, + VaArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub union value { pub i: i32, diff --git a/tests/unit/out/unsafe/va_arg_void_ptr.rs b/tests/unit/out/unsafe/va_arg_void_ptr.rs index bf9c3ae583..6b30b24124 100644 --- a/tests/unit/out/unsafe/va_arg_void_ptr.rs +++ b/tests/unit/out/unsafe/va_arg_void_ptr.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/va_list_field.rs b/tests/unit/out/unsafe/va_list_field.rs index 6411cb6c7c..63b15ae462 100644 --- a/tests/unit/out/unsafe/va_list_field.rs +++ b/tests/unit/out/unsafe/va_list_field.rs @@ -72,6 +72,7 @@ pub unsafe fn sum_ptr_2(mut n: i32, __args: Box<[VaArg]>) -> i32 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/vector.rs b/tests/unit/out/unsafe/vector.rs index e20af38cf1..2b09138e6c 100644 --- a/tests/unit/out/unsafe/vector.rs +++ b/tests/unit/out/unsafe/vector.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/vector_iter_range_ctor.rs b/tests/unit/out/unsafe/vector_iter_range_ctor.rs index fef414e705..3a6bcc53b6 100644 --- a/tests/unit/out/unsafe/vector_iter_range_ctor.rs +++ b/tests/unit/out/unsafe/vector_iter_range_ctor.rs @@ -15,6 +15,7 @@ use std::rc::Rc; ZeroInitializationUnsafe, CppFromUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -36,6 +37,7 @@ impl Degrees { ZeroInitializationUnsafe, CppFromUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/vector_subscript_direct.rs b/tests/unit/out/unsafe/vector_subscript_direct.rs index 9efc1fdce3..5d170068c2 100644 --- a/tests/unit/out/unsafe/vector_subscript_direct.rs +++ b/tests/unit/out/unsafe/vector_subscript_direct.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/vector_with_allocator.rs b/tests/unit/out/unsafe/vector_with_allocator.rs index 50ea8fd8a7..d3933d88b0 100644 --- a/tests/unit/out/unsafe/vector_with_allocator.rs +++ b/tests/unit/out/unsafe/vector_with_allocator.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -43,6 +44,7 @@ impl TestAllocator_int_ { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/void_cast.rs b/tests/unit/out/unsafe/void_cast.rs index e8b95ebef5..e2730ce1aa 100644 --- a/tests/unit/out/unsafe/void_cast.rs +++ b/tests/unit/out/unsafe/void_cast.rs @@ -40,6 +40,7 @@ pub unsafe fn bump_and_return_4() -> i32 { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] From a3cff3b184629f55d62b491b9d94eccd5334d2d5 Mon Sep 17 00:00:00 2001 From: Lucian Popescu Date: Tue, 1 Dec 2026 15:31:53 +0000 Subject: [PATCH 3/7] Derive MoveConstructible on late CopyConstructible --- cpp2rust/converter/converter.cpp | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/cpp2rust/converter/converter.cpp b/cpp2rust/converter/converter.cpp index 157c54e43f..96ebd61e9b 100644 --- a/cpp2rust/converter/converter.cpp +++ b/cpp2rust/converter/converter.cpp @@ -84,12 +84,21 @@ void Converter::EmitUndefinedRecordTraits(Model model, std::string &out) { } void Converter::DeclareRecordTraits(const clang::CXXRecordDecl *decl) { + auto &traits = declared_record_traits_[GetRecordName(decl)]; for (auto *method : decl->methods()) { if (auto *trait = GetRecordTrait(method); trait && !IsDerivedCopyOrMove(method)) { - declared_record_traits_[GetRecordName(decl)].emplace(trait->name, trait); + traits.emplace(trait->name, trait); } } + if (traits.contains(kCopyConstructible.name) && + !decl->hasUserDeclaredMoveConstructor()) { + traits.emplace(kMoveConstructible.name, &kMoveConstructible); + } + if (traits.contains(kCopyAssignable.name) && + !decl->hasUserDeclaredMoveAssignment()) { + traits.emplace(kMoveAssignable.name, &kMoveAssignable); + } } std::string Converter::ForceGlobalInit(const clang::VarDecl *decl) { @@ -5670,6 +5679,14 @@ void Converter::AddCopyAndMoveDerives(const clang::RecordDecl *decl, auto implements = [&](const RecordTrait *trait) { return ImplementsRecordTrait(decl, *trait); }; + auto derive = [&](const RecordTrait &trait, + std::initializer_list provided) { + attrs.emplace_back(GetCopyOrMoveTraitName(trait)); + for (const auto *provided_trait : provided) { + converted_record_traits_.emplace(GetRecordName(decl), + provided_trait->name); + } + }; if (!GetDerivedCopyOrMoves(decl).empty()) { attrs.emplace_back(GetCopyOrMoveTraitName(kMemberwise)); } @@ -5681,31 +5698,32 @@ void Converter::AddCopyAndMoveDerives(const clang::RecordDecl *decl, } bool writes_move = llvm::any_of(move, implements); if (copies && !writes_move && llvm::none_of(copy, implements)) { - attrs.emplace_back(GetCopyOrMoveTraitName(kCopyable)); + derive(kCopyable, {&kCopyConstructible, &kCopyAssignable, + &kMoveConstructible, &kMoveAssignable, &kSwappable}); return; } if (copies) { for (const auto *trait : copy) { if (!implements(trait)) { - attrs.emplace_back(GetCopyOrMoveTraitName(*trait)); + derive(*trait, {trait}); } } } if (!writes_move) { if (copies) { - attrs.emplace_back(GetCopyOrMoveTraitName(kMovable)); + derive(kMovable, {&kMoveConstructible, &kMoveAssignable, &kSwappable}); } return; } if (copies) { for (const auto *trait : move) { if (!implements(trait)) { - attrs.emplace_back(GetCopyOrMoveTraitName(*trait)); + derive(*trait, {trait}); } } } if (copies || llvm::all_of(move, implements)) { - attrs.emplace_back(GetCopyOrMoveTraitName(kSwappable)); + derive(kSwappable, {&kSwappable}); } } From d3ad6e6ea5c79d3eceb96ef062b02badb1444319 Mon Sep 17 00:00:00 2001 From: Lucian Popescu Date: Tue, 1 Dec 2026 15:33:59 +0000 Subject: [PATCH 4/7] Call copy_constructor instead of Ptr::read --- libcc2rs/src/conversion.rs | 5 +- libcc2rs/src/lib.rs | 2 +- libcc2rs/src/swap.rs | 27 ++- rules/array/tgt_refcount.rs | 6 +- rules/map/shim.rs | 9 +- rules/map/tgt_refcount.rs | 6 +- rules/vector/tgt_refcount.rs | 4 +- tests/std/basic/out/refcount/basic.def.odr.rs | 7 + tests/std/basic/out/unsafe/basic.def.odr.rs | 7 + .../out/refcount/inline_container_fields.rs | 4 +- tests/unit/out/refcount/map.rs | 6 +- tests/unit/out/refcount/map_try_emplace.rs | 28 +-- .../out/refcount/map_try_emplace_lvalues.rs | 170 +++++++++++------- tests/unit/out/refcount/vector.rs | 2 +- .../out/refcount/vector_iter_range_ctor.rs | 2 +- 15 files changed, 179 insertions(+), 106 deletions(-) diff --git a/libcc2rs/src/conversion.rs b/libcc2rs/src/conversion.rs index 64dd8c35c3..584c15ea6f 100644 --- a/libcc2rs/src/conversion.rs +++ b/libcc2rs/src/conversion.rs @@ -2,7 +2,6 @@ // Distributed under the MIT license that can be found in the LICENSE file. use crate::rc::Ptr; -use crate::reinterpret::ByteRepr; pub trait CppFrom: Sized { fn cpp_from(src: Ptr) -> Self; @@ -24,9 +23,9 @@ pub trait CppFromUnsafe: Sized { } } -impl CppFrom for T { +impl CppFrom for T { fn cpp_from(src: Ptr) -> T { - src.read() + crate::copy_constructed(src) } } diff --git a/libcc2rs/src/lib.rs b/libcc2rs/src/lib.rs index 2fa18ac12b..165c836eae 100644 --- a/libcc2rs/src/lib.rs +++ b/libcc2rs/src/lib.rs @@ -67,7 +67,7 @@ mod initialization; pub use initialization::{ZeroInitialization, ZeroInitializationUnsafe}; mod swap; -pub use swap::{swap_by_move, swap_by_move_unsafe}; +pub use swap::{copy_constructed, swap_by_move, swap_by_move_unsafe}; // Used by cpp_move! and cpp_move_unsafe!. #[doc(hidden)] pub mod __swap { diff --git a/libcc2rs/src/swap.rs b/libcc2rs/src/swap.rs index a6e6c7def3..5a73a257f4 100644 --- a/libcc2rs/src/swap.rs +++ b/libcc2rs/src/swap.rs @@ -14,12 +14,11 @@ use std::rc::Rc; use crate::capture::{Destructible, DestructibleUnsafe}; use crate::constructor::{ - MoveAssignable, MoveAssignableUnsafe, MoveConstructible, MoveConstructibleUnsafe, - TriviallyCopyable, TriviallyCopyableUnsafe, + CopyConstructible, CopyConstructibleUnsafe, MoveAssignable, MoveAssignableUnsafe, + MoveConstructible, MoveConstructibleUnsafe, }; use crate::initialization::ZeroInitialization; use crate::rc::{AsPointer, Ptr, Value}; -use crate::reinterpret::ByteRepr; #[macro_export] macro_rules! cpp_move { @@ -55,6 +54,20 @@ fn move_constructed(src: &Ptr) -> Rc::try_unwrap(dst).ok().unwrap().into_inner() } +pub fn copy_constructed(src: Ptr) -> T { + let dst: Value = Rc::new(RefCell::new(T::zero_init())); + T::copy_constructor(&pointer(&dst), src); + Rc::try_unwrap(dst).ok().unwrap().into_inner() +} + +unsafe fn copy_constructed_unsafe(src: *const T) -> T { + let mut dst = std::mem::MaybeUninit::::uninit(); + unsafe { + (*dst.as_mut_ptr()).copy_constructor(src); + dst.assume_init() + } +} + unsafe fn move_constructed_unsafe(src: *mut T) -> T { let mut dst = std::mem::MaybeUninit::::uninit(); unsafe { @@ -83,9 +96,9 @@ impl ConstructMove for &&&Construc } } -impl ConstructCopy for &&Construct<'_, T> { +impl ConstructCopy for &&Construct<'_, T> { fn construct(self) -> T { - self.0.read() + copy_constructed(self.0.clone()) } } @@ -115,9 +128,9 @@ impl ConstructMoveUnsafe for &&&ConstructUnsafe ConstructCopyUnsafe for &&ConstructUnsafe { +impl ConstructCopyUnsafe for &&ConstructUnsafe { unsafe fn construct(self) -> T { - unsafe { T::trivial_copy(self.0) } + unsafe { copy_constructed_unsafe(self.0) } } } diff --git a/rules/array/tgt_refcount.rs b/rules/array/tgt_refcount.rs index 123400c152..cb30bfcc2c 100644 --- a/rules/array/tgt_refcount.rs +++ b/rules/array/tgt_refcount.rs @@ -51,8 +51,10 @@ fn f5( a0 } -fn f6(a0: Ptr) -> Box<[T1]> { - (0..T2).map(|__i| a0.read_at(__i)).collect() +fn f6(a0: Ptr) -> Box<[T1]> { + (0..T2) + .map(|__i| copy_constructed(a0.offset(__i))) + .collect() } fn f7( diff --git a/rules/map/shim.rs b/rules/map/shim.rs index a5fb83511d..022cdff2b4 100644 --- a/rules/map/shim.rs +++ b/rules/map/shim.rs @@ -8,8 +8,9 @@ use std::ops::Bound; use std::rc::{Rc, Weak}; use crate::{ - AsPointer, BidirectionalIterator, ByteRepr, CppIterator, CppLess, Ptr, - TriviallyCopyable, UnsafeBidirectionalIterator, UnsafeCppIterator, Value, cpp_cmp, + AsPointer, BidirectionalIterator, ByteRepr, CopyConstructible, CppIterator, CppLess, Ptr, + UnsafeBidirectionalIterator, UnsafeCppIterator, Value, ZeroInitialization, copy_constructed, + cpp_cmp, }; impl ByteRepr for BTreeMap {} @@ -235,11 +236,11 @@ impl Map> { // inserted. pub fn subscript(&mut self, key: Ptr, new_value: impl FnOnce() -> V) -> Ptr where - K: TriviallyCopyable + ByteRepr, + K: ZeroInitialization + CopyConstructible, { match self.search(&key) { Ok(node) => Self::mapped(&node), - Err(prev) => self.insert_after(prev, key.read(), new_value()), + Err(prev) => self.insert_after(prev, copy_constructed(key), new_value()), } } diff --git a/rules/map/tgt_refcount.rs b/rules/map/tgt_refcount.rs index f7531cccd5..71cfde537b 100644 --- a/rules/map/tgt_refcount.rs +++ b/rules/map/tgt_refcount.rs @@ -9,7 +9,7 @@ fn t1() -> Map, Value)> { Map::new() } -fn f1( +fn f1( a0: &mut Map, Value)>, a1: Ptr, ) -> Ptr { @@ -116,13 +116,13 @@ fn f68( Map::emplace(a0, &init.0.as_pointer(), || init).0 } -fn f73( +fn f73( a0: Ptr, Value)>>, a1: Ptr, init: T2, ) -> (Value, Value)>>, Value) { let (__it, __inserted) = Map::emplace(a0, &a1, || { - (Rc::new(RefCell::new(a1.read())), Rc::new(RefCell::new(init))) + (Rc::new(RefCell::new(copy_constructed(a1.clone()))), Rc::new(RefCell::new(init))) }); (Rc::new(RefCell::new(__it)), Rc::new(RefCell::new(__inserted))) } diff --git a/rules/vector/tgt_refcount.rs b/rules/vector/tgt_refcount.rs index 5acdfc89eb..b10de69b3d 100644 --- a/rules/vector/tgt_refcount.rs +++ b/rules/vector/tgt_refcount.rs @@ -110,7 +110,7 @@ fn f99(a0: &Vec) -> &T1 { &a0[__n] } -fn f101>( +fn f101>( a0: Ptr>, a1: RandomAccessIterator, a2: T3, @@ -120,7 +120,7 @@ fn f101>( let mut temp_vec: Vec = Vec::new(); let mut __it = a2; while __it != a3 { - temp_vec.push(__it.iter_deref().read()); + temp_vec.push(copy_constructed(__it.iter_deref())); __it.iter_inc(); } a0.with_mut(|v: &mut Vec| { diff --git a/tests/std/basic/out/refcount/basic.def.odr.rs b/tests/std/basic/out/refcount/basic.def.odr.rs index d755d0cf61..ee18416964 100644 --- a/tests/std/basic/out/refcount/basic.def.odr.rs +++ b/tests/std/basic/out/refcount/basic.def.odr.rs @@ -882,6 +882,13 @@ impl CopyConstructible for p9_unused_copy_constructor_HasUndefinedCopyCtor { ) } } +impl MoveConstructible for p9_unused_copy_constructor_HasUndefinedCopyCtor { + fn move_constructor(_: &Ptr, _: Ptr) { + unreachable!( + "p9_unused_copy_constructor_HasUndefinedCopyCtor::move_constructor is never defined" + ) + } +} impl CopyAssignable for p9_unused_implicit_assignment_HasUndefinedCopyAssignment { fn copy_assign(_: &Ptr, _: Ptr) -> Ptr { unreachable!( diff --git a/tests/std/basic/out/unsafe/basic.def.odr.rs b/tests/std/basic/out/unsafe/basic.def.odr.rs index 40e4484a29..f787249ad4 100644 --- a/tests/std/basic/out/unsafe/basic.def.odr.rs +++ b/tests/std/basic/out/unsafe/basic.def.odr.rs @@ -846,6 +846,13 @@ impl CopyConstructibleUnsafe for p9_unused_copy_constructor_HasUndefinedCopyCtor ) } } +impl MoveConstructibleUnsafe for p9_unused_copy_constructor_HasUndefinedCopyCtor { + unsafe fn move_constructor(&mut self, _: *mut Self) { + unreachable!( + "p9_unused_copy_constructor_HasUndefinedCopyCtor::move_constructor is never defined" + ) + } +} impl CopyAssignableUnsafe for p9_unused_implicit_assignment_HasUndefinedCopyAssignment { unsafe fn copy_assign(&mut self, _: *const Self) -> *mut Self { unreachable!( diff --git a/tests/unit/out/refcount/inline_container_fields.rs b/tests/unit/out/refcount/inline_container_fields.rs index 7bb19f7897..699221ad01 100644 --- a/tests/unit/out/refcount/inline_container_fields.rs +++ b/tests/unit/out/refcount/inline_container_fields.rs @@ -384,7 +384,9 @@ fn main_0() -> i32 { && ({ (*ca.borrow())[1_usize].v } == -1_i32) ); let cc: Value> = Rc::new(RefCell::new( - (0..3).map(|__i| cb.decay().read_at(__i)).collect(), + (0..3) + .map(|__i| copy_constructed(cb.decay().offset(__i))) + .collect(), )); assert!( ((copies_2.with(|rc| *rc.borrow()) == 3) && ({ (*cc.borrow())[1_usize].v } == 5)) diff --git a/tests/unit/out/refcount/map.rs b/tests/unit/out/refcount/map.rs index 4a7e6f07f3..ac6c9a5437 100644 --- a/tests/unit/out/refcount/map.rs +++ b/tests/unit/out/refcount/map.rs @@ -684,7 +684,7 @@ fn main_0() -> i32 { )> = Rc::new(RefCell::new({ let (__it, __inserted) = Map::emplace(m3.as_pointer(), &key1.as_pointer(), || { ( - Rc::new(RefCell::new(key1.as_pointer().read())), + Rc::new(RefCell::new(copy_constructed(key1.as_pointer().clone()))), Rc::new(RefCell::new(9)), ) }); @@ -711,7 +711,7 @@ fn main_0() -> i32 { )> = Rc::new(RefCell::new({ let (__it, __inserted) = Map::emplace(m3.as_pointer(), &key8.as_pointer(), || { ( - Rc::new(RefCell::new(key8.as_pointer().read())), + Rc::new(RefCell::new(copy_constructed(key8.as_pointer().clone()))), Rc::new(RefCell::new(9)), ) }); @@ -738,7 +738,7 @@ fn main_0() -> i32 { )> = Rc::new(RefCell::new({ let (__it, __inserted) = Map::emplace(points.as_pointer(), &key1.as_pointer(), || { ( - Rc::new(RefCell::new(key1.as_pointer().read())), + Rc::new(RefCell::new(copy_constructed(key1.as_pointer().clone()))), Rc::new(RefCell::new({ let __v: Value = Rc::new(RefCell::new(::zero_init())); PointImpl::construct_2(&__v.as_pointer(), { 3 }, { 4 }); diff --git a/tests/unit/out/refcount/map_try_emplace.rs b/tests/unit/out/refcount/map_try_emplace.rs index bb5024b0de..681f2b56d3 100644 --- a/tests/unit/out/refcount/map_try_emplace.rs +++ b/tests/unit/out/refcount/map_try_emplace.rs @@ -145,7 +145,9 @@ thread_local!( &global_key_7.with(|v| v.as_pointer()), || { ( - Rc::new(RefCell::new(global_key_7.with(|v| v.as_pointer()).read())), + Rc::new(RefCell::new(copy_constructed( + global_key_7.with(|v| v.as_pointer()).clone(), + ))), Rc::new(RefCell::new((__tmp_0.read()))), ) }, @@ -242,7 +244,7 @@ fn main_0() -> i32 { m.as_pointer(), &key.as_pointer(), || { - (Rc::new(RefCell::new(key .as_pointer() .read())), Rc::new(RefCell::new((__tmp_2.read()) ))) + (Rc::new(RefCell::new(copy_constructed(key .as_pointer() .clone()))), Rc::new(RefCell::new((__tmp_2.read()) ))) }, ); ( @@ -268,7 +270,7 @@ fn main_0() -> i32 { m.as_pointer(), &key.as_pointer(), || { - (Rc::new(RefCell::new(key .as_pointer() .read())), Rc::new(RefCell::new((__tmp_4.read()) ))) + (Rc::new(RefCell::new(copy_constructed(key .as_pointer() .clone()))), Rc::new(RefCell::new((__tmp_4.read()) ))) }, ); ( @@ -363,7 +365,7 @@ fn main_0() -> i32 { { let (__it, __inserted) = Map::emplace(items.as_pointer(), &key.as_pointer(), || { ( - Rc::new(RefCell::new(key.as_pointer().read())), + Rc::new(RefCell::new(copy_constructed(key.as_pointer().clone()))), Rc::new(RefCell::new({ let __v: Value = Rc::new(RefCell::new(::zero_init())); ItemImpl::construct_1(&__v.as_pointer(), { 10 }); @@ -398,7 +400,7 @@ fn main_0() -> i32 { let (__it, __inserted) = Map::emplace(items.as_pointer(), &key.as_pointer(), || { ( - Rc::new(RefCell::new(key.as_pointer().read())), + Rc::new(RefCell::new(copy_constructed(key.as_pointer().clone()))), Rc::new(RefCell::new({ let __v: Value = Rc::new(RefCell::new(::zero_init())); CopyConstructible::copy_constructor(&__v.as_pointer(), { @@ -439,7 +441,7 @@ fn main_0() -> i32 { let (__it, __inserted) = Map::emplace(items.as_pointer(), &key.as_pointer(), || { ( - Rc::new(RefCell::new(key.as_pointer().read())), + Rc::new(RefCell::new(copy_constructed(key.as_pointer().clone()))), Rc::new(RefCell::new({ let __v: Value = Rc::new(RefCell::new(::zero_init())); MoveConstructible::move_constructor(&__v.as_pointer(), { @@ -479,7 +481,7 @@ fn main_0() -> i32 { let (__it, __inserted) = Map::emplace(items.as_pointer(), &key.as_pointer(), || { ( - Rc::new(RefCell::new(key.as_pointer().read())), + Rc::new(RefCell::new(copy_constructed(key.as_pointer().clone()))), Rc::new(RefCell::new({ let __v: Value = Rc::new(RefCell::new(::zero_init())); CopyConstructible::copy_constructor(&__v.as_pointer(), { @@ -521,7 +523,7 @@ fn main_0() -> i32 { let (__it, __inserted) = Map::emplace(items.as_pointer(), &key.as_pointer(), || { ( - Rc::new(RefCell::new(key.as_pointer().read())), + Rc::new(RefCell::new(copy_constructed(key.as_pointer().clone()))), Rc::new(RefCell::new({ let __v: Value = Rc::new(RefCell::new(::zero_init())); MoveConstructible::move_constructor(&__v.as_pointer(), { @@ -560,7 +562,7 @@ fn main_0() -> i32 { { let (__it, __inserted) = Map::emplace(refs.as_pointer(), &key.as_pointer(), || { ( - Rc::new(RefCell::new(key.as_pointer().read())), + Rc::new(RefCell::new(copy_constructed(key.as_pointer().clone()))), Rc::new(RefCell::new({ let __v: Value = Rc::new(RefCell::new(::zero_init())); RefItemImpl::construct_2(&__v.as_pointer(), { counter.as_pointer() }, { 5 }); @@ -582,7 +584,7 @@ fn main_0() -> i32 { (__tmp_10,) => { let (__it, __inserted) = Map::emplace(refs.as_pointer(), &key.as_pointer(), || { ( - Rc::new(RefCell::new(key.as_pointer().read())), + Rc::new(RefCell::new(copy_constructed(key.as_pointer().clone()))), Rc::new(RefCell::new({ let __v: Value = Rc::new(RefCell::new(::zero_init())); RefItemImpl::construct_2(&__v.as_pointer(), { (__tmp_10).clone() }, { @@ -615,7 +617,7 @@ fn main_0() -> i32 { (__tmp_11,) => { let (__it, __inserted) = Map::emplace(refs.as_pointer(), &key.as_pointer(), || { ( - Rc::new(RefCell::new(key.as_pointer().read())), + Rc::new(RefCell::new(copy_constructed(key.as_pointer().clone()))), Rc::new(RefCell::new({ let __v: Value = Rc::new(RefCell::new(::zero_init())); RefItemImpl::construct_2(&__v.as_pointer(), { (__tmp_11).clone() }, { @@ -679,7 +681,7 @@ fn main_0() -> i32 { let (__it, __inserted) = Map::emplace(items.as_pointer(), &key.as_pointer(), || { ( - Rc::new(RefCell::new(key.as_pointer().read())), + Rc::new(RefCell::new(copy_constructed(key.as_pointer().clone()))), Rc::new(RefCell::new({ let __v: Value = Rc::new(RefCell::new(::zero_init())); MoveConstructible::move_constructor(&__v.as_pointer(), { @@ -725,7 +727,7 @@ fn main_0() -> i32 { let (__it, __inserted) = Map::emplace(items.as_pointer(), &key.as_pointer(), || { ( - Rc::new(RefCell::new(key.as_pointer().read())), + Rc::new(RefCell::new(copy_constructed(key.as_pointer().clone()))), Rc::new(RefCell::new({ let __v: Value = Rc::new(RefCell::new(::zero_init())); MoveConstructible::move_constructor(&__v.as_pointer(), { diff --git a/tests/unit/out/refcount/map_try_emplace_lvalues.rs b/tests/unit/out/refcount/map_try_emplace_lvalues.rs index c99508a1ec..c82f611f89 100644 --- a/tests/unit/out/refcount/map_try_emplace_lvalues.rs +++ b/tests/unit/out/refcount/map_try_emplace_lvalues.rs @@ -217,7 +217,9 @@ thread_local!( &global_key_8.with(|v| v.as_pointer()), || { ( - Rc::new(RefCell::new(global_key_8.with(|v| v.as_pointer()).read())), + Rc::new(RefCell::new(copy_constructed( + global_key_8.with(|v| v.as_pointer()).clone(), + ))), Rc::new(RefCell::new((__tmp_0.read()))), ) }, @@ -259,9 +261,9 @@ thread_local!( &conditional_key_9.with(|v| v.as_pointer()), || { ( - Rc::new(RefCell::new( - conditional_key_9.with(|v| v.as_pointer()).read(), - )), + Rc::new(RefCell::new(copy_constructed( + conditional_key_9.with(|v| v.as_pointer()).clone(), + ))), Rc::new(RefCell::new((__tmp_3.read()))), ) }, @@ -299,7 +301,9 @@ thread_local!( &owned_key_10.with(|v| v.as_pointer()), || { ( - Rc::new(RefCell::new(owned_key_10.with(|v| v.as_pointer()).read())), + Rc::new(RefCell::new(copy_constructed( + owned_key_10.with(|v| v.as_pointer()).clone(), + ))), Rc::new(RefCell::new((__tmp_6.read()))), ) }, @@ -374,7 +378,7 @@ fn main_0() -> i32 { { let (__it, __inserted) = Map::emplace(m.as_pointer(), &key.as_pointer(), || { ( - Rc::new(RefCell::new(key.as_pointer().read())), + Rc::new(RefCell::new(copy_constructed(key.as_pointer().clone()))), Rc::new(RefCell::new({ let __v: Value = Rc::new(RefCell::new(::zero_init())); ItemImpl::construct_2(&__v.as_pointer(), { counter.as_pointer() }, { 3 }); @@ -402,7 +406,7 @@ fn main_0() -> i32 { (__tmp_8, __tmp_9) => { let (__it, __inserted) = Map::emplace((__tmp_8).clone(), &key.as_pointer(), || { ( - Rc::new(RefCell::new(key.as_pointer().read())), + Rc::new(RefCell::new(copy_constructed(key.as_pointer().clone()))), Rc::new(RefCell::new({ let __v: Value = Rc::new(RefCell::new(::zero_init())); ItemImpl::construct_2(&__v.as_pointer(), { (__tmp_9).clone() }, { 2 }); @@ -440,7 +444,7 @@ fn main_0() -> i32 { (__tmp_11,) => { let (__it, __inserted) = Map::emplace(m.as_pointer(), &key.as_pointer(), || { ( - Rc::new(RefCell::new(key.as_pointer().read())), + Rc::new(RefCell::new(copy_constructed(key.as_pointer().clone()))), Rc::new(RefCell::new({ let __v: Value = Rc::new(RefCell::new(::zero_init())); ItemImpl::construct_2(&__v.as_pointer(), { (__tmp_11).clone() }, { 2 }); @@ -475,7 +479,7 @@ fn main_0() -> i32 { (__tmp_13,) => { let (__it, __inserted) = Map::emplace(m.as_pointer(), &key.as_pointer(), || { ( - Rc::new(RefCell::new(key.as_pointer().read())), + Rc::new(RefCell::new(copy_constructed(key.as_pointer().clone()))), Rc::new(RefCell::new({ let __v: Value = Rc::new(RefCell::new(::zero_init())); ItemImpl::construct_2(&__v.as_pointer(), { (__tmp_13).clone() }, { 2 }); @@ -511,7 +515,7 @@ fn main_0() -> i32 { (__tmp_16,) => { let (__it, __inserted) = Map::emplace(m.as_pointer(), &key.as_pointer(), || { ( - Rc::new(RefCell::new(key.as_pointer().read())), + Rc::new(RefCell::new(copy_constructed(key.as_pointer().clone()))), Rc::new(RefCell::new({ let __v: Value = Rc::new(RefCell::new(::zero_init())); ItemImpl::construct_2(&__v.as_pointer(), { (__tmp_16).clone() }, { 2 }); @@ -556,7 +560,7 @@ fn main_0() -> i32 { (__tmp_19,) => { let (__it, __inserted) = Map::emplace(m.as_pointer(), &key.as_pointer(), || { ( - Rc::new(RefCell::new(key.as_pointer().read())), + Rc::new(RefCell::new(copy_constructed(key.as_pointer().clone()))), Rc::new(RefCell::new({ let __v: Value = Rc::new(RefCell::new(::zero_init())); ItemImpl::construct_2(&__v.as_pointer(), { (__tmp_19).clone() }, { 3 }); @@ -587,7 +591,7 @@ fn main_0() -> i32 { (__tmp_21,) => { let (__it, __inserted) = Map::emplace(m.as_pointer(), &key.as_pointer(), || { ( - Rc::new(RefCell::new(key.as_pointer().read())), + Rc::new(RefCell::new(copy_constructed(key.as_pointer().clone()))), Rc::new(RefCell::new({ let __v: Value = Rc::new(RefCell::new(::zero_init())); ItemImpl::construct_2(&__v.as_pointer(), { (__tmp_21).clone() }, { 3 }); @@ -618,7 +622,7 @@ fn main_0() -> i32 { (__tmp_24,) => { let (__it, __inserted) = Map::emplace(m.as_pointer(), &key.as_pointer(), || { ( - Rc::new(RefCell::new(key.as_pointer().read())), + Rc::new(RefCell::new(copy_constructed(key.as_pointer().clone()))), Rc::new(RefCell::new({ let __v: Value = Rc::new(RefCell::new(::zero_init())); ItemImpl::construct_2(&__v.as_pointer(), { (__tmp_24).clone() }, { 3 }); @@ -657,7 +661,7 @@ fn main_0() -> i32 { (__tmp_27,) => { let (__it, __inserted) = Map::emplace(m.as_pointer(), &key.as_pointer(), || { ( - Rc::new(RefCell::new(key.as_pointer().read())), + Rc::new(RefCell::new(copy_constructed(key.as_pointer().clone()))), Rc::new(RefCell::new({ let __v: Value = Rc::new(RefCell::new(::zero_init())); ItemImpl::construct_2(&__v.as_pointer(), { (__tmp_27).clone() }, { 3 }); @@ -698,7 +702,7 @@ fn main_0() -> i32 { (__tmp_30,) => { let (__it, __inserted) = Map::emplace(m.as_pointer(), &key.as_pointer(), || { ( - Rc::new(RefCell::new(key.as_pointer().read())), + Rc::new(RefCell::new(copy_constructed(key.as_pointer().clone()))), Rc::new(RefCell::new({ let __v: Value = Rc::new(RefCell::new(::zero_init())); ItemImpl::construct_2(&__v.as_pointer(), { (__tmp_30).clone() }, { 3 }); @@ -725,7 +729,7 @@ fn main_0() -> i32 { (__tmp_33,) => { let (__it, __inserted) = Map::emplace(m.as_pointer(), &key.as_pointer(), || { ( - Rc::new(RefCell::new(key.as_pointer().read())), + Rc::new(RefCell::new(copy_constructed(key.as_pointer().clone()))), Rc::new(RefCell::new({ let __v: Value = Rc::new(RefCell::new(::zero_init())); ItemImpl::construct_2(&__v.as_pointer(), { (__tmp_33).clone() }, { 3 }); @@ -757,7 +761,7 @@ fn main_0() -> i32 { let (__it, __inserted) = Map::emplace(unsigned_map.as_pointer(), &key.as_pointer(), || { ( - Rc::new(RefCell::new(key.as_pointer().read())), + Rc::new(RefCell::new(copy_constructed(key.as_pointer().clone()))), Rc::new(RefCell::new((__tmp_34.read()))), ) }); @@ -797,7 +801,7 @@ fn main_0() -> i32 { let (__it, __inserted) = Map::emplace(unsigned_map.as_pointer(), &key.as_pointer(), || { ( - Rc::new(RefCell::new(key.as_pointer().read())), + Rc::new(RefCell::new(copy_constructed(key.as_pointer().clone()))), Rc::new(RefCell::new(((__tmp_37.read()) as u32))), ) }); @@ -841,7 +845,7 @@ fn main_0() -> i32 { let (__it, __inserted) = Map::emplace(changed.as_pointer(), &key.as_pointer(), || { ( - Rc::new(RefCell::new(key.as_pointer().read())), + Rc::new(RefCell::new(copy_constructed(key.as_pointer().clone()))), Rc::new(RefCell::new((__tmp_40.read()))), ) }); @@ -884,7 +888,7 @@ fn main_0() -> i32 { let (__it, __inserted) = Map::emplace(changed.as_pointer(), &key.as_pointer(), || { ( - Rc::new(RefCell::new(key.as_pointer().read())), + Rc::new(RefCell::new(copy_constructed(key.as_pointer().clone()))), Rc::new(RefCell::new((__tmp_42.read()))), ) }); @@ -924,7 +928,7 @@ fn main_0() -> i32 { let (__it, __inserted) = Map::emplace(pointers.as_pointer(), &key.as_pointer(), || { ( - Rc::new(RefCell::new(key.as_pointer().read())), + Rc::new(RefCell::new(copy_constructed(key.as_pointer().clone()))), Rc::new(RefCell::new((__tmp_44.read()))), ) }); @@ -985,7 +989,9 @@ fn main_0() -> i32 { let (__it, __inserted) = Map::emplace(values.as_pointer(), &keys.decay().offset(0), || { ( - Rc::new(RefCell::new(keys.decay().offset(0).read())), + Rc::new(RefCell::new(copy_constructed( + keys.decay().offset(0).clone(), + ))), Rc::new(RefCell::new((__tmp_47.read()))), ) }); @@ -1012,7 +1018,9 @@ fn main_0() -> i32 { let (__it, __inserted) = Map::emplace(values.as_pointer(), &keys.decay().offset(1), || { ( - Rc::new(RefCell::new(keys.decay().offset(1).read())), + Rc::new(RefCell::new(copy_constructed( + keys.decay().offset(1).clone(), + ))), Rc::new(RefCell::new((__tmp_49.read()))), ) }); @@ -1039,7 +1047,9 @@ fn main_0() -> i32 { let (__it, __inserted) = Map::emplace(values.as_pointer(), &keys.decay().offset(2), || { ( - Rc::new(RefCell::new(keys.decay().offset(2).read())), + Rc::new(RefCell::new(copy_constructed( + keys.decay().offset(2).clone(), + ))), Rc::new(RefCell::new((__tmp_51.read()))), ) }); @@ -1066,7 +1076,9 @@ fn main_0() -> i32 { let (__it, __inserted) = Map::emplace(values.as_pointer(), &keys.decay().offset(3), || { ( - Rc::new(RefCell::new(keys.decay().offset(3).read())), + Rc::new(RefCell::new(copy_constructed( + keys.decay().offset(3).clone(), + ))), Rc::new(RefCell::new((__tmp_53.read()))), ) }); @@ -1092,7 +1104,9 @@ fn main_0() -> i32 { let (__it, __inserted) = Map::emplace(values.as_pointer(), &keys.decay().offset(4), || { ( - Rc::new(RefCell::new(keys.decay().offset(4).read())), + Rc::new(RefCell::new(copy_constructed( + keys.decay().offset(4).clone(), + ))), Rc::new(RefCell::new((__tmp_55.read()))), ) }); @@ -1118,7 +1132,9 @@ fn main_0() -> i32 { let (__it, __inserted) = Map::emplace(values.as_pointer(), &keys.decay().offset(5), || { ( - Rc::new(RefCell::new(keys.decay().offset(5).read())), + Rc::new(RefCell::new(copy_constructed( + keys.decay().offset(5).clone(), + ))), Rc::new(RefCell::new((__tmp_58.read()))), ) }); @@ -1226,9 +1242,9 @@ fn main_0() -> i32 { &keys.decay().offset(0), || { ( - Rc::new(RefCell::new( - keys.decay().offset(0).read(), - )), + Rc::new(RefCell::new(copy_constructed( + keys.decay().offset(0).clone(), + ))), Rc::new(RefCell::new({ let __v: Value = Rc::new( RefCell::new(::zero_init()), @@ -1279,9 +1295,9 @@ fn main_0() -> i32 { &keys.decay().offset(1), || { ( - Rc::new(RefCell::new( - keys.decay().offset(1).read(), - )), + Rc::new(RefCell::new(copy_constructed( + keys.decay().offset(1).clone(), + ))), Rc::new(RefCell::new({ let __v: Value = Rc::new( RefCell::new(::zero_init()), @@ -1332,9 +1348,9 @@ fn main_0() -> i32 { &keys.decay().offset(2), || { ( - Rc::new(RefCell::new( - keys.decay().offset(2).read(), - )), + Rc::new(RefCell::new(copy_constructed( + keys.decay().offset(2).clone(), + ))), Rc::new(RefCell::new({ let __v: Value = Rc::new( RefCell::new(::zero_init()), @@ -1479,7 +1495,9 @@ fn main_0() -> i32 { let (__it, __inserted) = Map::emplace(values.as_pointer(), &keys.decay().offset(0), || { ( - Rc::new(RefCell::new(keys.decay().offset(0).read())), + Rc::new(RefCell::new(copy_constructed( + keys.decay().offset(0).clone(), + ))), Rc::new(RefCell::new((__tmp_74.read()))), ) }); @@ -1506,7 +1524,9 @@ fn main_0() -> i32 { let (__it, __inserted) = Map::emplace(values.as_pointer(), &keys.decay().offset(1), || { ( - Rc::new(RefCell::new(keys.decay().offset(1).read())), + Rc::new(RefCell::new(copy_constructed( + keys.decay().offset(1).clone(), + ))), Rc::new(RefCell::new((__tmp_77.read()))), ) }); @@ -1534,7 +1554,9 @@ fn main_0() -> i32 { let (__it, __inserted) = Map::emplace(values.as_pointer(), &keys.decay().offset(2), || { ( - Rc::new(RefCell::new(keys.decay().offset(2).read())), + Rc::new(RefCell::new(copy_constructed( + keys.decay().offset(2).clone(), + ))), Rc::new(RefCell::new((__tmp_80.read()))), ) }); @@ -1591,7 +1613,9 @@ fn main_0() -> i32 { &key.as_pointer(), || { ( - Rc::new(RefCell::new(key.as_pointer().read())), + Rc::new(RefCell::new(copy_constructed( + key.as_pointer().clone(), + ))), Rc::new(RefCell::new({ let __v: Value = Rc::new(RefCell::new(::zero_init())); @@ -1640,9 +1664,9 @@ fn main_0() -> i32 { &key.as_pointer(), || { ( - Rc::new(RefCell::new( - key.as_pointer().read(), - )), + Rc::new(RefCell::new(copy_constructed( + key.as_pointer().clone(), + ))), Rc::new(RefCell::new({ let __v: Value = Rc::new( RefCell::new(::zero_init()), @@ -1696,7 +1720,9 @@ fn main_0() -> i32 { &key.as_pointer(), || { ( - Rc::new(RefCell::new(key.as_pointer().read())), + Rc::new(RefCell::new(copy_constructed( + key.as_pointer().clone(), + ))), Rc::new(RefCell::new({ let __v: Value = Rc::new(RefCell::new(::zero_init())); @@ -1746,9 +1772,9 @@ fn main_0() -> i32 { &key.as_pointer(), || { ( - Rc::new(RefCell::new( - key.as_pointer().read(), - )), + Rc::new(RefCell::new(copy_constructed( + key.as_pointer().clone(), + ))), Rc::new(RefCell::new({ let __v: Value = Rc::new( RefCell::new(::zero_init()), @@ -1835,7 +1861,9 @@ fn main_0() -> i32 { let (__it, __inserted) = Map::emplace(values.as_pointer(), &keys.decay().offset(0), || { ( - Rc::new(RefCell::new(keys.decay().offset(0).read())), + Rc::new(RefCell::new(copy_constructed( + keys.decay().offset(0).clone(), + ))), Rc::new(RefCell::new((__tmp_93.read()))), ) }); @@ -1872,7 +1900,9 @@ fn main_0() -> i32 { let (__it, __inserted) = Map::emplace(values.as_pointer(), &keys.decay().offset(1), || { ( - Rc::new(RefCell::new(keys.decay().offset(1).read())), + Rc::new(RefCell::new(copy_constructed( + keys.decay().offset(1).clone(), + ))), Rc::new(RefCell::new((__tmp_95.read()))), ) }); @@ -1907,7 +1937,9 @@ fn main_0() -> i32 { let (__it, __inserted) = Map::emplace(values.as_pointer(), &keys.decay().offset(2), || { ( - Rc::new(RefCell::new(keys.decay().offset(2).read())), + Rc::new(RefCell::new(copy_constructed( + keys.decay().offset(2).clone(), + ))), Rc::new(RefCell::new((__tmp_97.read()))), ) }); @@ -1941,7 +1973,9 @@ fn main_0() -> i32 { let (__it, __inserted) = Map::emplace(values.as_pointer(), &keys.decay().offset(3), || { ( - Rc::new(RefCell::new(keys.decay().offset(3).read())), + Rc::new(RefCell::new(copy_constructed( + keys.decay().offset(3).clone(), + ))), Rc::new(RefCell::new((__tmp_99.read()))), ) }); @@ -1975,7 +2009,9 @@ fn main_0() -> i32 { let (__it, __inserted) = Map::emplace(values.as_pointer(), &keys.decay().offset(4), || { ( - Rc::new(RefCell::new(keys.decay().offset(4).read())), + Rc::new(RefCell::new(copy_constructed( + keys.decay().offset(4).clone(), + ))), Rc::new(RefCell::new((__tmp_101.read()))), ) }); @@ -2012,7 +2048,9 @@ fn main_0() -> i32 { let (__it, __inserted) = Map::emplace(values.as_pointer(), &keys.decay().offset(5), || { ( - Rc::new(RefCell::new(keys.decay().offset(5).read())), + Rc::new(RefCell::new(copy_constructed( + keys.decay().offset(5).clone(), + ))), Rc::new(RefCell::new((__tmp_103.read()))), ) }); @@ -2064,7 +2102,9 @@ fn main_0() -> i32 { &key.as_pointer(), || { ( - Rc::new(RefCell::new(key.as_pointer().read())), + Rc::new(RefCell::new(copy_constructed( + key.as_pointer().clone(), + ))), Rc::new(RefCell::new({ let __v: Value = Rc::new(RefCell::new(::zero_init())); @@ -2128,9 +2168,9 @@ fn main_0() -> i32 { &key.as_pointer(), || { ( - Rc::new(RefCell::new( - key.as_pointer().read(), - )), + Rc::new(RefCell::new(copy_constructed( + key.as_pointer().clone(), + ))), Rc::new(RefCell::new({ let __v: Value = Rc::new( RefCell::new(::zero_init()), @@ -2196,9 +2236,9 @@ fn main_0() -> i32 { &key.as_pointer(), || { ( - Rc::new(RefCell::new( - key.as_pointer().read(), - )), + Rc::new(RefCell::new(copy_constructed( + key.as_pointer().clone(), + ))), Rc::new(RefCell::new({ let __v: Value = Rc::new( RefCell::new(::zero_init()), @@ -2268,7 +2308,7 @@ fn main_0() -> i32 { let (__it, __inserted) = Map::emplace(move_only.as_pointer(), &key.as_pointer(), || { ( - Rc::new(RefCell::new(key.as_pointer().read())), + Rc::new(RefCell::new(copy_constructed(key.as_pointer().clone()))), Rc::new(RefCell::new(( Rc::new(RefCell::new( __tmp_110 @@ -2306,7 +2346,7 @@ fn main_0() -> i32 { let (__it, __inserted) = Map::emplace(move_only.as_pointer(), &key.as_pointer(), || { ( - Rc::new(RefCell::new(key.as_pointer().read())), + Rc::new(RefCell::new(copy_constructed(key.as_pointer().clone()))), Rc::new(RefCell::new(( Rc::new(RefCell::new( __tmp_112 @@ -2357,7 +2397,7 @@ fn main_0() -> i32 { { let (__it, __inserted) = Map::emplace(strings.as_pointer(), &key.as_pointer(), || { ( - Rc::new(RefCell::new(key.as_pointer().read())), + Rc::new(RefCell::new(copy_constructed(key.as_pointer().clone()))), Rc::new(RefCell::new({ let mut __bytes = Ptr::::from_string_literal(b"original").to_c_bytes(); __bytes.push(0); @@ -2383,7 +2423,7 @@ fn main_0() -> i32 { let (__it, __inserted) = Map::emplace(strings.as_pointer(), &key.as_pointer(), || { ( - Rc::new(RefCell::new(key.as_pointer().read())), + Rc::new(RefCell::new(copy_constructed(key.as_pointer().clone()))), Rc::new(RefCell::new( __tmp_114.with_mut(|__v| std::mem::replace(__v, vec![0])), )), @@ -2418,7 +2458,7 @@ fn main_0() -> i32 { let (__it, __inserted) = Map::emplace(strings.as_pointer(), &key.as_pointer(), || { ( - Rc::new(RefCell::new(key.as_pointer().read())), + Rc::new(RefCell::new(copy_constructed(key.as_pointer().clone()))), Rc::new(RefCell::new( __tmp_115.with_mut(|__v| std::mem::replace(__v, vec![0])), )), diff --git a/tests/unit/out/refcount/vector.rs b/tests/unit/out/refcount/vector.rs index 9834d08a6d..34ad834b0d 100644 --- a/tests/unit/out/refcount/vector.rs +++ b/tests/unit/out/refcount/vector.rs @@ -152,7 +152,7 @@ fn main_0() -> i32 { let mut temp_vec: Vec = Vec::new(); let mut __it = (__tmp_6).clone(); while __it != __tmp_7 { - temp_vec.push(__it.iter_deref().read()); + temp_vec.push(copy_constructed(__it.iter_deref())); __it.iter_inc(); } v2.as_pointer().with_mut(|v: &mut Vec| { diff --git a/tests/unit/out/refcount/vector_iter_range_ctor.rs b/tests/unit/out/refcount/vector_iter_range_ctor.rs index 8154937ca1..c10ca75659 100644 --- a/tests/unit/out/refcount/vector_iter_range_ctor.rs +++ b/tests/unit/out/refcount/vector_iter_range_ctor.rs @@ -190,7 +190,7 @@ fn main_0() -> i32 { let mut temp_vec: Vec<(Value, Value)> = Vec::new(); let mut __it = (__tmp_11).clone(); while __it != __tmp_12 { - temp_vec.push(__it.iter_deref().read()); + temp_vec.push(copy_constructed(__it.iter_deref())); __it.iter_inc(); } v6.as_pointer() From 56800e98d665b1313baf28347c9ca3836324bd83 Mon Sep 17 00:00:00 2001 From: Lucian Popescu Date: Tue, 1 Dec 2026 15:43:45 +0000 Subject: [PATCH 5/7] Update tests --- tests/unit/out/refcount/copy_move_defaulted.rs | 13 ++++++++++++- tests/unit/out/refcount/map.rs | 17 +++++++++++++---- tests/unit/out/refcount/size_t_ssize_t.rs | 4 +++- tests/unit/out/refcount/vector.rs | 2 ++ .../unit/out/refcount/vector_iter_range_ctor.rs | 2 ++ tests/unit/out/unsafe/copy_move_defaulted.rs | 2 ++ tests/unit/out/unsafe/find.rs | 1 + tests/unit/out/unsafe/map.rs | 9 ++++++++- tests/unit/out/unsafe/operator_traits.rs | 5 +++++ tests/unit/out/unsafe/vector.rs | 2 ++ tests/unit/out/unsafe/vector_iter_range_ctor.rs | 2 ++ 11 files changed, 52 insertions(+), 7 deletions(-) diff --git a/tests/unit/out/refcount/copy_move_defaulted.rs b/tests/unit/out/refcount/copy_move_defaulted.rs index 164c191e2c..eddd885852 100644 --- a/tests/unit/out/refcount/copy_move_defaulted.rs +++ b/tests/unit/out/refcount/copy_move_defaulted.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -45,7 +46,17 @@ impl Default for Explicit { { ::zero_init() } } } -#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable)] +#[derive( + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, +)] #[byte_size(16)] pub struct Implicit { #[offset(0)] diff --git a/tests/unit/out/refcount/map.rs b/tests/unit/out/refcount/map.rs index 8e97472adc..f2b8b08f2d 100644 --- a/tests/unit/out/refcount/map.rs +++ b/tests/unit/out/refcount/map.rs @@ -16,7 +16,16 @@ pub fn inc_2(x: Ptr) { x.with_mut(|__v| __v.postfix_inc()); } #[derive( - Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, + Copy, + Clone, + Record, + ByteRepr, + ZeroInitialization, + VaArg, + FnPtrArg, + Destructible, + TriviallyCopyable, + Copyable, )] #[byte_size(8)] pub struct Point { @@ -678,7 +687,7 @@ fn main_0() -> i32 { )> = Rc::new(RefCell::new({ let (__it, __inserted) = Map::emplace(m3.as_pointer(), &key1.as_pointer(), || { ( - Rc::new(RefCell::new(key1.as_pointer().read())), + Rc::new(RefCell::new(copy_constructed(key1.as_pointer().clone()))), Rc::new(RefCell::new(9)), ) }); @@ -705,7 +714,7 @@ fn main_0() -> i32 { )> = Rc::new(RefCell::new({ let (__it, __inserted) = Map::emplace(m3.as_pointer(), &key8.as_pointer(), || { ( - Rc::new(RefCell::new(key8.as_pointer().read())), + Rc::new(RefCell::new(copy_constructed(key8.as_pointer().clone()))), Rc::new(RefCell::new(9)), ) }); @@ -732,7 +741,7 @@ fn main_0() -> i32 { )> = Rc::new(RefCell::new({ let (__it, __inserted) = Map::emplace(points.as_pointer(), &key1.as_pointer(), || { ( - Rc::new(RefCell::new(key1.as_pointer().read())), + Rc::new(RefCell::new(copy_constructed(key1.as_pointer().clone()))), Rc::new(RefCell::new({ let __v: Value = Rc::new(RefCell::new(::zero_init())); PointImpl::construct_2(&__v.as_pointer(), { 3 }, { 4 }); diff --git a/tests/unit/out/refcount/size_t_ssize_t.rs b/tests/unit/out/refcount/size_t_ssize_t.rs index 9bc0f4c4f8..c459be115d 100644 --- a/tests/unit/out/refcount/size_t_ssize_t.rs +++ b/tests/unit/out/refcount/size_t_ssize_t.rs @@ -48,7 +48,9 @@ pub fn size_t_in_rules_3() { assert!(({ ((*dst.borrow())[(2) as usize] == 3_usize) })); let ar: Value> = Rc::new(RefCell::new(Box::<[u64]>::from([1_u64, 2_u64, 3_u64]))); let ar2: Value> = Rc::new(RefCell::new( - (0..3).map(|__i| ar.decay().read_at(__i)).collect(), + (0..3) + .map(|__i| copy_constructed(ar.decay().offset(__i))) + .collect(), )); { for __i in 0..3 { diff --git a/tests/unit/out/refcount/vector.rs b/tests/unit/out/refcount/vector.rs index d0934c9fb4..16499c8067 100644 --- a/tests/unit/out/refcount/vector.rs +++ b/tests/unit/out/refcount/vector.rs @@ -15,6 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -58,6 +59,7 @@ pub struct Foo { FnPtrArg, CppFrom, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/refcount/vector_iter_range_ctor.rs b/tests/unit/out/refcount/vector_iter_range_ctor.rs index 9e5de040b9..0ca6cc0628 100644 --- a/tests/unit/out/refcount/vector_iter_range_ctor.rs +++ b/tests/unit/out/refcount/vector_iter_range_ctor.rs @@ -16,6 +16,7 @@ use std::rc::{Rc, Weak}; FnPtrArg, CppFrom, Destructible, + TriviallyCopyable, Copyable, Default, )] @@ -35,6 +36,7 @@ pub struct Degrees { FnPtrArg, CppFrom, Destructible, + TriviallyCopyable, Copyable, Default, )] diff --git a/tests/unit/out/unsafe/copy_move_defaulted.rs b/tests/unit/out/unsafe/copy_move_defaulted.rs index a711326cad..4de070a3f1 100644 --- a/tests/unit/out/unsafe/copy_move_defaulted.rs +++ b/tests/unit/out/unsafe/copy_move_defaulted.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -48,6 +49,7 @@ impl DestructibleUnsafe for Explicit { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/find.rs b/tests/unit/out/unsafe/find.rs index 679117177e..69f110d998 100644 --- a/tests/unit/out/unsafe/find.rs +++ b/tests/unit/out/unsafe/find.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/map.rs b/tests/unit/out/unsafe/map.rs index ddb014b6f1..163b9f144d 100644 --- a/tests/unit/out/unsafe/map.rs +++ b/tests/unit/out/unsafe/map.rs @@ -17,7 +17,14 @@ pub unsafe fn inc_2(x: *mut i32) { } #[repr(C)] #[derive( - Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, + Copy, + Clone, + VaArg, + FnPtrArg, + ZeroInitializationUnsafe, + DestructibleUnsafe, + TriviallyCopyableUnsafe, + CopyableUnsafe, )] pub struct Point { pub x: i32, diff --git a/tests/unit/out/unsafe/operator_traits.rs b/tests/unit/out/unsafe/operator_traits.rs index 7f491294a9..b9527773cc 100644 --- a/tests/unit/out/unsafe/operator_traits.rs +++ b/tests/unit/out/unsafe/operator_traits.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -60,6 +61,7 @@ impl std::cmp::Eq for Lt {} FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -85,6 +87,7 @@ impl std::cmp::Eq for Eq {} FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -123,6 +126,7 @@ impl std::cmp::Eq for Cmp {} FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -167,6 +171,7 @@ pub unsafe fn operator_eq_1(a: *const Free, b: *const Free) -> bool { FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/vector.rs b/tests/unit/out/unsafe/vector.rs index d0f6fe2388..d79ccce253 100644 --- a/tests/unit/out/unsafe/vector.rs +++ b/tests/unit/out/unsafe/vector.rs @@ -14,6 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -48,6 +49,7 @@ pub struct Foo { ZeroInitializationUnsafe, CppFromUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] diff --git a/tests/unit/out/unsafe/vector_iter_range_ctor.rs b/tests/unit/out/unsafe/vector_iter_range_ctor.rs index c82ac49185..03a79ab4d6 100644 --- a/tests/unit/out/unsafe/vector_iter_range_ctor.rs +++ b/tests/unit/out/unsafe/vector_iter_range_ctor.rs @@ -15,6 +15,7 @@ use std::rc::Rc; ZeroInitializationUnsafe, CppFromUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] @@ -36,6 +37,7 @@ impl Degrees { ZeroInitializationUnsafe, CppFromUnsafe, DestructibleUnsafe, + TriviallyCopyableUnsafe, CopyableUnsafe, Default, )] From 07ebe85cb8be4a19f0037c8de173a220b699e297 Mon Sep 17 00:00:00 2001 From: Lucian Popescu Date: Tue, 1 Dec 2026 15:47:23 +0000 Subject: [PATCH 6/7] Update rules --- cpp2rust/converter/converter.cpp | 28 ++- cpp2rust/converter/converter.h | 2 + .../converter/models/converter_refcount.cpp | 9 +- libcc2rs-macros/src/constructor.rs | 24 ++ libcc2rs/src/field.rs | 17 +- rules/dirent/shim.rs | 8 +- rules/ifaddrs/shim.rs | 8 +- rules/ip/shim.rs | 10 +- rules/netdb/shim.rs | 8 +- rules/poll/shim.rs | 6 +- rules/pwd/shim.rs | 6 +- rules/select/shim.rs | 4 +- rules/socket/shim.rs | 25 +- rules/stat/shim.rs | 4 +- rules/termios/shim.rs | 10 +- rules/time/shim.rs | 14 +- .../out/refcount/cross_tu_tag_collision.rs | 12 +- .../out/unsafe/cross_tu_tag_collision.rs | 10 +- .../out/refcount/friend_operator.rs | 12 +- .../out/unsafe/friend_operator.rs | 10 +- .../out/refcount/opaque_forward_decl.rs | 11 +- .../out/unsafe/opaque_forward_decl.rs | 10 +- .../refcount/out_of_line_methods_cross_tu.rs | 12 +- .../unsafe/out_of_line_methods_cross_tu.rs | 10 +- .../template_method_late_instantiation.rs | 13 +- .../template_method_late_instantiation.rs | 11 +- .../out/refcount/p14-class-in-two-files.rs | 12 +- .../out/unsafe/p14-class-in-two-files.rs | 10 +- .../p15-class-template-static-member.rs | 24 +- .../p15-class-template-static-member.rs | 20 +- .../out/refcount/p15-function-template.rs | 24 +- .../out/unsafe/p15-function-template.rs | 20 +- .../p16-default-argument-lambda-in-class.rs | 12 +- .../p16-default-argument-lambda-in-class.rs | 10 +- .../basic.link/out/refcount/basic.link.rs | 109 +-------- .../basic/basic.link/out/unsafe/basic.link.rs | 107 +-------- .../out/refcount/basic.scope.class.rs | 26 +-- .../out/refcount/basic.scope.param.rs | 2 - .../out/refcount/basic.scope.pdecl.rs | 23 +- .../out/refcount/basic.scope.scope.rs | 158 ++----------- .../out/unsafe/basic.scope.class.rs | 22 +- .../out/unsafe/basic.scope.param.rs | 2 - .../out/unsafe/basic.scope.pdecl.rs | 21 +- .../out/unsafe/basic.scope.scope.rs | 156 ++----------- .../out/refcount/basic.start.term.rs | 24 +- .../out/unsafe/basic.start.term.rs | 20 +- .../out/refcount/basic.types.general.rs | 24 +- .../out/unsafe/basic.types.general.rs | 20 +- .../out/refcount/class.base.init.rs | 2 - .../class.init/out/unsafe/class.base.init.rs | 2 - .../out/refcount/class.conv.ctor.rs | 2 - .../class.conv/out/refcount/class.conv.fct.rs | 2 - .../class.conv/out/unsafe/class.conv.ctor.rs | 2 - .../class.conv/out/unsafe/class.conv.fct.rs | 2 - .../class.mem/out/refcount/class.free.rs | 24 +- .../out/refcount/class.mem.general.rs | 26 +-- .../class/class.mem/out/unsafe/class.free.rs | 20 +- .../class.mem/out/unsafe/class.mem.general.rs | 22 +- .../dcl.init.general-p6.2-padding-bits.rs | 36 +-- .../dcl.init/out/refcount/dcl.init.general.rs | 102 +------- .../dcl.init.general-p6.2-padding-bits.rs | 30 +-- .../dcl.init/out/unsafe/dcl.init.general.rs | 94 +------- .../dcl.meaning/out/refcount/dcl.array.rs | 12 +- .../out/refcount/dcl.fct.default.rs | 50 +--- .../dcl.meaning/out/refcount/dcl.mptr.rs | 61 +---- .../dcl.meaning/out/unsafe/dcl.array.rs | 10 +- .../dcl.meaning/out/unsafe/dcl.fct.default.rs | 42 +--- .../dcl.meaning/out/unsafe/dcl.mptr.rs | 51 +--- tests/std/expr/conv/out/refcount/conv.mem.rs | 12 +- tests/std/expr/conv/out/unsafe/conv.mem.rs | 10 +- .../expr.post/out/refcount/expr.const.cast.rs | 12 +- ...nterpret.cast-p10-result-is-unspecified.rs | 24 +- .../out/refcount/expr.reinterpret.cast.rs | 48 +--- .../expr.post/out/unsafe/expr.const.cast.rs | 10 +- ...nterpret.cast-p10-result-is-unspecified.rs | 20 +- .../out/unsafe/expr.reinterpret.cast.rs | 40 +--- .../expr.unary/out/refcount/expr.pre.incr.rs | 12 +- .../expr.unary/out/refcount/expr.unary.op.rs | 36 +-- .../expr.unary/out/unsafe/expr.pre.incr.rs | 10 +- .../expr.unary/out/unsafe/expr.unary.op.rs | 30 +-- .../expr.compound/out/refcount/expr.cond.rs | 12 +- .../expr.compound/out/refcount/expr.eq.rs | 40 +--- ...ptr.oper-p6-null-pointer-to-data-member.rs | 12 +- .../out/refcount/expr.mptr.oper.rs | 36 +-- .../expr.compound/out/unsafe/expr.cond.rs | 10 +- .../expr/expr.compound/out/unsafe/expr.eq.rs | 41 +--- ...ptr.oper-p6-null-pointer-to-data-member.rs | 10 +- .../out/unsafe/expr.mptr.oper.rs | 30 +-- .../expr.prim/out/refcount/expr.prim.this.rs | 13 +- .../expr.prim/out/unsafe/expr.prim.this.rs | 12 +- .../allocator.requirements.general.rs | 37 +-- .../unsafe/allocator.requirements.general.rs | 31 +-- tests/std/temp/out/refcount/temp.type.rs | 48 +--- tests/std/temp/out/unsafe/temp.type.rs | 40 +--- .../temp/temp.spec/out/refcount/temp.inst.rs | 13 +- .../temp/temp.spec/out/unsafe/temp.inst.rs | 11 +- .../utilities/utility/out/refcount/forward.rs | 12 +- .../utility/out/refcount/utility.as.const.rs | 12 +- .../utilities/utility/out/unsafe/forward.rs | 10 +- .../utility/out/unsafe/utility.as.const.rs | 10 +- tests/ub/out/refcount/ctor_ref_member.rs | 2 - .../refcount/self_referencing_initializer.rs | 12 +- tests/ub/out/refcount/ub6.rs | 11 +- tests/ub/out/unsafe/ctor_ref_member.rs | 2 - .../unsafe/self_referencing_initializer.rs | 10 +- tests/ub/out/unsafe/ub6.rs | 10 +- tests/unit/out/refcount/05_new.rs | 24 +- tests/unit/out/refcount/10_struct.rs | 57 +---- tests/unit/out/refcount/addr_of_global.rs | 23 +- tests/unit/out/refcount/anonymous-struct.rs | 108 +-------- tests/unit/out/refcount/anonymous-struct_c.rs | 108 +-------- tests/unit/out/refcount/anonymous_enum.rs | 24 +- tests/unit/out/refcount/anonymous_enum_c.rs | 24 +- tests/unit/out/refcount/any.rs | 12 +- tests/unit/out/refcount/array_const_init.rs | 24 +- tests/unit/out/refcount/array_field_addr.rs | 12 +- tests/unit/out/refcount/array_reference.rs | 12 +- tests/unit/out/refcount/as_const.rs | 12 +- tests/unit/out/refcount/assign_rhs_first.rs | 11 +- .../out/refcount/assignment_single_eval.rs | 219 ++---------------- tests/unit/out/refcount/bounded_struct_ptr.rs | 12 +- tests/unit/out/refcount/bst.rs | 11 +- tests/unit/out/refcount/c_struct.rs | 59 +---- tests/unit/out/refcount/cast.rs | 36 +-- .../refcount/cast_array_to_pointer_decay.rs | 12 +- tests/unit/out/refcount/class.rs | 48 +--- .../refcount/class_template_lazy_member.rs | 60 +---- tests/unit/out/refcount/class_templates.rs | 108 +-------- tests/unit/out/refcount/clone_vs_move.rs | 35 +-- tests/unit/out/refcount/comma_operator.rs | 12 +- tests/unit/out/refcount/complex_function.rs | 45 +--- .../out/refcount/compound_assign_paren.rs | 12 +- tests/unit/out/refcount/concepts.rs | 12 +- tests/unit/out/refcount/constexpr_function.rs | 24 +- tests/unit/out/refcount/constructor.rs | 12 +- .../conversion_operator_same_translation.rs | 4 - .../unit/out/refcount/copy_move_defaulted.rs | 24 +- tests/unit/out/refcount/default.rs | 36 +-- .../refcount/default_function_arguments.rs | 24 +- tests/unit/out/refcount/default_in_statics.rs | 34 +-- tests/unit/out/refcount/destructor_params.rs | 12 +- tests/unit/out/refcount/doubly_linked_list.rs | 11 +- .../out/refcount/enum_default_in_static.rs | 12 +- tests/unit/out/refcount/enum_int_interop.rs | 11 +- tests/unit/out/refcount/enum_int_interop_c.rs | 11 +- .../unit/out/refcount/enum_underlying_type.rs | 13 +- tests/unit/out/refcount/exprs.rs | 23 +- tests/unit/out/refcount/fft.rs | 12 +- tests/unit/out/refcount/field_aliasing.rs | 35 +-- .../unit/out/refcount/field_array_elem_ptr.rs | 24 +- .../out/refcount/field_method_receiver.rs | 12 +- tests/unit/out/refcount/field_pointers.rs | 24 +- .../field_pointers_malloced_struct.rs | 12 +- .../field_reinterpret_write_through.rs | 24 +- tests/unit/out/refcount/find.rs | 12 +- .../refcount/first_field_ptr_covers_struct.rs | 24 +- .../out/refcount/first_member_downcast.rs | 24 +- .../refcount/flex_array_member_incomplete.rs | 12 +- .../flex_array_member_sibling_write.rs | 36 +-- tests/unit/out/refcount/fn_ptr.rs | 2 - tests/unit/out/refcount/fn_ptr_cast.rs | 11 +- tests/unit/out/refcount/fn_ptr_stable_sort.rs | 12 +- tests/unit/out/refcount/fn_ptr_struct.rs | 23 +- .../unit/out/refcount/fn_ptr_typedef_cast.rs | 12 +- tests/unit/out/refcount/fn_ptr_vtable.rs | 11 +- tests/unit/out/refcount/fn_ref.rs | 11 +- tests/unit/out/refcount/friend.rs | 48 +--- .../unit/out/refcount/function_overloading.rs | 12 +- .../out/refcount/global_call_temporaries.rs | 12 +- .../out/refcount/global_init_side_effect.rs | 2 - .../out/refcount/global_non_const_init.rs | 38 +-- tests/unit/out/refcount/global_pointers.rs | 11 +- .../refcount/global_without_initializer.rs | 12 +- .../out/refcount/goto_aggregate_default.rs | 12 +- tests/unit/out/refcount/goto_cleanup.rs | 11 +- tests/unit/out/refcount/huffman.rs | 11 +- .../refcount/immutable-deref-on-func-call.rs | 12 +- .../refcount/in_class_field_initializer.rs | 39 +--- tests/unit/out/refcount/init.rs | 12 +- tests/unit/out/refcount/init_list.rs | 38 +-- tests/unit/out/refcount/kruskal.rs | 12 +- tests/unit/out/refcount/lambda_as_field.rs | 23 +- tests/unit/out/refcount/lambda_capture_ref.rs | 12 +- .../out/refcount/lambda_capture_star_this.rs | 12 +- .../unit/out/refcount/lambda_capture_this.rs | 12 +- .../unit/out/refcount/lambda_capture_value.rs | 12 +- .../unit/out/refcount/lambda_decltype_type.rs | 24 +- .../refcount/lambda_generic_explicit_args.rs | 12 +- .../out/refcount/lambda_immediate_init.rs | 13 +- tests/unit/out/refcount/lambda_nested.rs | 12 +- .../unit/out/refcount/lambda_static_local.rs | 12 +- .../refcount/libc_struct_without_default.rs | 12 +- tests/unit/out/refcount/linked_list.rs | 11 +- .../refcount/local_anon_struct_collision.rs | 24 +- .../out/refcount/local_record_template.rs | 48 +--- tests/unit/out/refcount/map.rs | 13 +- tests/unit/out/refcount/map_key_identity.rs | 25 +- tests/unit/out/refcount/map_try_emplace.rs | 13 +- .../out/refcount/map_try_emplace_lvalues.rs | 47 +--- .../unit/out/refcount/memcpy_struct_bytes.rs | 12 +- .../out/refcount/memcpy_struct_layouts.rs | 60 +---- .../unit/out/refcount/memcpy_struct_struct.rs | 12 +- tests/unit/out/refcount/memset_struct_tail.rs | 12 +- tests/unit/out/refcount/nested_structs.rs | 72 +----- tests/unit/out/refcount/new.rs | 12 +- tests/unit/out/refcount/new_bst.rs | 11 +- tests/unit/out/refcount/new_struct.rs | 24 +- .../refcount/nttp_distinct_specializations.rs | 36 +-- tests/unit/out/refcount/offsetof.rs | 24 +- .../unit/out/refcount/opaque_forward_decl.rs | 11 +- tests/unit/out/refcount/opaque_record_copy.rs | 24 +- .../unit/out/refcount/opaque_then_defined.rs | 22 +- .../out/refcount/operator_arithmetic_free.rs | 12 +- .../refcount/operator_arithmetic_member.rs | 12 +- .../out/refcount/operator_bitwise_free.rs | 12 +- .../out/refcount/operator_bitwise_member.rs | 12 +- .../refcount/operator_comparison_defaulted.rs | 95 +------- .../out/refcount/operator_comparison_free.rs | 24 +- .../refcount/operator_comparison_member.rs | 12 +- .../out/refcount/operator_comparison_mixed.rs | 12 +- .../refcount/operator_comparison_nonbool.rs | 74 +----- .../operator_compound_assignment_free.rs | 12 +- .../operator_compound_assignment_member.rs | 12 +- tests/unit/out/refcount/operator_friend.rs | 84 +------ tests/unit/out/refcount/operator_less_than.rs | 12 +- .../out/refcount/operator_logical_free.rs | 12 +- .../out/refcount/operator_logical_member.rs | 12 +- .../refcount/operator_member_pointer_free.rs | 24 +- .../operator_member_pointer_member.rs | 36 +-- .../unit/out/refcount/operator_other_free.rs | 12 +- .../out/refcount/operator_other_member.rs | 14 +- tests/unit/out/refcount/operator_overloads.rs | 12 +- .../unit/out/refcount/operator_qualifiers.rs | 12 +- tests/unit/out/refcount/operator_three_way.rs | 12 +- tests/unit/out/refcount/operator_traits.rs | 60 +---- tests/unit/out/refcount/overload_mangling.rs | 36 +-- .../refcount/pair_converting_construction.rs | 40 +--- tests/unit/out/refcount/pod.rs | 12 +- tests/unit/out/refcount/pointer_array.rs | 12 +- tests/unit/out/refcount/pointers.rs | 12 +- tests/unit/out/refcount/ptr_cast_init.rs | 24 +- tests/unit/out/refcount/push_emplace_back.rs | 59 +---- tests/unit/out/refcount/random.rs | 24 +- tests/unit/out/refcount/reference_wrapper.rs | 12 +- tests/unit/out/refcount/references.rs | 23 +- tests/unit/out/refcount/refs_as_args.rs | 12 +- .../out/refcount/reinterpret_cast_ptr_cmp.rs | 36 +-- .../out/refcount/reinterpret_cast_struct.rs | 12 +- .../reinterpret_cast_struct_to_struct.rs | 24 +- tests/unit/out/refcount/reserved_keywords.rs | 36 +-- tests/unit/out/refcount/return_move.rs | 22 +- tests/unit/out/refcount/rvalue_struct.rs | 12 +- .../scalar_builtin_construct_destruct.rs | 12 +- .../refcount/self_referencing_initializer.rs | 34 +-- .../unit/out/refcount/size_t_static_member.rs | 24 +- .../out/refcount/size_t_template_param.rs | 4 - tests/unit/out/refcount/static_local.rs | 12 +- .../unit/out/refcount/static_var_in_class.rs | 24 +- tests/unit/out/refcount/stdcopy.rs | 2 - tests/unit/out/refcount/strdup.rs | 11 +- .../out/refcount/string_literal_ptr_init.rs | 11 +- tests/unit/out/refcount/string_substr.rs | 11 +- .../out/refcount/struct_2d_array_field.rs | 12 +- tests/unit/out/refcount/struct_ctor.rs | 27 +-- .../unit/out/refcount/struct_default_ctor.rs | 50 +--- .../refcount/struct_member_array_adjacency.rs | 12 +- tests/unit/out/refcount/struct_ptr.rs | 12 +- .../refcount/structured_binding_range_for.rs | 12 +- .../out/refcount/structured_binding_ref.rs | 12 +- .../refcount/structured_binding_trivial.rs | 12 +- .../refcount/tag_vs_identifier_collision.rs | 68 +----- .../unit/out/refcount/template_default_arg.rs | 29 +-- .../out/refcount/template_static_member.rs | 60 +---- .../out/refcount/temporary_field_ctor_arg.rs | 2 - tests/unit/out/refcount/this.rs | 4 - .../unit/out/refcount/typedef-anon-struct.rs | 12 +- .../out/refcount/unary_expr_or_type_trait.rs | 12 +- tests/unit/out/refcount/unboxed_locals.rs | 12 +- tests/unit/out/refcount/unboxed_records.rs | 37 +-- .../out/refcount/union_addrof_external.rs | 27 +-- tests/unit/out/refcount/union_basic.rs | 16 +- .../unit/out/refcount/union_cross_arm_cast.rs | 39 +--- .../out/refcount/union_field_alignment.rs | 15 +- .../out/refcount/union_flex_array_member.rs | 15 +- .../unit/out/refcount/union_memset_memcpy.rs | 39 +--- tests/unit/out/refcount/union_nested.rs | 42 +--- .../out/refcount/union_pointer_pun_address.rs | 27 +-- .../union_pointer_pun_writethrough.rs | 4 +- .../out/refcount/union_struct_dual_use.rs | 27 +-- .../out/refcount/union_tagged_many_arms.rs | 15 +- .../unit/out/refcount/union_tagged_simple.rs | 15 +- .../out/refcount/union_tagged_struct_arms.rs | 50 +--- .../refcount/union_void_ptr_sized_deref.rs | 15 +- tests/unit/out/refcount/unique_ptr.rs | 12 +- .../out/refcount/unique_ptr_field_reset.rs | 12 +- tests/unit/out/refcount/unique_ptr_nested.rs | 12 +- tests/unit/out/refcount/unique_ptr_struct.rs | 12 +- tests/unit/out/refcount/va_arg_mixed_types.rs | 12 +- .../out/refcount/va_arg_non_primitive_ptrs.rs | 11 +- tests/unit/out/refcount/va_arg_struct_ctx.rs | 16 +- tests/unit/out/refcount/va_arg_void_ptr.rs | 11 +- tests/unit/out/refcount/va_list_field.rs | 11 +- tests/unit/out/refcount/vector.rs | 14 +- .../out/refcount/vector_iter_range_ctor.rs | 4 - .../out/refcount/vector_subscript_direct.rs | 12 +- .../out/refcount/vector_with_allocator.rs | 24 +- tests/unit/out/refcount/void_cast.rs | 12 +- tests/unit/out/unsafe/05_new.rs | 20 +- tests/unit/out/unsafe/10_struct.rs | 51 +--- tests/unit/out/unsafe/addr_of_global.rs | 20 +- tests/unit/out/unsafe/anonymous-struct.rs | 90 +------ tests/unit/out/unsafe/anonymous-struct_c.rs | 90 +------ tests/unit/out/unsafe/anonymous_enum.rs | 20 +- tests/unit/out/unsafe/anonymous_enum_c.rs | 20 +- tests/unit/out/unsafe/any.rs | 10 +- tests/unit/out/unsafe/array_const_init.rs | 20 +- tests/unit/out/unsafe/array_field_addr.rs | 10 +- tests/unit/out/unsafe/array_reference.rs | 10 +- tests/unit/out/unsafe/as_const.rs | 10 +- tests/unit/out/unsafe/assign_rhs_first.rs | 10 +- .../unit/out/unsafe/assignment_single_eval.rs | 190 ++------------- tests/unit/out/unsafe/bounded_struct_ptr.rs | 10 +- tests/unit/out/unsafe/bst.rs | 10 +- tests/unit/out/unsafe/c_struct.rs | 50 +--- tests/unit/out/unsafe/cast.rs | 30 +-- .../out/unsafe/cast_array_to_pointer_decay.rs | 10 +- tests/unit/out/unsafe/class.rs | 40 +--- .../out/unsafe/class_template_lazy_member.rs | 50 +--- tests/unit/out/unsafe/class_templates.rs | 90 +------ tests/unit/out/unsafe/clone_vs_move.rs | 30 +-- tests/unit/out/unsafe/comma_operator.rs | 10 +- tests/unit/out/unsafe/complex_function.rs | 40 +--- .../unit/out/unsafe/compound_assign_paren.rs | 10 +- tests/unit/out/unsafe/concepts.rs | 10 +- tests/unit/out/unsafe/constexpr_function.rs | 20 +- tests/unit/out/unsafe/constructor.rs | 10 +- .../conversion_operator_same_translation.rs | 4 - tests/unit/out/unsafe/copy_move_defaulted.rs | 20 +- tests/unit/out/unsafe/default.rs | 31 +-- .../out/unsafe/default_function_arguments.rs | 20 +- tests/unit/out/unsafe/default_in_statics.rs | 30 +-- tests/unit/out/unsafe/destructor_params.rs | 10 +- tests/unit/out/unsafe/doubly_linked_list.rs | 10 +- .../unit/out/unsafe/enum_default_in_static.rs | 10 +- tests/unit/out/unsafe/enum_int_interop.rs | 10 +- tests/unit/out/unsafe/enum_int_interop_c.rs | 10 +- tests/unit/out/unsafe/enum_underlying_type.rs | 11 +- tests/unit/out/unsafe/exprs.rs | 20 +- tests/unit/out/unsafe/fft.rs | 10 +- tests/unit/out/unsafe/field_aliasing.rs | 30 +-- tests/unit/out/unsafe/field_array_elem_ptr.rs | 20 +- .../unit/out/unsafe/field_method_receiver.rs | 10 +- tests/unit/out/unsafe/field_pointers.rs | 20 +- .../unsafe/field_pointers_malloced_struct.rs | 10 +- .../unsafe/field_reinterpret_write_through.rs | 20 +- tests/unit/out/unsafe/find.rs | 10 +- .../unsafe/first_field_ptr_covers_struct.rs | 20 +- .../unit/out/unsafe/first_member_downcast.rs | 20 +- .../unsafe/flex_array_member_incomplete.rs | 11 +- .../unsafe/flex_array_member_sibling_write.rs | 30 +-- tests/unit/out/unsafe/fn_ptr.rs | 2 - tests/unit/out/unsafe/fn_ptr_cast.rs | 10 +- tests/unit/out/unsafe/fn_ptr_stable_sort.rs | 10 +- tests/unit/out/unsafe/fn_ptr_struct.rs | 20 +- tests/unit/out/unsafe/fn_ptr_typedef_cast.rs | 10 +- tests/unit/out/unsafe/fn_ptr_vtable.rs | 10 +- tests/unit/out/unsafe/fn_ref.rs | 10 +- tests/unit/out/unsafe/friend.rs | 40 +--- tests/unit/out/unsafe/function_overloading.rs | 10 +- .../out/unsafe/global_call_temporaries.rs | 10 +- .../out/unsafe/global_init_side_effect.rs | 2 - .../unit/out/unsafe/global_non_const_init.rs | 32 +-- tests/unit/out/unsafe/global_pointers.rs | 10 +- .../out/unsafe/global_without_initializer.rs | 10 +- .../unit/out/unsafe/goto_aggregate_default.rs | 10 +- tests/unit/out/unsafe/goto_cleanup.rs | 10 +- tests/unit/out/unsafe/huffman.rs | 10 +- .../unsafe/immutable-deref-on-func-call.rs | 10 +- .../out/unsafe/in_class_field_initializer.rs | 33 +-- tests/unit/out/unsafe/init.rs | 10 +- tests/unit/out/unsafe/init_list.rs | 32 +-- tests/unit/out/unsafe/kruskal.rs | 10 +- tests/unit/out/unsafe/lambda_as_field.rs | 21 +- tests/unit/out/unsafe/lambda_capture_ref.rs | 10 +- .../out/unsafe/lambda_capture_star_this.rs | 10 +- tests/unit/out/unsafe/lambda_capture_this.rs | 10 +- tests/unit/out/unsafe/lambda_capture_value.rs | 10 +- tests/unit/out/unsafe/lambda_decltype_type.rs | 20 +- .../unsafe/lambda_generic_explicit_args.rs | 10 +- .../unit/out/unsafe/lambda_immediate_init.rs | 11 +- tests/unit/out/unsafe/lambda_nested.rs | 10 +- tests/unit/out/unsafe/lambda_static_local.rs | 10 +- .../out/unsafe/libc_struct_without_default.rs | 11 +- tests/unit/out/unsafe/linked_list.rs | 10 +- .../out/unsafe/local_anon_struct_collision.rs | 20 +- .../unit/out/unsafe/local_record_template.rs | 40 +--- tests/unit/out/unsafe/map.rs | 11 +- tests/unit/out/unsafe/map_key_identity.rs | 21 +- tests/unit/out/unsafe/map_try_emplace.rs | 11 +- .../out/unsafe/map_try_emplace_lvalues.rs | 42 +--- tests/unit/out/unsafe/memcpy_struct_bytes.rs | 10 +- .../unit/out/unsafe/memcpy_struct_layouts.rs | 50 +--- tests/unit/out/unsafe/memcpy_struct_struct.rs | 10 +- tests/unit/out/unsafe/memset_struct_tail.rs | 10 +- tests/unit/out/unsafe/nested_structs.rs | 60 +---- tests/unit/out/unsafe/new.rs | 10 +- tests/unit/out/unsafe/new_bst.rs | 10 +- tests/unit/out/unsafe/new_struct.rs | 20 +- .../unsafe/nttp_distinct_specializations.rs | 30 +-- tests/unit/out/unsafe/offsetof.rs | 21 +- tests/unit/out/unsafe/opaque_forward_decl.rs | 10 +- tests/unit/out/unsafe/opaque_record_copy.rs | 20 +- tests/unit/out/unsafe/opaque_then_defined.rs | 20 +- .../out/unsafe/operator_arithmetic_free.rs | 10 +- .../out/unsafe/operator_arithmetic_member.rs | 10 +- .../unit/out/unsafe/operator_bitwise_free.rs | 10 +- .../out/unsafe/operator_bitwise_member.rs | 10 +- .../unsafe/operator_comparison_defaulted.rs | 80 +------ .../out/unsafe/operator_comparison_free.rs | 20 +- .../out/unsafe/operator_comparison_member.rs | 10 +- .../out/unsafe/operator_comparison_mixed.rs | 10 +- .../out/unsafe/operator_comparison_nonbool.rs | 62 +---- .../operator_compound_assignment_free.rs | 10 +- .../operator_compound_assignment_member.rs | 10 +- tests/unit/out/unsafe/operator_friend.rs | 70 +----- tests/unit/out/unsafe/operator_less_than.rs | 10 +- .../unit/out/unsafe/operator_logical_free.rs | 10 +- .../out/unsafe/operator_logical_member.rs | 10 +- .../unsafe/operator_member_pointer_free.rs | 20 +- .../unsafe/operator_member_pointer_member.rs | 30 +-- tests/unit/out/unsafe/operator_other_free.rs | 10 +- .../unit/out/unsafe/operator_other_member.rs | 12 +- tests/unit/out/unsafe/operator_overloads.rs | 10 +- tests/unit/out/unsafe/operator_qualifiers.rs | 10 +- tests/unit/out/unsafe/operator_three_way.rs | 10 +- tests/unit/out/unsafe/operator_traits.rs | 50 +--- tests/unit/out/unsafe/overload_mangling.rs | 30 +-- .../unsafe/pair_converting_construction.rs | 36 +-- tests/unit/out/unsafe/pod.rs | 10 +- tests/unit/out/unsafe/pointer_array.rs | 10 +- tests/unit/out/unsafe/pointers.rs | 10 +- tests/unit/out/unsafe/ptr_cast_init.rs | 20 +- tests/unit/out/unsafe/push_emplace_back.rs | 50 +--- tests/unit/out/unsafe/random.rs | 20 +- tests/unit/out/unsafe/reference_wrapper.rs | 10 +- tests/unit/out/unsafe/references.rs | 20 +- tests/unit/out/unsafe/refs_as_args.rs | 10 +- .../out/unsafe/reinterpret_cast_ptr_cmp.rs | 30 +-- .../out/unsafe/reinterpret_cast_struct.rs | 10 +- .../reinterpret_cast_struct_to_struct.rs | 20 +- tests/unit/out/unsafe/reserved_keywords.rs | 30 +-- tests/unit/out/unsafe/return_move.rs | 20 +- tests/unit/out/unsafe/rvalue_struct.rs | 10 +- .../scalar_builtin_construct_destruct.rs | 10 +- .../unsafe/self_referencing_initializer.rs | 31 +-- tests/unit/out/unsafe/size_t_static_member.rs | 20 +- .../unit/out/unsafe/size_t_template_param.rs | 4 - tests/unit/out/unsafe/static_local.rs | 10 +- tests/unit/out/unsafe/static_var_in_class.rs | 20 +- tests/unit/out/unsafe/stdcopy.rs | 2 - tests/unit/out/unsafe/strdup.rs | 10 +- .../out/unsafe/string_literal_ptr_init.rs | 10 +- tests/unit/out/unsafe/string_substr.rs | 10 +- .../unit/out/unsafe/struct_2d_array_field.rs | 10 +- tests/unit/out/unsafe/struct_ctor.rs | 23 +- tests/unit/out/unsafe/struct_default_ctor.rs | 42 +--- .../unsafe/struct_member_array_adjacency.rs | 10 +- tests/unit/out/unsafe/struct_ptr.rs | 10 +- .../unsafe/structured_binding_range_for.rs | 10 +- .../unit/out/unsafe/structured_binding_ref.rs | 10 +- .../out/unsafe/structured_binding_trivial.rs | 10 +- .../out/unsafe/tag_vs_identifier_collision.rs | 72 +----- tests/unit/out/unsafe/template_default_arg.rs | 25 +- .../unit/out/unsafe/template_static_member.rs | 50 +--- .../out/unsafe/temporary_field_ctor_arg.rs | 2 - tests/unit/out/unsafe/this.rs | 4 - tests/unit/out/unsafe/typedef-anon-struct.rs | 10 +- .../out/unsafe/unary_expr_or_type_trait.rs | 10 +- tests/unit/out/unsafe/unboxed_locals.rs | 10 +- tests/unit/out/unsafe/unboxed_records.rs | 31 +-- .../unit/out/unsafe/union_addrof_external.rs | 31 +-- tests/unit/out/unsafe/union_basic.rs | 44 +--- tests/unit/out/unsafe/union_cross_arm_cast.rs | 41 +--- .../unit/out/unsafe/union_field_alignment.rs | 21 +- .../out/unsafe/union_flex_array_member.rs | 21 +- tests/unit/out/unsafe/union_memset_memcpy.rs | 41 +--- tests/unit/out/unsafe/union_nested.rs | 52 +---- .../out/unsafe/union_pointer_pun_address.rs | 31 +-- .../unsafe/union_pointer_pun_writethrough.rs | 11 +- .../unit/out/unsafe/union_struct_dual_use.rs | 31 +-- .../unit/out/unsafe/union_tagged_many_arms.rs | 21 +- tests/unit/out/unsafe/union_tagged_simple.rs | 21 +- .../out/unsafe/union_tagged_struct_arms.rs | 51 +--- .../out/unsafe/union_void_ptr_sized_deref.rs | 21 +- tests/unit/out/unsafe/unique_ptr.rs | 10 +- .../unit/out/unsafe/unique_ptr_field_reset.rs | 10 +- tests/unit/out/unsafe/unique_ptr_nested.rs | 10 +- tests/unit/out/unsafe/unique_ptr_struct.rs | 10 +- tests/unit/out/unsafe/va_arg_mixed_types.rs | 10 +- .../out/unsafe/va_arg_non_primitive_ptrs.rs | 10 +- tests/unit/out/unsafe/va_arg_struct_ctx.rs | 21 +- tests/unit/out/unsafe/va_arg_void_ptr.rs | 10 +- tests/unit/out/unsafe/va_list_field.rs | 10 +- tests/unit/out/unsafe/vector.rs | 12 +- .../unit/out/unsafe/vector_iter_range_ctor.rs | 4 - .../out/unsafe/vector_subscript_direct.rs | 10 +- .../unit/out/unsafe/vector_with_allocator.rs | 20 +- tests/unit/out/unsafe/void_cast.rs | 10 +- 508 files changed, 1106 insertions(+), 10263 deletions(-) diff --git a/cpp2rust/converter/converter.cpp b/cpp2rust/converter/converter.cpp index ea30ecdde4..2964f4dc09 100644 --- a/cpp2rust/converter/converter.cpp +++ b/cpp2rust/converter/converter.cpp @@ -5154,12 +5154,11 @@ std::string Converter::GetRecordName(const clang::NamedDecl *decl) const { std::vector Converter::GetStructAttributes(const clang::RecordDecl *decl) { if (decl->isUnion()) { - std::vector union_attrs = {"Copy", - "Clone", - "FnPtrArg", - "VaArg", - "ZeroInitializationUnsafe", - "DestructibleUnsafe"}; + std::vector union_attrs = { + "Copy", "Clone", "FnPtrArg", "VaArg", "ZeroInitializationUnsafe"}; + if (!RecordDerivesTriviallyCopyable(decl)) { + union_attrs.emplace_back("DestructibleUnsafe"); + } AddCopyAndMoveDerives(decl, union_attrs); return union_attrs; } @@ -5184,7 +5183,8 @@ Converter::GetStructAttributes(const clang::RecordDecl *decl) { struct_attrs.emplace_back("CppFromUnsafe"); } - if (!ImplementsRecordTrait(decl, kDestructible)) { + if (!ImplementsRecordTrait(decl, kDestructible) && + !RecordDerivesTriviallyCopyable(decl)) { struct_attrs.emplace_back("DestructibleUnsafe"); } @@ -5725,10 +5725,13 @@ void Converter::AddCopyAndMoveDerives(const clang::RecordDecl *decl, } const RecordTrait *copy[] = {&kCopyConstructible, &kCopyAssignable}; const RecordTrait *move[] = {&kMoveConstructible, &kMoveAssignable}; - bool copies = decl->isUnion() || RecordImplementsClone(decl); - if (copies && IsTriviallyCopyable(decl)) { - attrs.emplace_back(GetCopyOrMoveTraitName(kTriviallyCopyable)); + if (RecordDerivesTriviallyCopyable(decl)) { + derive(kTriviallyCopyable, + {&kCopyConstructible, &kCopyAssignable, &kMoveConstructible, + &kMoveAssignable, &kSwappable, &kDestructible}); + return; } + bool copies = decl->isUnion() || RecordImplementsClone(decl); bool writes_move = llvm::any_of(move, implements); if (copies && !writes_move && llvm::none_of(copy, implements)) { derive(kCopyable, {&kCopyConstructible, &kCopyAssignable, @@ -5760,6 +5763,11 @@ void Converter::AddCopyAndMoveDerives(const clang::RecordDecl *decl, } } +bool Converter::RecordDerivesTriviallyCopyable(const clang::RecordDecl *decl) { + return (decl->isUnion() || RecordImplementsClone(decl)) && + IsTriviallyCopyable(decl); +} + bool Converter::RecordImplementsClone(const clang::RecordDecl *decl) { return HasDefaultedCopyConstructor(decl) || GetUserDefinedCopyConstructor(decl) != nullptr; diff --git a/cpp2rust/converter/converter.h b/cpp2rust/converter/converter.h index 9465b20af4..b6a00229e4 100644 --- a/cpp2rust/converter/converter.h +++ b/cpp2rust/converter/converter.h @@ -958,6 +958,8 @@ class Converter : public clang::RecursiveASTVisitor { virtual bool RecordImplementsClone(const clang::RecordDecl *decl); + bool RecordDerivesTriviallyCopyable(const clang::RecordDecl *decl); + virtual void AddDefaultTrait(const clang::RecordDecl *decl); virtual void AddDefaultTraitForUnion(const clang::RecordDecl *decl); diff --git a/cpp2rust/converter/models/converter_refcount.cpp b/cpp2rust/converter/models/converter_refcount.cpp index 2b197a5261..939397c9ef 100644 --- a/cpp2rust/converter/models/converter_refcount.cpp +++ b/cpp2rust/converter/models/converter_refcount.cpp @@ -2350,8 +2350,10 @@ ConverterRefCount::GetStructAttributes(const clang::RecordDecl *decl) { std::vector attrs; if (decl->isUnion()) { - std::vector union_attrs = {"VaArg", "FnPtrArg", - "Destructible"}; + std::vector union_attrs = {"VaArg", "FnPtrArg"}; + if (!RecordDerivesTriviallyCopyable(decl)) { + union_attrs.emplace_back("Destructible"); + } AddCopyAndMoveDerives(decl, union_attrs); return union_attrs; } @@ -2379,7 +2381,8 @@ ConverterRefCount::GetStructAttributes(const clang::RecordDecl *decl) { attrs.emplace_back("CppFrom"); } - if (!ImplementsRecordTrait(decl, kDestructible)) { + if (!ImplementsRecordTrait(decl, kDestructible) && + !RecordDerivesTriviallyCopyable(decl)) { attrs.emplace_back("Destructible"); } diff --git a/libcc2rs-macros/src/constructor.rs b/libcc2rs-macros/src/constructor.rs index 0e27c94287..4b58297dca 100644 --- a/libcc2rs-macros/src/constructor.rs +++ b/libcc2rs-macros/src/constructor.rs @@ -166,7 +166,31 @@ pub fn expand_trivially_copyable(input: TokenStream, is_unsafe: bool) -> TokenSt } } }; + let base = [ + ("copy", false), + ("move", false), + ("copy", true), + ("move", true), + ] + .map(|(op, is_assign)| impl_trait(&input, op, is_assign, is_unsafe)); + let swap = impl_swap(&input, is_unsafe); + let destroy = if is_unsafe { + quote! { + impl #impl_generics ::libcc2rs::DestructibleUnsafe for #name #ty_generics #where_clause { + unsafe fn destroy(&mut self) {} + } + } + } else { + quote! { + impl #impl_generics ::libcc2rs::Destructible for #name #ty_generics #where_clause { + fn destroy(_: &::libcc2rs::Ptr) {} + } + } + }; quote! { + #(#base)* + #swap + #destroy #constructors #(impl #impl_generics ::libcc2rs::#markers for #name #ty_generics #where_clause {})* } diff --git a/libcc2rs/src/field.rs b/libcc2rs/src/field.rs index 2301804731..f3e3e62975 100644 --- a/libcc2rs/src/field.rs +++ b/libcc2rs/src/field.rs @@ -1271,24 +1271,13 @@ impl Ptr { #[cfg(test)] mod tests { use crate::{ - AsPointer, ByteRepr, CopyAssignable, CopyConstructible, Decay, Destructible, - MoveAssignable, MoveConstructible, Place, Ptr, Record, TriviallyCopyable, Value, + AsPointer, ByteRepr, Decay, Place, Ptr, Record, TriviallyCopyable, Value, + ZeroInitialization, }; use std::cell::RefCell; use std::rc::Rc; - #[derive( - Clone, - Default, - Record, - ByteRepr, - MoveConstructible, - CopyConstructible, - MoveAssignable, - CopyAssignable, - Destructible, - TriviallyCopyable, - )] + #[derive(Clone, Default, Record, ByteRepr, ZeroInitialization, TriviallyCopyable)] #[byte_size(8)] struct Inner { #[offset(0)] diff --git a/rules/dirent/shim.rs b/rules/dirent/shim.rs index 2849db1557..02c56e203b 100644 --- a/rules/dirent/shim.rs +++ b/rules/dirent/shim.rs @@ -1,15 +1,11 @@ // Copyright (c) 2022-present INESC-ID. // Distributed under the MIT license that can be found in the LICENSE file. -use crate::{ - ByteRepr, Copyable, Destructible, Record, TriviallyCopyable, ZeroInitialization, size_of_field, -}; +use crate::{ByteRepr, Record, TriviallyCopyable, ZeroInitialization, size_of_field}; use std::cell::Cell; use std::mem::{offset_of, size_of}; -#[derive( - Clone, Record, ByteRepr, ZeroInitialization, Copyable, Destructible, TriviallyCopyable, -)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, TriviallyCopyable)] #[byte_size(size_of::<::libc::dirent>())] pub struct Dirent { #[offset(offset_of!(::libc::dirent, d_ino))] diff --git a/rules/ifaddrs/shim.rs b/rules/ifaddrs/shim.rs index c357fbb253..72bb389b4d 100644 --- a/rules/ifaddrs/shim.rs +++ b/rules/ifaddrs/shim.rs @@ -2,14 +2,12 @@ // Distributed under the MIT license that can be found in the LICENSE file. use crate::{ - ByteRepr, Copyable, Destructible, Ptr, Record, Sockaddr, SockaddrIn, SockaddrIn6, - SockaddrStorage, TriviallyCopyable, ZeroInitialization, + ByteRepr, Ptr, Record, Sockaddr, SockaddrIn, SockaddrIn6, SockaddrStorage, TriviallyCopyable, + ZeroInitialization, }; use std::mem::{offset_of, size_of}; -#[derive( - Clone, Default, Record, ByteRepr, ZeroInitialization, Copyable, Destructible, TriviallyCopyable, -)] +#[derive(Clone, Default, Record, ByteRepr, ZeroInitialization, TriviallyCopyable)] #[byte_size(size_of::<::libc::ifaddrs>())] pub struct Ifaddrs { #[offset(offset_of!(::libc::ifaddrs, ifa_next))] diff --git a/rules/ip/shim.rs b/rules/ip/shim.rs index d97dafed32..0ddbf861b2 100644 --- a/rules/ip/shim.rs +++ b/rules/ip/shim.rs @@ -1,20 +1,16 @@ // Copyright (c) 2022-present INESC-ID. // Distributed under the MIT license that can be found in the LICENSE file. -use crate::{ByteRepr, Copyable, Destructible, Ptr, Record, TriviallyCopyable, ZeroInitialization}; +use crate::{ByteRepr, Ptr, Record, TriviallyCopyable, ZeroInitialization}; -#[derive( - Clone, Default, Record, ByteRepr, ZeroInitialization, Copyable, Destructible, TriviallyCopyable, -)] +#[derive(Clone, Default, Record, ByteRepr, ZeroInitialization, TriviallyCopyable)] #[byte_size(4)] pub struct InAddr { #[offset(0)] pub s_addr: u32, } -#[derive( - Clone, Record, ByteRepr, ZeroInitialization, Copyable, Destructible, TriviallyCopyable, -)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, TriviallyCopyable)] #[byte_size(16)] pub struct In6Addr { #[offset(0)] diff --git a/rules/netdb/shim.rs b/rules/netdb/shim.rs index 4ed949a543..9759114ae9 100644 --- a/rules/netdb/shim.rs +++ b/rules/netdb/shim.rs @@ -1,14 +1,10 @@ // Copyright (c) 2022-present INESC-ID. // Distributed under the MIT license that can be found in the LICENSE file. -use crate::{ - ByteRepr, Copyable, Destructible, Ptr, Record, Sockaddr, TriviallyCopyable, ZeroInitialization, -}; +use crate::{ByteRepr, Ptr, Record, Sockaddr, TriviallyCopyable, ZeroInitialization}; use std::mem::{offset_of, size_of}; -#[derive( - Clone, Default, Record, ByteRepr, ZeroInitialization, Copyable, Destructible, TriviallyCopyable, -)] +#[derive(Clone, Default, Record, ByteRepr, ZeroInitialization, TriviallyCopyable)] #[byte_size(size_of::<::libc::addrinfo>())] pub struct Addrinfo { #[offset(offset_of!(::libc::addrinfo, ai_flags))] diff --git a/rules/poll/shim.rs b/rules/poll/shim.rs index 062d5eaa4b..e3fd49fee5 100644 --- a/rules/poll/shim.rs +++ b/rules/poll/shim.rs @@ -1,12 +1,10 @@ // Copyright (c) 2022-present INESC-ID. // Distributed under the MIT license that can be found in the LICENSE file. -use crate::{ByteRepr, Copyable, Destructible, Record, TriviallyCopyable, ZeroInitialization}; +use crate::{ByteRepr, Record, TriviallyCopyable, ZeroInitialization}; use std::mem::{offset_of, size_of}; -#[derive( - Clone, Default, Record, ByteRepr, ZeroInitialization, Copyable, Destructible, TriviallyCopyable, -)] +#[derive(Clone, Default, Record, ByteRepr, ZeroInitialization, TriviallyCopyable)] #[byte_size(size_of::<::libc::pollfd>())] pub struct Pollfd { #[offset(offset_of!(::libc::pollfd, fd))] diff --git a/rules/pwd/shim.rs b/rules/pwd/shim.rs index 2b6e5f2d11..ce42470db6 100644 --- a/rules/pwd/shim.rs +++ b/rules/pwd/shim.rs @@ -1,12 +1,10 @@ // Copyright (c) 2022-present INESC-ID. // Distributed under the MIT license that can be found in the LICENSE file. -use crate::{ByteRepr, Copyable, Destructible, Ptr, Record, TriviallyCopyable, ZeroInitialization}; +use crate::{ByteRepr, Ptr, Record, TriviallyCopyable, ZeroInitialization}; use std::mem::{offset_of, size_of}; -#[derive( - Clone, Default, Record, ByteRepr, ZeroInitialization, Copyable, Destructible, TriviallyCopyable, -)] +#[derive(Clone, Default, Record, ByteRepr, ZeroInitialization, TriviallyCopyable)] #[byte_size(size_of::<::libc::passwd>())] pub struct Passwd { #[offset(offset_of!(::libc::passwd, pw_name))] diff --git a/rules/select/shim.rs b/rules/select/shim.rs index 073acc4ffc..0d84bd0045 100644 --- a/rules/select/shim.rs +++ b/rules/select/shim.rs @@ -3,9 +3,9 @@ use std::collections::BTreeSet; -use crate::{Copyable, Destructible, TriviallyCopyable}; +use crate::TriviallyCopyable; -#[derive(Clone, Default, Copyable, Destructible, TriviallyCopyable)] +#[derive(Clone, Default, TriviallyCopyable)] pub struct CFdSet { fds: BTreeSet, } diff --git a/rules/socket/shim.rs b/rules/socket/shim.rs index 302995516f..d88e067aa7 100644 --- a/rules/socket/shim.rs +++ b/rules/socket/shim.rs @@ -1,15 +1,10 @@ // Copyright (c) 2022-present INESC-ID. // Distributed under the MIT license that can be found in the LICENSE file. -use crate::{ - ByteRepr, CChar, Copyable, Destructible, In6Addr, InAddr, Ptr, Record, TriviallyCopyable, - ZeroInitialization, -}; +use crate::{ByteRepr, CChar, In6Addr, InAddr, Ptr, Record, TriviallyCopyable, ZeroInitialization}; // The fields are at the offsets of the byte representation below. -#[derive( - Clone, Record, ByteRepr, ZeroInitialization, Copyable, Destructible, TriviallyCopyable, -)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, TriviallyCopyable)] #[byte_size(16)] pub struct Sockaddr { #[offset(0)] @@ -20,9 +15,7 @@ pub struct Sockaddr { pub sa_data: Box<[i8]>, } -#[derive( - Clone, Record, ByteRepr, ZeroInitialization, Copyable, Destructible, TriviallyCopyable, -)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, TriviallyCopyable)] #[byte_size(16)] pub struct SockaddrIn { #[offset(0)] @@ -37,9 +30,7 @@ pub struct SockaddrIn { pub sin_zero: Box<[u8]>, } -#[derive( - Clone, Default, Record, ByteRepr, ZeroInitialization, Copyable, Destructible, TriviallyCopyable, -)] +#[derive(Clone, Default, Record, ByteRepr, ZeroInitialization, TriviallyCopyable)] #[byte_size(28)] pub struct SockaddrIn6 { #[offset(0)] @@ -54,9 +45,7 @@ pub struct SockaddrIn6 { pub sin6_scope_id: u32, } -#[derive( - Clone, Record, ByteRepr, ZeroInitialization, Copyable, Destructible, TriviallyCopyable, -)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, TriviallyCopyable)] #[byte_size(110)] pub struct SockaddrUn { #[offset(0)] @@ -67,9 +56,7 @@ pub struct SockaddrUn { pub sun_path: Box<[i8]>, } -#[derive( - Clone, Record, ByteRepr, ZeroInitialization, Copyable, Destructible, TriviallyCopyable, -)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, TriviallyCopyable)] #[byte_size(128)] pub struct SockaddrStorage { #[offset(0)] diff --git a/rules/stat/shim.rs b/rules/stat/shim.rs index 5d539b41ef..e56c9642cc 100644 --- a/rules/stat/shim.rs +++ b/rules/stat/shim.rs @@ -1,10 +1,10 @@ // Copyright (c) 2022-present INESC-ID. // Distributed under the MIT license that can be found in the LICENSE file. -use crate::{ByteRepr, Copyable, Destructible, Record, TriviallyCopyable, ZeroInitialization}; +use crate::{ByteRepr, Record, TriviallyCopyable, ZeroInitialization}; use std::mem::{offset_of, size_of}; -#[derive(Clone, Default, Record, ZeroInitialization, Copyable, Destructible, TriviallyCopyable)] +#[derive(Clone, Default, Record, ZeroInitialization, TriviallyCopyable)] // The fields have the sizes of those of libc::stat only in x86-64 Linux. #[cfg_attr( all(target_os = "linux", target_arch = "x86_64"), diff --git a/rules/termios/shim.rs b/rules/termios/shim.rs index 9a8da3586d..e6d0c1bb5c 100644 --- a/rules/termios/shim.rs +++ b/rules/termios/shim.rs @@ -1,12 +1,10 @@ // Copyright (c) 2022-present INESC-ID. // Distributed under the MIT license that can be found in the LICENSE file. -use crate::{ByteRepr, Copyable, Destructible, Record, TriviallyCopyable, ZeroInitialization}; +use crate::{ByteRepr, Record, TriviallyCopyable, ZeroInitialization}; use std::mem::{offset_of, size_of}; -#[derive( - Clone, Record, ByteRepr, ZeroInitialization, Copyable, Destructible, TriviallyCopyable, -)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, TriviallyCopyable)] #[byte_size(size_of::<::libc::termios>())] pub struct Termios { #[offset(offset_of!(::libc::termios, c_iflag))] @@ -107,9 +105,7 @@ impl Termios { } } -#[derive( - Clone, Default, Record, ByteRepr, ZeroInitialization, Copyable, Destructible, TriviallyCopyable, -)] +#[derive(Clone, Default, Record, ByteRepr, ZeroInitialization, TriviallyCopyable)] #[byte_size(size_of::<::libc::winsize>())] pub struct Winsize { #[offset(offset_of!(::libc::winsize, ws_row))] diff --git a/rules/time/shim.rs b/rules/time/shim.rs index c17d9def98..b0093f7db8 100644 --- a/rules/time/shim.rs +++ b/rules/time/shim.rs @@ -1,12 +1,10 @@ // Copyright (c) 2022-present INESC-ID. // Distributed under the MIT license that can be found in the LICENSE file. -use crate::{ByteRepr, Copyable, Destructible, Ptr, Record, TriviallyCopyable, ZeroInitialization}; +use crate::{ByteRepr, Ptr, Record, TriviallyCopyable, ZeroInitialization}; use std::mem::{offset_of, size_of}; -#[derive( - Clone, Default, Record, ByteRepr, ZeroInitialization, Copyable, Destructible, TriviallyCopyable, -)] +#[derive(Clone, Default, Record, ByteRepr, ZeroInitialization, TriviallyCopyable)] #[byte_size(size_of::<::libc::tm>())] pub struct Tm { #[offset(offset_of!(::libc::tm, tm_sec))] @@ -67,9 +65,7 @@ impl Tm { } } -#[derive( - Clone, Default, Record, ByteRepr, ZeroInitialization, Copyable, Destructible, TriviallyCopyable, -)] +#[derive(Clone, Default, Record, ByteRepr, ZeroInitialization, TriviallyCopyable)] #[byte_size(size_of::<::libc::timeval>())] pub struct Timeval { #[offset(offset_of!(::libc::timeval, tv_sec))] @@ -78,9 +74,7 @@ pub struct Timeval { pub tv_usec: i64, } -#[derive( - Clone, Default, Record, ByteRepr, ZeroInitialization, Copyable, Destructible, TriviallyCopyable, -)] +#[derive(Clone, Default, Record, ByteRepr, ZeroInitialization, TriviallyCopyable)] #[byte_size(size_of::<::libc::timespec>())] pub struct Timespec { #[offset(offset_of!(::libc::timespec, tv_sec))] diff --git a/tests/multi-file/cross_tu_tag_collision/out/refcount/cross_tu_tag_collision.rs b/tests/multi-file/cross_tu_tag_collision/out/refcount/cross_tu_tag_collision.rs index 5c311790a0..70ce781b92 100644 --- a/tests/multi-file/cross_tu_tag_collision/out/refcount/cross_tu_tag_collision.rs +++ b/tests/multi-file/cross_tu_tag_collision/out/refcount/cross_tu_tag_collision.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct widget { diff --git a/tests/multi-file/cross_tu_tag_collision/out/unsafe/cross_tu_tag_collision.rs b/tests/multi-file/cross_tu_tag_collision/out/unsafe/cross_tu_tag_collision.rs index ef183d5c63..81ce74dc03 100644 --- a/tests/multi-file/cross_tu_tag_collision/out/unsafe/cross_tu_tag_collision.rs +++ b/tests/multi-file/cross_tu_tag_collision/out/unsafe/cross_tu_tag_collision.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct widget { pub id: i32, diff --git a/tests/multi-file/friend_operator/out/refcount/friend_operator.rs b/tests/multi-file/friend_operator/out/refcount/friend_operator.rs index 97e152af25..5a6904297e 100644 --- a/tests/multi-file/friend_operator/out/refcount/friend_operator.rs +++ b/tests/multi-file/friend_operator/out/refcount/friend_operator.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct S { diff --git a/tests/multi-file/friend_operator/out/unsafe/friend_operator.rs b/tests/multi-file/friend_operator/out/unsafe/friend_operator.rs index 7775249db4..a4b028e173 100644 --- a/tests/multi-file/friend_operator/out/unsafe/friend_operator.rs +++ b/tests/multi-file/friend_operator/out/unsafe/friend_operator.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct S { pub a: i32, diff --git a/tests/multi-file/opaque_forward_decl/out/refcount/opaque_forward_decl.rs b/tests/multi-file/opaque_forward_decl/out/refcount/opaque_forward_decl.rs index 19c7b228ec..f9cfd7c604 100644 --- a/tests/multi-file/opaque_forward_decl/out/refcount/opaque_forward_decl.rs +++ b/tests/multi-file/opaque_forward_decl/out/refcount/opaque_forward_decl.rs @@ -7,16 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(16)] pub struct container { diff --git a/tests/multi-file/opaque_forward_decl/out/unsafe/opaque_forward_decl.rs b/tests/multi-file/opaque_forward_decl/out/unsafe/opaque_forward_decl.rs index 009993f635..9b0aa0cf07 100644 --- a/tests/multi-file/opaque_forward_decl/out/unsafe/opaque_forward_decl.rs +++ b/tests/multi-file/opaque_forward_decl/out/unsafe/opaque_forward_decl.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct container { pub p: *mut opaque, diff --git a/tests/multi-file/out_of_line_methods_cross_tu/out/refcount/out_of_line_methods_cross_tu.rs b/tests/multi-file/out_of_line_methods_cross_tu/out/refcount/out_of_line_methods_cross_tu.rs index 2bf8d478a8..e8fd3c9148 100644 --- a/tests/multi-file/out_of_line_methods_cross_tu/out/refcount/out_of_line_methods_cross_tu.rs +++ b/tests/multi-file/out_of_line_methods_cross_tu/out/refcount/out_of_line_methods_cross_tu.rs @@ -39,17 +39,7 @@ pub struct Derived { pub factor: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Pair { diff --git a/tests/multi-file/out_of_line_methods_cross_tu/out/unsafe/out_of_line_methods_cross_tu.rs b/tests/multi-file/out_of_line_methods_cross_tu/out/unsafe/out_of_line_methods_cross_tu.rs index 9bc0b0d2b5..80012ce45f 100644 --- a/tests/multi-file/out_of_line_methods_cross_tu/out/unsafe/out_of_line_methods_cross_tu.rs +++ b/tests/multi-file/out_of_line_methods_cross_tu/out/unsafe/out_of_line_methods_cross_tu.rs @@ -42,15 +42,7 @@ pub struct Derived { impl Derived {} #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Pair { pub first: i32, diff --git a/tests/multi-file/template_method_late_instantiation/out/refcount/template_method_late_instantiation.rs b/tests/multi-file/template_method_late_instantiation/out/refcount/template_method_late_instantiation.rs index d8fd3e3dd1..0c6a4af038 100644 --- a/tests/multi-file/template_method_late_instantiation/out/refcount/template_method_late_instantiation.rs +++ b/tests/multi-file/template_method_late_instantiation/out/refcount/template_method_late_instantiation.rs @@ -6,18 +6,7 @@ use std::io::prelude::*; use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; -#[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(4)] pub struct S_int_ { #[offset(0)] diff --git a/tests/multi-file/template_method_late_instantiation/out/unsafe/template_method_late_instantiation.rs b/tests/multi-file/template_method_late_instantiation/out/unsafe/template_method_late_instantiation.rs index bf8be3fe8f..cfa1a21e68 100644 --- a/tests/multi-file/template_method_late_instantiation/out/unsafe/template_method_late_instantiation.rs +++ b/tests/multi-file/template_method_late_instantiation/out/unsafe/template_method_late_instantiation.rs @@ -7,16 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] -#[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct S_int_ { pub x: i32, } diff --git a/tests/std/basic/basic.def.odr/p14-class-in-two-files/out/refcount/p14-class-in-two-files.rs b/tests/std/basic/basic.def.odr/p14-class-in-two-files/out/refcount/p14-class-in-two-files.rs index 713d890444..2e7fc99ca2 100644 --- a/tests/std/basic/basic.def.odr/p14-class-in-two-files/out/refcount/p14-class-in-two-files.rs +++ b/tests/std/basic/basic.def.odr/p14-class-in-two-files/out/refcount/p14-class-in-two-files.rs @@ -112,17 +112,7 @@ thread_local!( }; ); #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct HasInlineMembers {} diff --git a/tests/std/basic/basic.def.odr/p14-class-in-two-files/out/unsafe/p14-class-in-two-files.rs b/tests/std/basic/basic.def.odr/p14-class-in-two-files/out/unsafe/p14-class-in-two-files.rs index af3d18159e..d121830008 100644 --- a/tests/std/basic/basic.def.odr/p14-class-in-two-files/out/unsafe/p14-class-in-two-files.rs +++ b/tests/std/basic/basic.def.odr/p14-class-in-two-files/out/unsafe/p14-class-in-two-files.rs @@ -105,15 +105,7 @@ pub static mut shared_5: std::cell::LazyCell = }); #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct HasInlineMembers {} impl HasInlineMembers { diff --git a/tests/std/basic/basic.def.odr/p15-class-template-static-member/out/refcount/p15-class-template-static-member.rs b/tests/std/basic/basic.def.odr/p15-class-template-static-member/out/refcount/p15-class-template-static-member.rs index 4d53fc0de4..cb1d7b0b33 100644 --- a/tests/std/basic/basic.def.odr/p15-class-template-static-member/out/refcount/p15-class-template-static-member.rs +++ b/tests/std/basic/basic.def.odr/p15-class-template-static-member/out/refcount/p15-class-template-static-member.rs @@ -92,17 +92,7 @@ thread_local!( }; ); #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct HasStaticMember_int_ {} @@ -120,17 +110,7 @@ thread_local!( }; ); #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct HasStaticMember_long_ {} diff --git a/tests/std/basic/basic.def.odr/p15-class-template-static-member/out/unsafe/p15-class-template-static-member.rs b/tests/std/basic/basic.def.odr/p15-class-template-static-member/out/unsafe/p15-class-template-static-member.rs index cd660fcc43..4f9c613945 100644 --- a/tests/std/basic/basic.def.odr/p15-class-template-static-member/out/unsafe/p15-class-template-static-member.rs +++ b/tests/std/basic/basic.def.odr/p15-class-template-static-member/out/unsafe/p15-class-template-static-member.rs @@ -85,15 +85,7 @@ pub static mut member_4: std::cell::LazyCell = }); #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct HasStaticMember_int_ {} pub static mut member_5: std::cell::LazyCell = @@ -112,15 +104,7 @@ pub static mut member_5: std::cell::LazyCell = }); #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct HasStaticMember_long_ {} pub fn main() { diff --git a/tests/std/basic/basic.def.odr/p15-function-template/out/refcount/p15-function-template.rs b/tests/std/basic/basic.def.odr/p15-function-template/out/refcount/p15-function-template.rs index 72893db9db..217d591c0b 100644 --- a/tests/std/basic/basic.def.odr/p15-function-template/out/refcount/p15-function-template.rs +++ b/tests/std/basic/basic.def.odr/p15-function-template/out/refcount/p15-function-template.rs @@ -174,17 +174,7 @@ fn main_0() -> i32 { return 0; } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct S_14 {} @@ -217,17 +207,7 @@ pub fn b_count_local_15() -> i32 { return ({ count_18() }); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct S_21 {} diff --git a/tests/std/basic/basic.def.odr/p15-function-template/out/unsafe/p15-function-template.rs b/tests/std/basic/basic.def.odr/p15-function-template/out/unsafe/p15-function-template.rs index b5b644253a..8db26da7bf 100644 --- a/tests/std/basic/basic.def.odr/p15-function-template/out/unsafe/p15-function-template.rs +++ b/tests/std/basic/basic.def.odr/p15-function-template/out/unsafe/p15-function-template.rs @@ -162,15 +162,7 @@ unsafe fn main_0() -> i32 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct S_14 {} pub unsafe fn count_18() -> i32 { @@ -201,15 +193,7 @@ pub unsafe fn b_count_local_15() -> i32 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct S_21 {} pub unsafe fn __cpp2rust_init_globals() { diff --git a/tests/std/basic/basic.def.odr/p16-default-argument-lambda-in-class/out/refcount/p16-default-argument-lambda-in-class.rs b/tests/std/basic/basic.def.odr/p16-default-argument-lambda-in-class/out/refcount/p16-default-argument-lambda-in-class.rs index 012e5464b3..bb10609bef 100644 --- a/tests/std/basic/basic.def.odr/p16-default-argument-lambda-in-class/out/refcount/p16-default-argument-lambda-in-class.rs +++ b/tests/std/basic/basic.def.odr/p16-default-argument-lambda-in-class/out/refcount/p16-default-argument-lambda-in-class.rs @@ -90,17 +90,7 @@ impl Destructible for AssertsDtorCountAtExit { } } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct X {} diff --git a/tests/std/basic/basic.def.odr/p16-default-argument-lambda-in-class/out/unsafe/p16-default-argument-lambda-in-class.rs b/tests/std/basic/basic.def.odr/p16-default-argument-lambda-in-class/out/unsafe/p16-default-argument-lambda-in-class.rs index a5f35ff799..32284bdcd2 100644 --- a/tests/std/basic/basic.def.odr/p16-default-argument-lambda-in-class/out/unsafe/p16-default-argument-lambda-in-class.rs +++ b/tests/std/basic/basic.def.odr/p16-default-argument-lambda-in-class/out/unsafe/p16-default-argument-lambda-in-class.rs @@ -81,15 +81,7 @@ impl DestructibleUnsafe for AssertsDtorCountAtExit { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct X {} impl X { diff --git a/tests/std/basic/basic.link/out/refcount/basic.link.rs b/tests/std/basic/basic.link/out/refcount/basic.link.rs index bd73d8a906..1b51239747 100644 --- a/tests/std/basic/basic.link/out/refcount/basic.link.rs +++ b/tests/std/basic/basic.link/out/refcount/basic.link.rs @@ -29,9 +29,7 @@ pub fn test_11() { assert!((ceiling_10.with(|rc| *rc.borrow()) == 40)); assert!(((ceiling_10.with(|v| v.as_pointer())) == ({ ceiling_address_in_b_12() }))); } -#[derive( - VaArg, FnPtrArg, Destructible, TriviallyCopyable, Copyable, ByteRepr, Clone, ZeroInitialization, -)] +#[derive(VaArg, FnPtrArg, TriviallyCopyable, ByteRepr, Clone, ZeroInitialization)] #[byte_size(4)] pub struct anon_13 { #[offset(0)] @@ -69,18 +67,7 @@ thread_local!( pub fn bump_18() -> i32 { return (*(*counter_17.with(Value::clone).borrow_mut()).prefix_inc()); } -#[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(4)] pub struct Record_19 { #[offset(0)] @@ -117,17 +104,7 @@ pub fn test_29() { assert!((({ raise_30(1,) }) == 11)); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct Tally_31 {} @@ -141,17 +118,7 @@ pub fn test_33() { assert!((total_32.with(|rc| *rc.borrow()) == 11)); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct p5_members_of_class_with_external_linkage_Ledger {} @@ -220,18 +187,7 @@ pub fn test_55() { assert!((({ second_key_plus_value_53() }) == 32)); assert!((({ key_in_b_56() }) == 400)); } -#[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(4)] pub struct Entry_52 { #[offset(0)] @@ -242,18 +198,7 @@ impl Default for Entry_52 { { Entry_52 { key: 1 } } } } -#[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(8)] pub struct Entry_54 { #[offset(0)] @@ -325,9 +270,7 @@ thread_local!( pub fn ceiling_address_in_b_12() -> Ptr { return (ceiling_10.with(|v| v.as_pointer())); } -#[derive( - VaArg, FnPtrArg, Destructible, TriviallyCopyable, Copyable, ByteRepr, Clone, ZeroInitialization, -)] +#[derive(VaArg, FnPtrArg, TriviallyCopyable, ByteRepr, Clone, ZeroInitialization)] #[byte_size(4)] pub struct anon_62 { #[offset(0)] @@ -365,18 +308,7 @@ thread_local!( pub fn bump_64() -> i32 { return (*(*counter_63.with(Value::clone).borrow_mut()).prefix_inc()); } -#[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(16)] pub struct Record_65 { #[offset(0)] @@ -421,17 +353,7 @@ pub fn raise_30(mut by: i32) -> i32 { return level_28.with(|rc| *rc.borrow()); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct Tally_67 {} @@ -474,18 +396,7 @@ pub fn key_in_b_56() -> i32 { let mut entry: Entry_71 = ::default(); return (entry.key as i32); } -#[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(8)] pub struct Entry_71 { #[offset(0)] diff --git a/tests/std/basic/basic.link/out/unsafe/basic.link.rs b/tests/std/basic/basic.link/out/unsafe/basic.link.rs index 086abcefc6..bc7bda2b28 100644 --- a/tests/std/basic/basic.link/out/unsafe/basic.link.rs +++ b/tests/std/basic/basic.link/out/unsafe/basic.link.rs @@ -37,16 +37,7 @@ pub unsafe fn test_11() { ); } #[repr(C)] -#[derive( - Copy, - Clone, - FnPtrArg, - VaArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub union anon_13 { pub whole: i32, pub fraction: f32, @@ -69,16 +60,7 @@ pub unsafe fn bump_18() -> i32 { return (*(*std::cell::LazyCell::force_mut(&mut *&raw mut counter_17)).prefix_inc()); } #[repr(C)] -#[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct Record_19 { pub id: i32, } @@ -112,15 +94,7 @@ pub unsafe fn test_29() { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Tally_31 {} impl Tally_31 { @@ -138,15 +112,7 @@ pub unsafe fn test_33() { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p5_members_of_class_with_external_linkage_Ledger {} pub unsafe fn test_36() { @@ -209,16 +175,7 @@ pub unsafe fn test_55() { assert!(((unsafe { key_in_b_56() }) == (400))); } #[repr(C)] -#[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct Entry_52 { pub key: i32, } @@ -228,16 +185,7 @@ impl Default for Entry_52 { } } #[repr(C)] -#[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct Entry_54 { pub key: i32, pub value: i32, @@ -299,16 +247,7 @@ pub unsafe fn ceiling_address_in_b_12() -> *const i32 { return (&raw const (*std::cell::LazyCell::force_mut(&mut *&raw mut ceiling_10)) as *const i32); } #[repr(C)] -#[derive( - Copy, - Clone, - FnPtrArg, - VaArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub union anon_62 { pub whole: i32, pub fraction: f32, @@ -331,16 +270,7 @@ pub unsafe fn bump_64() -> i32 { return (*(*std::cell::LazyCell::force_mut(&mut *&raw mut counter_63)).prefix_inc()); } #[repr(C)] -#[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct Record_65 { pub id: i64, pub extra: i32, @@ -378,15 +308,7 @@ pub unsafe fn raise_30(mut by: i32) -> i32 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Tally_67 {} impl Tally_67 { @@ -425,16 +347,7 @@ pub unsafe fn key_in_b_56() -> i32 { return (entry.key as i32); } #[repr(C)] -#[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct Entry_71 { pub key: i64, } diff --git a/tests/std/basic/basic.scope/out/refcount/basic.scope.class.rs b/tests/std/basic/basic.scope/out/refcount/basic.scope.class.rs index 7e97f8c466..d0dd2aadb7 100644 --- a/tests/std/basic/basic.scope/out/refcount/basic.scope.class.rs +++ b/tests/std/basic/basic.scope/out/refcount/basic.scope.class.rs @@ -9,18 +9,7 @@ use std::rc::{Rc, Weak}; thread_local!( pub static balance_0: Value = Rc::new(RefCell::new(50)); ); -#[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(4)] pub struct p1_member_hides_namespace_variable_HasBalance { #[offset(0)] @@ -56,18 +45,7 @@ pub fn test_1() { thread_local!( pub static initial_2: Value = Rc::new(RefCell::new(100)); ); -#[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(4)] pub struct p1_out_of_class_definition_is_in_class_scope_HasStaticTotal { #[offset(0)] diff --git a/tests/std/basic/basic.scope/out/refcount/basic.scope.param.rs b/tests/std/basic/basic.scope/out/refcount/basic.scope.param.rs index 2e05fd740d..c8ba3af145 100644 --- a/tests/std/basic/basic.scope/out/refcount/basic.scope.param.rs +++ b/tests/std/basic/basic.scope/out/refcount/basic.scope.param.rs @@ -15,9 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, CppFrom, - Destructible, TriviallyCopyable, - Copyable, Default, )] #[cpp_from(i32, construct, value)] diff --git a/tests/std/basic/basic.scope/out/refcount/basic.scope.pdecl.rs b/tests/std/basic/basic.scope/out/refcount/basic.scope.pdecl.rs index 62cff58f5d..50d4f24248 100644 --- a/tests/std/basic/basic.scope/out/refcount/basic.scope.pdecl.rs +++ b/tests/std/basic/basic.scope/out/refcount/basic.scope.pdecl.rs @@ -19,16 +19,7 @@ pub fn test_0() { assert!((level == 5)); } #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(16)] pub struct p1_own_address_in_initializer_SelfLinked { @@ -84,17 +75,7 @@ pub fn test_3() { pub type anon_4 = u32; pub const anon_4_limit: anon_4 = 13; pub const anon_4_above: anon_4 = 14; -#[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(8)] pub struct p9_func_declared_before_function_body_RecordsConstructorName { #[offset(0)] diff --git a/tests/std/basic/basic.scope/out/refcount/basic.scope.scope.rs b/tests/std/basic/basic.scope/out/refcount/basic.scope.scope.rs index 2c8f487212..0aecd9eb4b 100644 --- a/tests/std/basic/basic.scope/out/refcount/basic.scope.scope.rs +++ b/tests/std/basic/basic.scope/out/refcount/basic.scope.scope.rs @@ -45,17 +45,7 @@ pub const p2_11_unscoped_enumerator_in_both_scopes_HasUnscopedEnum_Size_small: pub const p2_11_unscoped_enumerator_in_both_scopes_HasUnscopedEnum_Size_large: p2_11_unscoped_enumerator_in_both_scopes_HasUnscopedEnum_Size = 8; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct p2_11_unscoped_enumerator_in_both_scopes_HasUnscopedEnum {} @@ -85,17 +75,7 @@ thread_local!( pub static count_6: Value = Rc::new(RefCell::new(0)); ); #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct p2_12_class_name_in_own_scope_HasStaticCounter {} @@ -112,9 +92,7 @@ pub fn test_7() { count_6.with(|rc| *rc.borrow_mut() = 6); assert!((count_6.with(|rc| *rc.borrow()) == 6)); } -#[derive( - VaArg, FnPtrArg, Destructible, TriviallyCopyable, Copyable, ByteRepr, Clone, ZeroInitialization, -)] +#[derive(VaArg, FnPtrArg, TriviallyCopyable, ByteRepr, Clone, ZeroInitialization)] #[byte_size(8)] pub struct anon_8 { #[offset(0)] @@ -140,9 +118,7 @@ impl Default for anon_8 { thread_local!( pub static anon_8: Value = Rc::new(RefCell::new(::default())); ); -#[derive( - VaArg, FnPtrArg, Destructible, TriviallyCopyable, Copyable, ByteRepr, Clone, ZeroInitialization, -)] +#[derive(VaArg, FnPtrArg, TriviallyCopyable, ByteRepr, Clone, ZeroInitialization)] #[byte_size(8)] pub struct anon_9 { #[offset(0)] @@ -166,16 +142,7 @@ impl Default for anon_9 { } } #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(16)] pub struct p2_13_anonymous_union_members_in_parent_scope_HasAnonymousUnion { @@ -212,9 +179,7 @@ pub fn test_10() { anon_11::block_ratio(anon_11.as_pointer()).write(0.75_f64); assert!(((anon_11::block_ratio(anon_11.as_pointer()).read()) == 0.75_f64)); } -#[derive( - VaArg, FnPtrArg, Destructible, TriviallyCopyable, Copyable, ByteRepr, Clone, ZeroInitialization, -)] +#[derive(VaArg, FnPtrArg, TriviallyCopyable, ByteRepr, Clone, ZeroInitialization)] #[byte_size(8)] pub struct anon_11 { #[offset(0)] @@ -237,18 +202,7 @@ impl Default for anon_11 { } } } -#[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(8)] pub struct p3_2_const_qualified_member_is_distinct_HasConstOverload { #[offset(0)] @@ -292,18 +246,7 @@ thread_local!( thread_local!( pub static rvalue_calls_14: Value = Rc::new(RefCell::new(0)); ); -#[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(4)] pub struct p3_2_explicit_object_and_rvalue_members_are_distinct_HasExplicitObjectOverload { #[offset(0)] @@ -346,17 +289,7 @@ thread_local!( pub static rvalue_calls_17: Value = Rc::new(RefCell::new(0)); ); #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct p3_2_ref_qualified_members_are_distinct_HasRefQualifiedOverloads {} @@ -395,18 +328,7 @@ pub fn test_18() { assert!((lvalue_calls_16.with(|rc| *rc.borrow()) == 1)); assert!((rvalue_calls_17.with(|rc| *rc.borrow()) == 2)); } -#[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(8)] pub struct p3_4_const_qualified_member_templates_are_distinct_HasConstTemplateOverload { #[offset(0)] @@ -454,17 +376,7 @@ thread_local!( pub static rvalue_calls_21: Value = Rc::new(RefCell::new(0)); ); #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct p3_4_ref_qualified_member_templates_are_distinct_HasRefQualifiedTemplateOverloads {} @@ -496,17 +408,7 @@ thread_local!( pub static friend_calls_23: Value = Rc::new(RefCell::new(0_i32)); ); #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct p4_friend_definition_defines_earlier_friend_declaration_DeclaresFriend {} @@ -515,17 +417,7 @@ pub fn shared_friend_24() -> i32 { return 7; } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct p4_friend_definition_defines_earlier_friend_declaration_DefinesFriend {} @@ -559,17 +451,7 @@ thread_local!( pub static function_calls_31: Value = Rc::new(RefCell::new(0_i32)); ); #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct p4_2_class_and_function_share_name_Reading { @@ -589,17 +471,7 @@ pub fn test_33() { assert!((function_calls_31.with(|rc| *rc.borrow()) == 1)); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct p4_2_class_and_variable_share_name_Limit { diff --git a/tests/std/basic/basic.scope/out/unsafe/basic.scope.class.rs b/tests/std/basic/basic.scope/out/unsafe/basic.scope.class.rs index 185ac5c328..fe8350df27 100644 --- a/tests/std/basic/basic.scope/out/unsafe/basic.scope.class.rs +++ b/tests/std/basic/basic.scope/out/unsafe/basic.scope.class.rs @@ -8,16 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; pub static mut balance_0: std::cell::LazyCell = std::cell::LazyCell::new(|| unsafe { 50 }); #[repr(C)] -#[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct p1_member_hides_namespace_variable_HasBalance { pub balance: i32, } @@ -55,16 +46,7 @@ pub unsafe fn test_1() { } pub static mut initial_2: std::cell::LazyCell = std::cell::LazyCell::new(|| unsafe { 100 }); #[repr(C)] -#[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct p1_out_of_class_definition_is_in_class_scope_HasStaticTotal { pub held: i32, } diff --git a/tests/std/basic/basic.scope/out/unsafe/basic.scope.param.rs b/tests/std/basic/basic.scope/out/unsafe/basic.scope.param.rs index 7e484fe663..539106be6d 100644 --- a/tests/std/basic/basic.scope/out/unsafe/basic.scope.param.rs +++ b/tests/std/basic/basic.scope/out/unsafe/basic.scope.param.rs @@ -14,9 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, - DestructibleUnsafe, TriviallyCopyableUnsafe, - CopyableUnsafe, Default, )] #[cpp_from(i32, construct, value)] diff --git a/tests/std/basic/basic.scope/out/unsafe/basic.scope.pdecl.rs b/tests/std/basic/basic.scope/out/unsafe/basic.scope.pdecl.rs index 97a8abcc88..3bfb70a4e9 100644 --- a/tests/std/basic/basic.scope/out/unsafe/basic.scope.pdecl.rs +++ b/tests/std/basic/basic.scope/out/unsafe/basic.scope.pdecl.rs @@ -20,15 +20,7 @@ pub unsafe fn test_0() { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p1_own_address_in_initializer_SelfLinked { pub next: *mut p1_own_address_in_initializer_SelfLinked, @@ -82,16 +74,7 @@ pub type anon_4 = u32; pub const anon_4_limit: anon_4 = 13; pub const anon_4_above: anon_4 = 14; #[repr(C)] -#[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct p9_func_declared_before_function_body_RecordsConstructorName { pub name: *const libc::c_char, } diff --git a/tests/std/basic/basic.scope/out/unsafe/basic.scope.scope.rs b/tests/std/basic/basic.scope/out/unsafe/basic.scope.scope.rs index 9d9922f18d..e1c5504da8 100644 --- a/tests/std/basic/basic.scope/out/unsafe/basic.scope.scope.rs +++ b/tests/std/basic/basic.scope/out/unsafe/basic.scope.scope.rs @@ -43,15 +43,7 @@ pub const p2_11_unscoped_enumerator_in_both_scopes_HasUnscopedEnum_Size_large: p2_11_unscoped_enumerator_in_both_scopes_HasUnscopedEnum_Size = 8; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p2_11_unscoped_enumerator_in_both_scopes_HasUnscopedEnum {} impl p2_11_unscoped_enumerator_in_both_scopes_HasUnscopedEnum { @@ -80,15 +72,7 @@ pub unsafe fn test_5() { pub static mut count_6: std::cell::LazyCell = std::cell::LazyCell::new(|| unsafe { 0 }); #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p2_12_class_name_in_own_scope_HasStaticCounter {} impl p2_12_class_name_in_own_scope_HasStaticCounter { @@ -105,16 +89,7 @@ pub unsafe fn test_7() { assert!(((*std::cell::LazyCell::force_mut(&mut *&raw mut count_6)) == (6))); } #[repr(C)] -#[derive( - Copy, - Clone, - FnPtrArg, - VaArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub union anon_8 { pub namespace_count: i32, pub namespace_ratio: f64, @@ -127,16 +102,7 @@ impl Default for anon_8 { pub static mut anon_8: std::cell::LazyCell = std::cell::LazyCell::new(|| unsafe { ::default() }); #[repr(C)] -#[derive( - Copy, - Clone, - FnPtrArg, - VaArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub union anon_9 { pub member_count: i32, pub member_ratio: f64, @@ -148,15 +114,7 @@ impl Default for anon_9 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p2_13_anonymous_union_members_in_parent_scope_HasAnonymousUnion { pub tag: i32, @@ -194,16 +152,7 @@ pub unsafe fn test_10() { assert!(((anon_11.block_ratio) == (0.75_f64))); } #[repr(C)] -#[derive( - Copy, - Clone, - FnPtrArg, - VaArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub union anon_11 { pub block_count: i32, pub block_ratio: f64, @@ -214,16 +163,7 @@ impl Default for anon_11 { } } #[repr(C)] -#[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct p3_2_const_qualified_member_is_distinct_HasConstOverload { pub plain_calls: i32, pub const_calls: i32, @@ -271,16 +211,7 @@ pub static mut explicit_calls_13: std::cell::LazyCell = pub static mut rvalue_calls_14: std::cell::LazyCell = std::cell::LazyCell::new(|| unsafe { 0 }); #[repr(C)] -#[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct p3_2_explicit_object_and_rvalue_members_are_distinct_HasExplicitObjectOverload { pub base: i32, } @@ -333,15 +264,7 @@ pub static mut rvalue_calls_17: std::cell::LazyCell = std::cell::LazyCell::new(|| unsafe { 0 }); #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p3_2_ref_qualified_members_are_distinct_HasRefQualifiedOverloads {} impl p3_2_ref_qualified_members_are_distinct_HasRefQualifiedOverloads { @@ -382,16 +305,7 @@ pub unsafe fn test_18() { assert!(((*std::cell::LazyCell::force_mut(&mut *&raw mut rvalue_calls_17)) == (2))); } #[repr(C)] -#[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct p3_4_const_qualified_member_templates_are_distinct_HasConstTemplateOverload { pub plain_calls: i32, pub const_calls: i32, @@ -448,15 +362,7 @@ pub static mut rvalue_calls_21: std::cell::LazyCell = std::cell::LazyCell::new(|| unsafe { 0 }); #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p3_4_ref_qualified_member_templates_are_distinct_HasRefQualifiedTemplateOverloads {} impl p3_4_ref_qualified_member_templates_are_distinct_HasRefQualifiedTemplateOverloads { @@ -497,15 +403,7 @@ pub static mut friend_calls_23: std::cell::LazyCell = std::cell::LazyCell::new(|| unsafe { 0_i32 }); #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p4_friend_definition_defines_earlier_friend_declaration_DeclaresFriend {} pub unsafe fn shared_friend_24() -> i32 { @@ -514,15 +412,7 @@ pub unsafe fn shared_friend_24() -> i32 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p4_friend_definition_defines_earlier_friend_declaration_DefinesFriend {} pub unsafe fn test_25() { @@ -553,15 +443,7 @@ pub static mut function_calls_31: std::cell::LazyCell = std::cell::LazyCell::new(|| unsafe { 0_i32 }); #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p4_2_class_and_function_share_name_Reading { pub value: i32, @@ -580,15 +462,7 @@ pub unsafe fn test_33() { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p4_2_class_and_variable_share_name_Limit { pub value: i32, diff --git a/tests/std/basic/basic.start/out/refcount/basic.start.term.rs b/tests/std/basic/basic.start/out/refcount/basic.start.term.rs index 1f88e9c135..8feb0f56e8 100644 --- a/tests/std/basic/basic.start/out/refcount/basic.start.term.rs +++ b/tests/std/basic/basic.start/out/refcount/basic.start.term.rs @@ -28,17 +28,7 @@ pub struct HoldsTracker { pub member: Tracker, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct TriviallyDestructible { @@ -128,17 +118,7 @@ thread_local!( Rc::new(RefCell::new(TriviallyDestructible { value: 6 })); ); #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct p3_reverse_completion_order_WithStaticMember {} diff --git a/tests/std/basic/basic.start/out/unsafe/basic.start.term.rs b/tests/std/basic/basic.start/out/unsafe/basic.start.term.rs index 1ceaee2910..6b3236d7bb 100644 --- a/tests/std/basic/basic.start/out/unsafe/basic.start.term.rs +++ b/tests/std/basic/basic.start/out/unsafe/basic.start.term.rs @@ -35,15 +35,7 @@ pub struct HoldsTracker { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct TriviallyDestructible { pub value: i32, @@ -135,15 +127,7 @@ pub static mut trivial_9: std::cell::LazyCell = std::cell::LazyCell::new(|| unsafe { TriviallyDestructible { value: 6 } }); #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p3_reverse_completion_order_WithStaticMember {} pub static mut member_10: std::cell::LazyCell = std::cell::LazyCell::new(|| unsafe { diff --git a/tests/std/basic/basic.types/out/refcount/basic.types.general.rs b/tests/std/basic/basic.types/out/refcount/basic.types.general.rs index 3005814bb7..c5524401a6 100644 --- a/tests/std/basic/basic.types/out/refcount/basic.types.general.rs +++ b/tests/std/basic/basic.types/out/refcount/basic.types.general.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct p2_pointer_to_data_member_bytes_round_trip_HasTwoInts { @@ -82,17 +72,7 @@ pub fn test_0() { assert!(({ ((*null_pm.borrow()) == -1_isize) })); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct p3_pointer_to_data_member_bytes_copied_to_other_object_HasTwoInts { diff --git a/tests/std/basic/basic.types/out/unsafe/basic.types.general.rs b/tests/std/basic/basic.types/out/unsafe/basic.types.general.rs index 709fe23bfe..ad9e65e93e 100644 --- a/tests/std/basic/basic.types/out/unsafe/basic.types.general.rs +++ b/tests/std/basic/basic.types/out/unsafe/basic.types.general.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p2_pointer_to_data_member_bytes_round_trip_HasTwoInts { pub first: i32, @@ -87,15 +79,7 @@ pub unsafe fn test_0() { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p3_pointer_to_data_member_bytes_copied_to_other_object_HasTwoInts { pub first: i32, diff --git a/tests/std/class/class.init/out/refcount/class.base.init.rs b/tests/std/class/class.init/out/refcount/class.base.init.rs index cebf9ba41a..4bbd0595b0 100644 --- a/tests/std/class/class.init/out/refcount/class.base.init.rs +++ b/tests/std/class/class.init/out/refcount/class.base.init.rs @@ -15,9 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, CppFrom, - Destructible, TriviallyCopyable, - Copyable, Default, )] #[cpp_from(i32, construct, value)] diff --git a/tests/std/class/class.init/out/unsafe/class.base.init.rs b/tests/std/class/class.init/out/unsafe/class.base.init.rs index bd7c07df2e..6d9d473641 100644 --- a/tests/std/class/class.init/out/unsafe/class.base.init.rs +++ b/tests/std/class/class.init/out/unsafe/class.base.init.rs @@ -14,9 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, - DestructibleUnsafe, TriviallyCopyableUnsafe, - CopyableUnsafe, Default, )] #[cpp_from(i32, construct, value)] diff --git a/tests/std/class/class.mem/class.conv/out/refcount/class.conv.ctor.rs b/tests/std/class/class.mem/class.conv/out/refcount/class.conv.ctor.rs index 1fe894b703..7c57795151 100644 --- a/tests/std/class/class.mem/class.conv/out/refcount/class.conv.ctor.rs +++ b/tests/std/class/class.mem/class.conv/out/refcount/class.conv.ctor.rs @@ -15,9 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, CppFrom, - Destructible, TriviallyCopyable, - Copyable, Default, )] #[cpp_from(i32, construct_2, value)] diff --git a/tests/std/class/class.mem/class.conv/out/refcount/class.conv.fct.rs b/tests/std/class/class.mem/class.conv/out/refcount/class.conv.fct.rs index c4d37e8f4b..a342e525ff 100644 --- a/tests/std/class/class.mem/class.conv/out/refcount/class.conv.fct.rs +++ b/tests/std/class/class.mem/class.conv/out/refcount/class.conv.fct.rs @@ -15,9 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, CppFrom, - Destructible, TriviallyCopyable, - Copyable, Default, )] #[cpp_into(i64, to_i64, mut_ptr)] diff --git a/tests/std/class/class.mem/class.conv/out/unsafe/class.conv.ctor.rs b/tests/std/class/class.mem/class.conv/out/unsafe/class.conv.ctor.rs index 62c9e26469..69d9479e89 100644 --- a/tests/std/class/class.mem/class.conv/out/unsafe/class.conv.ctor.rs +++ b/tests/std/class/class.mem/class.conv/out/unsafe/class.conv.ctor.rs @@ -19,9 +19,7 @@ impl p1_template_constructor_from_own_type_Probe { FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, - DestructibleUnsafe, TriviallyCopyableUnsafe, - CopyableUnsafe, Default, )] #[cpp_from(i32, construct_2, value)] diff --git a/tests/std/class/class.mem/class.conv/out/unsafe/class.conv.fct.rs b/tests/std/class/class.mem/class.conv/out/unsafe/class.conv.fct.rs index 6b2dc69593..2593310235 100644 --- a/tests/std/class/class.mem/class.conv/out/unsafe/class.conv.fct.rs +++ b/tests/std/class/class.mem/class.conv/out/unsafe/class.conv.fct.rs @@ -14,9 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, - DestructibleUnsafe, TriviallyCopyableUnsafe, - CopyableUnsafe, Default, )] #[cpp_into(i64, to_i64, mut_ptr)] diff --git a/tests/std/class/class.mem/out/refcount/class.free.rs b/tests/std/class/class.mem/out/refcount/class.free.rs index 4c090cf1ca..a146bd27b8 100644 --- a/tests/std/class/class.mem/out/refcount/class.free.rs +++ b/tests/std/class/class.mem/out/refcount/class.free.rs @@ -10,17 +10,7 @@ thread_local!( pub static allocations_0: Value = Rc::new(RefCell::new(0)); ); #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct p1_allocation_function_is_static_Allocates {} @@ -59,17 +49,7 @@ thread_local!( pub static deallocations_2: Value = Rc::new(RefCell::new(0)); ); #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct p3_deallocation_function_is_static_Deallocates {} diff --git a/tests/std/class/class.mem/out/refcount/class.mem.general.rs b/tests/std/class/class.mem/out/refcount/class.mem.general.rs index 3a7f3f07a0..410c047517 100644 --- a/tests/std/class/class.mem/out/refcount/class.mem.general.rs +++ b/tests/std/class/class.mem/out/refcount/class.mem.general.rs @@ -14,18 +14,7 @@ pub fn minimum_1() -> i32 { } pub type anon_2 = u32; pub const anon_2_reserve: anon_2 = 30; -#[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(4)] pub struct p7_1_function_body_names_later_member_HasLaterMembers { #[offset(0)] @@ -54,18 +43,7 @@ thread_local!( thread_local!( pub static step_5: Value = Rc::new(RefCell::new(4)); ); -#[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(4)] pub struct p7_2_default_argument_names_later_member_HasLaterStaticStep { #[offset(0)] diff --git a/tests/std/class/class.mem/out/unsafe/class.free.rs b/tests/std/class/class.mem/out/unsafe/class.free.rs index b8e5fe53a6..100772f4b3 100644 --- a/tests/std/class/class.mem/out/unsafe/class.free.rs +++ b/tests/std/class/class.mem/out/unsafe/class.free.rs @@ -9,15 +9,7 @@ use std::rc::Rc; pub static mut allocations_0: std::cell::LazyCell = std::cell::LazyCell::new(|| unsafe { 0 }); #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p1_allocation_function_is_static_Allocates {} impl p1_allocation_function_is_static_Allocates { @@ -53,15 +45,7 @@ pub static mut deallocations_2: std::cell::LazyCell = std::cell::LazyCell::new(|| unsafe { 0 }); #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p3_deallocation_function_is_static_Deallocates {} impl p3_deallocation_function_is_static_Deallocates { diff --git a/tests/std/class/class.mem/out/unsafe/class.mem.general.rs b/tests/std/class/class.mem/out/unsafe/class.mem.general.rs index f935db7341..caab392d1f 100644 --- a/tests/std/class/class.mem/out/unsafe/class.mem.general.rs +++ b/tests/std/class/class.mem/out/unsafe/class.mem.general.rs @@ -13,16 +13,7 @@ pub unsafe fn minimum_1() -> i32 { pub type anon_2 = u32; pub const anon_2_reserve: anon_2 = 30; #[repr(C)] -#[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct p7_1_function_body_names_later_member_HasLaterMembers { pub stock: i32, } @@ -55,16 +46,7 @@ pub unsafe fn test_3() { pub static mut step_4: std::cell::LazyCell = std::cell::LazyCell::new(|| unsafe { 100 }); pub static mut step_5: std::cell::LazyCell = std::cell::LazyCell::new(|| unsafe { 4 }); #[repr(C)] -#[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct p7_2_default_argument_names_later_member_HasLaterStaticStep { pub total: i32, } diff --git a/tests/std/dcl.dcl/dcl.decl/dcl.init/out/refcount/dcl.init.general-p6.2-padding-bits.rs b/tests/std/dcl.dcl/dcl.decl/dcl.init/out/refcount/dcl.init.general-p6.2-padding-bits.rs index f476717a10..2a5d03885c 100644 --- a/tests/std/dcl.dcl/dcl.decl/dcl.init/out/refcount/dcl.init.general-p6.2-padding-bits.rs +++ b/tests/std/dcl.dcl/dcl.decl/dcl.init/out/refcount/dcl.init.general-p6.2-padding-bits.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct p6_2_zero_initialized_padding_Padded { @@ -27,17 +17,7 @@ pub struct p6_2_zero_initialized_padding_Padded { pub number: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct p6_2_zero_initialized_padding_TailPadded { @@ -47,17 +27,7 @@ pub struct p6_2_zero_initialized_padding_TailPadded { pub letter: i8, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(16)] pub struct p6_2_zero_initialized_padding_HoldsPadded { diff --git a/tests/std/dcl.dcl/dcl.decl/dcl.init/out/refcount/dcl.init.general.rs b/tests/std/dcl.dcl/dcl.decl/dcl.init/out/refcount/dcl.init.general.rs index 2282bc8119..d93c00cb5b 100644 --- a/tests/std/dcl.dcl/dcl.decl/dcl.init/out/refcount/dcl.init.general.rs +++ b/tests/std/dcl.dcl/dcl.decl/dcl.init/out/refcount/dcl.init.general.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct p6_1_zero_initialized_pointer_to_member_HasTwoInts { @@ -26,18 +16,7 @@ pub struct p6_1_zero_initialized_pointer_to_member_HasTwoInts { #[offset(4)] pub second: i32, } -#[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(8)] pub struct p6_1_zero_initialized_pointer_to_member_HoldsSelector { #[offset(0)] @@ -135,16 +114,7 @@ thread_local!( static counter_11: Value = Rc::new(RefCell::new(0_i32)); ); #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(24)] pub struct p6_2_zero_initialized_class_Inner { @@ -156,17 +126,7 @@ pub struct p6_2_zero_initialized_class_Inner { #[byte_size(8)] pub pointer: Ptr, } -#[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(96)] pub struct p6_2_zero_initialized_class_Outer { #[offset(0)] @@ -237,9 +197,7 @@ pub fn test_15() { ({ check_14((heap_outer).clone()) }); heap_outer.delete(); } -#[derive( - VaArg, FnPtrArg, Destructible, TriviallyCopyable, Copyable, ByteRepr, Clone, ZeroInitialization, -)] +#[derive(VaArg, FnPtrArg, TriviallyCopyable, ByteRepr, Clone, ZeroInitialization)] #[byte_size(8)] pub struct p6_3_zero_initialized_union_Number { #[offset(0)] @@ -277,17 +235,7 @@ pub fn test_17() { assert!(((p6_3_zero_initialized_union_Number::integer(value_number.as_pointer()).read()) == 0)); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct p6_4_zero_initialized_array_Pair { @@ -392,18 +340,7 @@ pub fn test_21() { } heap_numbers.delete(); } -#[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(8)] pub struct p9_1_2_zero_then_default_initialized_WithDefaultMember { #[offset(0)] @@ -421,18 +358,7 @@ impl Default for p9_1_2_zero_then_default_initialized_WithDefaultMember { } } } -#[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(4)] pub struct p9_1_2_zero_then_default_initialized_LeavesMemberAlone { #[offset(0)] @@ -455,17 +381,7 @@ impl Default for p9_1_2_zero_then_default_initialized_LeavesMemberAlone { } } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct p9_1_2_zero_then_default_initialized_HoldsLeavesMemberAlone { diff --git a/tests/std/dcl.dcl/dcl.decl/dcl.init/out/unsafe/dcl.init.general-p6.2-padding-bits.rs b/tests/std/dcl.dcl/dcl.decl/dcl.init/out/unsafe/dcl.init.general-p6.2-padding-bits.rs index 2cd198bf83..b929604cbe 100644 --- a/tests/std/dcl.dcl/dcl.decl/dcl.init/out/unsafe/dcl.init.general-p6.2-padding-bits.rs +++ b/tests/std/dcl.dcl/dcl.decl/dcl.init/out/unsafe/dcl.init.general-p6.2-padding-bits.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p6_2_zero_initialized_padding_Padded { pub letter: libc::c_char, @@ -24,15 +16,7 @@ pub struct p6_2_zero_initialized_padding_Padded { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p6_2_zero_initialized_padding_TailPadded { pub number: i32, @@ -40,15 +24,7 @@ pub struct p6_2_zero_initialized_padding_TailPadded { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p6_2_zero_initialized_padding_HoldsPadded { pub letter: libc::c_char, diff --git a/tests/std/dcl.dcl/dcl.decl/dcl.init/out/unsafe/dcl.init.general.rs b/tests/std/dcl.dcl/dcl.decl/dcl.init/out/unsafe/dcl.init.general.rs index 43a6942612..2f81b8a6b5 100644 --- a/tests/std/dcl.dcl/dcl.decl/dcl.init/out/unsafe/dcl.init.general.rs +++ b/tests/std/dcl.dcl/dcl.decl/dcl.init/out/unsafe/dcl.init.general.rs @@ -8,31 +8,14 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p6_1_zero_initialized_pointer_to_member_HasTwoInts { pub first: i32, pub second: i32, } #[repr(C)] -#[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct p6_1_zero_initialized_pointer_to_member_HoldsSelector { pub selector: isize, } @@ -127,15 +110,7 @@ pub unsafe fn test_12() { static mut counter_11: std::cell::LazyCell = std::cell::LazyCell::new(|| unsafe { 0_i32 }); #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p6_2_zero_initialized_class_Inner { pub number: i32, @@ -144,15 +119,7 @@ pub struct p6_2_zero_initialized_class_Inner { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p6_2_zero_initialized_class_Outer { pub letter: libc::c_char, @@ -205,16 +172,7 @@ pub unsafe fn test_15() { }; } #[repr(C)] -#[derive( - Copy, - Clone, - FnPtrArg, - VaArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub union p6_3_zero_initialized_union_Number { pub integer: i32, pub bytes: [libc::c_char; 8], @@ -234,15 +192,7 @@ pub unsafe fn test_17() { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p6_4_zero_initialized_array_Pair { pub first: i32, @@ -333,16 +283,7 @@ pub unsafe fn test_21() { }; } #[repr(C)] -#[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct p9_1_2_zero_then_default_initialized_WithDefaultMember { pub zeroed: i32, pub five: i32, @@ -358,16 +299,7 @@ impl Default for p9_1_2_zero_then_default_initialized_WithDefaultMember { } } #[repr(C)] -#[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct p9_1_2_zero_then_default_initialized_LeavesMemberAlone { pub untouched: i32, } @@ -390,15 +322,7 @@ impl Default for p9_1_2_zero_then_default_initialized_LeavesMemberAlone { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p9_1_2_zero_then_default_initialized_HoldsLeavesMemberAlone { pub number: i32, diff --git a/tests/std/dcl.dcl/dcl.decl/dcl.meaning/out/refcount/dcl.array.rs b/tests/std/dcl.dcl/dcl.decl/dcl.meaning/out/refcount/dcl.array.rs index 81a991e9f4..9c6861d953 100644 --- a/tests/std/dcl.dcl/dcl.decl/dcl.meaning/out/refcount/dcl.array.rs +++ b/tests/std/dcl.dcl/dcl.decl/dcl.meaning/out/refcount/dcl.array.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(12)] pub struct p6_array_of_pointers_to_data_members_HasThreeInts { diff --git a/tests/std/dcl.dcl/dcl.decl/dcl.meaning/out/refcount/dcl.fct.default.rs b/tests/std/dcl.dcl/dcl.decl/dcl.meaning/out/refcount/dcl.fct.default.rs index 5e68471cda..3c3fa06825 100644 --- a/tests/std/dcl.dcl/dcl.decl/dcl.meaning/out/refcount/dcl.fct.default.rs +++ b/tests/std/dcl.dcl/dcl.decl/dcl.meaning/out/refcount/dcl.fct.default.rs @@ -54,18 +54,7 @@ thread_local!( thread_local!( pub static step_10: Value = Rc::new(RefCell::new(4)); ); -#[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(4)] pub struct p9_static_member_hides_namespace_variable_HasStaticStep { #[offset(0)] @@ -117,17 +106,7 @@ pub fn combine_14(mut first: i32, mut second: i32) -> i32 { return ((first * 100) + second); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - CppFrom, - Destructible, - TriviallyCopyable, - Copyable, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, CppFrom, TriviallyCopyable, )] #[cpp_from(i32, construct, value)] #[byte_size(4)] @@ -155,18 +134,7 @@ thread_local!( ); pub type anon_16 = u32; pub const anon_16_kBonus: anon_16 = 5; -#[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(4)] pub struct p9_evaluated_each_time_called_Account { #[offset(0)] @@ -247,17 +215,7 @@ pub fn add_18(mut a: i32, mut b: i32) -> i32 { return (a + b); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct p9_not_part_of_the_type_Scale {} diff --git a/tests/std/dcl.dcl/dcl.decl/dcl.meaning/out/refcount/dcl.mptr.rs b/tests/std/dcl.dcl/dcl.decl/dcl.meaning/out/refcount/dcl.mptr.rs index 1c00967fa9..271a27fe01 100644 --- a/tests/std/dcl.dcl/dcl.decl/dcl.meaning/out/refcount/dcl.mptr.rs +++ b/tests/std/dcl.dcl/dcl.decl/dcl.meaning/out/refcount/dcl.mptr.rs @@ -6,17 +6,7 @@ use std::io::prelude::*; use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; -#[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(16)] pub struct p2_pointer_to_array_member_HasIntArray { #[offset(0)] @@ -51,17 +41,7 @@ pub fn test_0() { assert!(({ (*obj.borrow()).before } == 1)); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct p2_pointer_to_data_member_HasTwoInts { @@ -91,17 +71,7 @@ thread_local!( pub static pm_2: Value = Rc::new(RefCell::new(-1_isize)); ); #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct p2_pointer_to_member_of_incomplete_class_CompletedLater { @@ -132,17 +102,7 @@ pub fn test_3() { ); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct p2_pointer_to_member_of_pointer_to_member_type_HasTwoInts { @@ -151,18 +111,7 @@ pub struct p2_pointer_to_member_of_pointer_to_member_type_HasTwoInts { #[offset(4)] pub second: i32, } -#[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(8)] pub struct p2_pointer_to_member_of_pointer_to_member_type_HoldsSelector { #[offset(0)] diff --git a/tests/std/dcl.dcl/dcl.decl/dcl.meaning/out/unsafe/dcl.array.rs b/tests/std/dcl.dcl/dcl.decl/dcl.meaning/out/unsafe/dcl.array.rs index cd118680a2..85b7ec1a0c 100644 --- a/tests/std/dcl.dcl/dcl.decl/dcl.meaning/out/unsafe/dcl.array.rs +++ b/tests/std/dcl.dcl/dcl.decl/dcl.meaning/out/unsafe/dcl.array.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p6_array_of_pointers_to_data_members_HasThreeInts { pub first: i32, diff --git a/tests/std/dcl.dcl/dcl.decl/dcl.meaning/out/unsafe/dcl.fct.default.rs b/tests/std/dcl.dcl/dcl.decl/dcl.meaning/out/unsafe/dcl.fct.default.rs index 3a13a17cba..36b4738747 100644 --- a/tests/std/dcl.dcl/dcl.decl/dcl.meaning/out/unsafe/dcl.fct.default.rs +++ b/tests/std/dcl.dcl/dcl.decl/dcl.meaning/out/unsafe/dcl.fct.default.rs @@ -54,16 +54,7 @@ pub unsafe fn test_8() { pub static mut step_9: std::cell::LazyCell = std::cell::LazyCell::new(|| unsafe { 100 }); pub static mut step_10: std::cell::LazyCell = std::cell::LazyCell::new(|| unsafe { 4 }); #[repr(C)] -#[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct p9_static_member_hides_namespace_variable_HasStaticStep { pub total: i32, } @@ -115,15 +106,7 @@ pub unsafe fn combine_14(mut first: i32, mut second: i32) -> i32 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - CppFromUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, TriviallyCopyableUnsafe, )] #[cpp_from(i32, construct, value)] pub struct p9_evaluated_each_time_called_Widget { @@ -152,16 +135,7 @@ static mut base_15: std::cell::LazyCell = std::cell::LazyCell::new(|| unsaf pub type anon_16 = u32; pub const anon_16_kBonus: anon_16 = 5; #[repr(C)] -#[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct p9_evaluated_each_time_called_Account { pub balance: i32, } @@ -243,15 +217,7 @@ pub unsafe fn add_18(mut a: i32, mut b: i32) -> i32 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p9_not_part_of_the_type_Scale {} impl p9_not_part_of_the_type_Scale { diff --git a/tests/std/dcl.dcl/dcl.decl/dcl.meaning/out/unsafe/dcl.mptr.rs b/tests/std/dcl.dcl/dcl.decl/dcl.meaning/out/unsafe/dcl.mptr.rs index cc49395a7a..18c61cc2fe 100644 --- a/tests/std/dcl.dcl/dcl.decl/dcl.meaning/out/unsafe/dcl.mptr.rs +++ b/tests/std/dcl.dcl/dcl.decl/dcl.meaning/out/unsafe/dcl.mptr.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p2_pointer_to_array_member_HasIntArray { pub before: i32, @@ -49,15 +41,7 @@ pub unsafe fn test_0() { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p2_pointer_to_data_member_HasTwoInts { pub first: i32, @@ -97,15 +81,7 @@ pub unsafe fn test_1() { pub static mut pm_2: std::cell::LazyCell = std::cell::LazyCell::new(|| unsafe { -1_isize }); #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p2_pointer_to_member_of_incomplete_class_CompletedLater { pub first: i32, @@ -131,31 +107,14 @@ pub unsafe fn test_3() { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p2_pointer_to_member_of_pointer_to_member_type_HasTwoInts { pub first: i32, pub second: i32, } #[repr(C)] -#[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct p2_pointer_to_member_of_pointer_to_member_type_HoldsSelector { pub selector: isize, } diff --git a/tests/std/expr/conv/out/refcount/conv.mem.rs b/tests/std/expr/conv/out/refcount/conv.mem.rs index 54d0c87934..202d47048e 100644 --- a/tests/std/expr/conv/out/refcount/conv.mem.rs +++ b/tests/std/expr/conv/out/refcount/conv.mem.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct p1_null_distinct_from_first_member_HasTwoInts { diff --git a/tests/std/expr/conv/out/unsafe/conv.mem.rs b/tests/std/expr/conv/out/unsafe/conv.mem.rs index 0ac38665e8..d3311733de 100644 --- a/tests/std/expr/conv/out/unsafe/conv.mem.rs +++ b/tests/std/expr/conv/out/unsafe/conv.mem.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p1_null_distinct_from_first_member_HasTwoInts { pub first: i32, diff --git a/tests/std/expr/expr.compound/expr.post/out/refcount/expr.const.cast.rs b/tests/std/expr/expr.compound/expr.post/out/refcount/expr.const.cast.rs index a67a700ba3..fa51d3ea05 100644 --- a/tests/std/expr/expr.compound/expr.post/out/refcount/expr.const.cast.rs +++ b/tests/std/expr/expr.compound/expr.post/out/refcount/expr.const.cast.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct p4_reference_const_cast_Pair { diff --git a/tests/std/expr/expr.compound/expr.post/out/refcount/expr.reinterpret.cast-p10-result-is-unspecified.rs b/tests/std/expr/expr.compound/expr.post/out/refcount/expr.reinterpret.cast-p10-result-is-unspecified.rs index dadc9e5d7d..0ab850df8b 100644 --- a/tests/std/expr/expr.compound/expr.post/out/refcount/expr.reinterpret.cast-p10-result-is-unspecified.rs +++ b/tests/std/expr/expr.compound/expr.post/out/refcount/expr.reinterpret.cast-p10-result-is-unspecified.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct HasTwoInts { @@ -27,17 +17,7 @@ pub struct HasTwoInts { pub second: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct AlsoHasTwoInts { diff --git a/tests/std/expr/expr.compound/expr.post/out/refcount/expr.reinterpret.cast.rs b/tests/std/expr/expr.compound/expr.post/out/refcount/expr.reinterpret.cast.rs index 14612bbab3..c65e529aba 100644 --- a/tests/std/expr/expr.compound/expr.post/out/refcount/expr.reinterpret.cast.rs +++ b/tests/std/expr/expr.compound/expr.post/out/refcount/expr.reinterpret.cast.rs @@ -17,17 +17,7 @@ pub fn test_0() { assert!((((converted.read()).read()) == 7)); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct p10_null_converts_to_null_HasTwoInts { @@ -37,17 +27,7 @@ pub struct p10_null_converts_to_null_HasTwoInts { pub second: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct p10_null_converts_to_null_HasChar { @@ -60,17 +40,7 @@ pub fn test_1() { assert!(((converted) == -1_isize)); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct p10_2_data_member_round_trip_HasTwoInts { @@ -80,17 +50,7 @@ pub struct p10_2_data_member_round_trip_HasTwoInts { pub second: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct p10_2_data_member_round_trip_HasChar { diff --git a/tests/std/expr/expr.compound/expr.post/out/unsafe/expr.const.cast.rs b/tests/std/expr/expr.compound/expr.post/out/unsafe/expr.const.cast.rs index da44782183..d72d679fb2 100644 --- a/tests/std/expr/expr.compound/expr.post/out/unsafe/expr.const.cast.rs +++ b/tests/std/expr/expr.compound/expr.post/out/unsafe/expr.const.cast.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p4_reference_const_cast_Pair { pub x: i32, diff --git a/tests/std/expr/expr.compound/expr.post/out/unsafe/expr.reinterpret.cast-p10-result-is-unspecified.rs b/tests/std/expr/expr.compound/expr.post/out/unsafe/expr.reinterpret.cast-p10-result-is-unspecified.rs index 40ce4db7a9..65184ac4c7 100644 --- a/tests/std/expr/expr.compound/expr.post/out/unsafe/expr.reinterpret.cast-p10-result-is-unspecified.rs +++ b/tests/std/expr/expr.compound/expr.post/out/unsafe/expr.reinterpret.cast-p10-result-is-unspecified.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct HasTwoInts { pub first: i32, @@ -24,15 +16,7 @@ pub struct HasTwoInts { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct AlsoHasTwoInts { pub first: i32, diff --git a/tests/std/expr/expr.compound/expr.post/out/unsafe/expr.reinterpret.cast.rs b/tests/std/expr/expr.compound/expr.post/out/unsafe/expr.reinterpret.cast.rs index 5c237214d5..0e85f5b1d4 100644 --- a/tests/std/expr/expr.compound/expr.post/out/unsafe/expr.reinterpret.cast.rs +++ b/tests/std/expr/expr.compound/expr.post/out/unsafe/expr.reinterpret.cast.rs @@ -18,15 +18,7 @@ pub unsafe fn test_0() { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p10_null_converts_to_null_HasTwoInts { pub first: i32, @@ -34,15 +26,7 @@ pub struct p10_null_converts_to_null_HasTwoInts { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p10_null_converts_to_null_HasChar { pub character: libc::c_char, @@ -54,15 +38,7 @@ pub unsafe fn test_1() { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p10_2_data_member_round_trip_HasTwoInts { pub first: i32, @@ -70,15 +46,7 @@ pub struct p10_2_data_member_round_trip_HasTwoInts { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p10_2_data_member_round_trip_HasChar { pub character: libc::c_char, diff --git a/tests/std/expr/expr.compound/expr.unary/out/refcount/expr.pre.incr.rs b/tests/std/expr/expr.compound/expr.unary/out/refcount/expr.pre.incr.rs index f6eeef19a9..b078a4b6ef 100644 --- a/tests/std/expr/expr.compound/expr.unary/out/refcount/expr.pre.incr.rs +++ b/tests/std/expr/expr.compound/expr.unary/out/refcount/expr.pre.incr.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct p1_result_is_updated_operand_Counter { diff --git a/tests/std/expr/expr.compound/expr.unary/out/refcount/expr.unary.op.rs b/tests/std/expr/expr.compound/expr.unary/out/refcount/expr.unary.op.rs index 4c2cc4937a..13231d9f2f 100644 --- a/tests/std/expr/expr.compound/expr.unary/out/refcount/expr.unary.op.rs +++ b/tests/std/expr/expr.compound/expr.unary/out/refcount/expr.unary.op.rs @@ -13,17 +13,7 @@ thread_local!( pub static calls_1: Value = Rc::new(RefCell::new(0)); ); #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct p3_2_static_member_is_ordinary_pointer_HasStaticMembers {} @@ -43,17 +33,7 @@ pub fn test_2() { assert!((calls_1.with(|rc| *rc.borrow()) == 1)); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct p3_2_explicit_object_member_is_ordinary_pointer_HasExplicitObjectMember { @@ -71,17 +51,7 @@ pub fn test_3() { assert!((({ function_pointer.call(object.as_pointer(), 1,) }) == 6)); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct p4_parenthesized_qualified_id_is_object_pointer_TakesAddressOfOwnMember { diff --git a/tests/std/expr/expr.compound/expr.unary/out/unsafe/expr.pre.incr.rs b/tests/std/expr/expr.compound/expr.unary/out/unsafe/expr.pre.incr.rs index edf0bce047..4744f7e936 100644 --- a/tests/std/expr/expr.compound/expr.unary/out/unsafe/expr.pre.incr.rs +++ b/tests/std/expr/expr.compound/expr.unary/out/unsafe/expr.pre.incr.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p1_result_is_updated_operand_Counter { pub n: i32, diff --git a/tests/std/expr/expr.compound/expr.unary/out/unsafe/expr.unary.op.rs b/tests/std/expr/expr.compound/expr.unary/out/unsafe/expr.unary.op.rs index 61e5bfe95c..d79d26d005 100644 --- a/tests/std/expr/expr.compound/expr.unary/out/unsafe/expr.unary.op.rs +++ b/tests/std/expr/expr.compound/expr.unary/out/unsafe/expr.unary.op.rs @@ -10,15 +10,7 @@ pub static mut shared_0: std::cell::LazyCell = std::cell::LazyCell::new(|| pub static mut calls_1: std::cell::LazyCell = std::cell::LazyCell::new(|| unsafe { 0 }); #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p3_2_static_member_is_ordinary_pointer_HasStaticMembers {} impl p3_2_static_member_is_ordinary_pointer_HasStaticMembers { @@ -39,15 +31,7 @@ pub unsafe fn test_2() { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p3_2_explicit_object_member_is_ordinary_pointer_HasExplicitObjectMember { pub base: i32, @@ -75,15 +59,7 @@ pub unsafe fn test_3() { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p4_parenthesized_qualified_id_is_object_pointer_TakesAddressOfOwnMember { pub value: i32, diff --git a/tests/std/expr/expr.compound/out/refcount/expr.cond.rs b/tests/std/expr/expr.compound/out/refcount/expr.cond.rs index 66ff0e23a1..8dec3dac8e 100644 --- a/tests/std/expr/expr.compound/out/refcount/expr.cond.rs +++ b/tests/std/expr/expr.compound/out/refcount/expr.cond.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct p7_4_pointer_to_member_and_null_HasTwoInts { diff --git a/tests/std/expr/expr.compound/out/refcount/expr.eq.rs b/tests/std/expr/expr.compound/out/refcount/expr.eq.rs index 8248902714..e6c1918807 100644 --- a/tests/std/expr/expr.compound/out/refcount/expr.eq.rs +++ b/tests/std/expr/expr.compound/out/refcount/expr.eq.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct p4_1_both_null_HasTwoInts { @@ -33,17 +23,7 @@ pub fn test_0() { assert!(!(first_null != second_null)); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct p4_2_one_null_HasTwoInts { @@ -60,9 +40,7 @@ pub fn test_1() { assert!((null_pm != first_pm)); assert!(!(null_pm == first_pm)); } -#[derive( - VaArg, FnPtrArg, Destructible, TriviallyCopyable, Copyable, ByteRepr, Clone, ZeroInitialization, -)] +#[derive(VaArg, FnPtrArg, TriviallyCopyable, ByteRepr, Clone, ZeroInitialization)] #[byte_size(4)] pub struct p4_5_members_of_same_union_HasTwoIntMembers { #[offset(0)] @@ -92,17 +70,7 @@ pub fn test_2() { assert!(!(first_pm != second_pm)); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct p4_6_data_members_HasTwoInts { diff --git a/tests/std/expr/expr.compound/out/refcount/expr.mptr.oper-p6-null-pointer-to-data-member.rs b/tests/std/expr/expr.compound/out/refcount/expr.mptr.oper-p6-null-pointer-to-data-member.rs index 328236b90e..6b5d7fe003 100644 --- a/tests/std/expr/expr.compound/out/refcount/expr.mptr.oper-p6-null-pointer-to-data-member.rs +++ b/tests/std/expr/expr.compound/out/refcount/expr.mptr.oper-p6-null-pointer-to-data-member.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct HasTwoInts { diff --git a/tests/std/expr/expr.compound/out/refcount/expr.mptr.oper.rs b/tests/std/expr/expr.compound/out/refcount/expr.mptr.oper.rs index 1cf58897bc..0b63569205 100644 --- a/tests/std/expr/expr.compound/out/refcount/expr.mptr.oper.rs +++ b/tests/std/expr/expr.compound/out/refcount/expr.mptr.oper.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct p3_arrow_star_HasTwoInts { @@ -40,17 +30,7 @@ pub fn test_0() { assert!((((p).member::(pm)) == ((p).member::(pm)))); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct p4_object_expression_sequenced_first_HasValue { @@ -94,17 +74,7 @@ pub fn test_7() { assert!((member_stamp_3.with(|rc| *rc.borrow()) == 2)); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct p6_data_member_of_lvalue_is_lvalue_HasTwoInts { diff --git a/tests/std/expr/expr.compound/out/unsafe/expr.cond.rs b/tests/std/expr/expr.compound/out/unsafe/expr.cond.rs index 300a87338a..4663247295 100644 --- a/tests/std/expr/expr.compound/out/unsafe/expr.cond.rs +++ b/tests/std/expr/expr.compound/out/unsafe/expr.cond.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p7_4_pointer_to_member_and_null_HasTwoInts { pub first: i32, diff --git a/tests/std/expr/expr.compound/out/unsafe/expr.eq.rs b/tests/std/expr/expr.compound/out/unsafe/expr.eq.rs index 48feb34d19..9bd05e74e7 100644 --- a/tests/std/expr/expr.compound/out/unsafe/expr.eq.rs +++ b/tests/std/expr/expr.compound/out/unsafe/expr.eq.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p4_1_both_null_HasTwoInts { pub first: i32, @@ -30,15 +22,7 @@ pub unsafe fn test_0() { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p4_2_one_null_HasTwoInts { pub first: i32, @@ -53,16 +37,7 @@ pub unsafe fn test_1() { assert!(!((null_pm) == (first_pm))); } #[repr(C)] -#[derive( - Copy, - Clone, - FnPtrArg, - VaArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub union p4_5_members_of_same_union_HasTwoIntMembers { pub first: i32, pub second: i32, @@ -80,15 +55,7 @@ pub unsafe fn test_2() { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p4_6_data_members_HasTwoInts { pub first: i32, diff --git a/tests/std/expr/expr.compound/out/unsafe/expr.mptr.oper-p6-null-pointer-to-data-member.rs b/tests/std/expr/expr.compound/out/unsafe/expr.mptr.oper-p6-null-pointer-to-data-member.rs index cb03b4a677..0ccbfbc21f 100644 --- a/tests/std/expr/expr.compound/out/unsafe/expr.mptr.oper-p6-null-pointer-to-data-member.rs +++ b/tests/std/expr/expr.compound/out/unsafe/expr.mptr.oper-p6-null-pointer-to-data-member.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct HasTwoInts { pub first: i32, diff --git a/tests/std/expr/expr.compound/out/unsafe/expr.mptr.oper.rs b/tests/std/expr/expr.compound/out/unsafe/expr.mptr.oper.rs index e10b027388..7b774d73ec 100644 --- a/tests/std/expr/expr.compound/out/unsafe/expr.mptr.oper.rs +++ b/tests/std/expr/expr.compound/out/unsafe/expr.mptr.oper.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p3_arrow_star_HasTwoInts { pub first: i32, @@ -42,15 +34,7 @@ pub unsafe fn test_0() { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p4_object_expression_sequenced_first_HasValue { pub value: i32, @@ -86,15 +70,7 @@ pub unsafe fn test_7() { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p6_data_member_of_lvalue_is_lvalue_HasTwoInts { pub first: i32, diff --git a/tests/std/expr/expr.prim/out/refcount/expr.prim.this.rs b/tests/std/expr/expr.prim/out/refcount/expr.prim.this.rs index 445566aeef..2e54a73cc6 100644 --- a/tests/std/expr/expr.prim/out/refcount/expr.prim.this.rs +++ b/tests/std/expr/expr.prim/out/refcount/expr.prim.this.rs @@ -7,16 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - CppFrom, - Destructible, - TriviallyCopyable, - Copyable, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, CppFrom, TriviallyCopyable, )] #[cpp_from(i32, construct, value)] #[byte_size(16)] @@ -47,9 +38,7 @@ pub fn test_0() { VaArg, FnPtrArg, CppFrom, - Destructible, TriviallyCopyable, - Copyable, Default, )] #[cpp_from(i32, construct, value)] diff --git a/tests/std/expr/expr.prim/out/unsafe/expr.prim.this.rs b/tests/std/expr/expr.prim/out/unsafe/expr.prim.this.rs index 2cd0690628..f354f67d38 100644 --- a/tests/std/expr/expr.prim/out/unsafe/expr.prim.this.rs +++ b/tests/std/expr/expr.prim/out/unsafe/expr.prim.this.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - CppFromUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, TriviallyCopyableUnsafe, )] #[cpp_from(i32, construct, value)] pub struct p1_default_member_initializer_names_object_Holder { @@ -51,9 +43,7 @@ pub unsafe fn test_0() { FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, - DestructibleUnsafe, TriviallyCopyableUnsafe, - CopyableUnsafe, Default, )] #[cpp_from(i32, construct, value)] diff --git a/tests/std/library/requirements/utility.requirements/allocator.requirements/out/refcount/allocator.requirements.general.rs b/tests/std/library/requirements/utility.requirements/allocator.requirements/out/refcount/allocator.requirements.general.rs index 5ae20a7984..e5ee0965ec 100644 --- a/tests/std/library/requirements/utility.requirements/allocator.requirements/out/refcount/allocator.requirements.general.rs +++ b/tests/std/library/requirements/utility.requirements/allocator.requirements/out/refcount/allocator.requirements.general.rs @@ -7,32 +7,11 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct p16_rebind_member_Alloc_std_pair_const_int__int___rebind_std_pair_const_int__int__ {} -#[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(4)] pub struct p16_rebind_member_Alloc_std_pair_const_int__int__ { #[offset(0)] @@ -67,17 +46,7 @@ pub fn test_0() { assert!(({ ((*n.borrow()).len() == 1_usize) })); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct p18_rebind_to_container_node_Alloc_std_pair_const_int__int__ {} diff --git a/tests/std/library/requirements/utility.requirements/allocator.requirements/out/unsafe/allocator.requirements.general.rs b/tests/std/library/requirements/utility.requirements/allocator.requirements/out/unsafe/allocator.requirements.general.rs index 826c78329a..b6827e40a8 100644 --- a/tests/std/library/requirements/utility.requirements/allocator.requirements/out/unsafe/allocator.requirements.general.rs +++ b/tests/std/library/requirements/utility.requirements/allocator.requirements/out/unsafe/allocator.requirements.general.rs @@ -8,28 +8,11 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p16_rebind_member_Alloc_std_pair_const_int__int___rebind_std_pair_const_int__int__ {} #[repr(C)] -#[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct p16_rebind_member_Alloc_std_pair_const_int__int__ { pub id: i32, } @@ -64,15 +47,7 @@ pub unsafe fn test_0() { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p18_rebind_to_container_node_Alloc_std_pair_const_int__int__ {} pub unsafe fn test_1() { diff --git a/tests/std/temp/out/refcount/temp.type.rs b/tests/std/temp/out/refcount/temp.type.rs index e774e6ad73..c79f313bee 100644 --- a/tests/std/temp/out/refcount/temp.type.rs +++ b/tests/std/temp/out/refcount/temp.type.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct p2_6_pointer_to_member_argument_HasTwoInts { @@ -30,17 +20,7 @@ thread_local!( pub static count_0: Value = Rc::new(RefCell::new(0)); ); #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct p2_6_pointer_to_member_argument_CountsPerMember_refp2_6_pointer_to_member_argument_HasTwoInts_first_ @@ -49,17 +29,7 @@ thread_local!( pub static count_1: Value = Rc::new(RefCell::new(0)); ); #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct p2_6_pointer_to_member_argument_CountsPerMember_refp2_6_pointer_to_member_argument_HasTwoInts_second_ @@ -68,17 +38,7 @@ thread_local!( pub static count_2: Value = Rc::new(RefCell::new(0)); ); #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct p2_6_pointer_to_member_argument_CountsPerMember_nullptr_ {} diff --git a/tests/std/temp/out/unsafe/temp.type.rs b/tests/std/temp/out/unsafe/temp.type.rs index f0888a77cb..bea9cdbfc9 100644 --- a/tests/std/temp/out/unsafe/temp.type.rs +++ b/tests/std/temp/out/unsafe/temp.type.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p2_6_pointer_to_member_argument_HasTwoInts { pub first: i32, @@ -25,45 +17,21 @@ pub struct p2_6_pointer_to_member_argument_HasTwoInts { pub static mut count_0: std::cell::LazyCell = std::cell::LazyCell::new(|| unsafe { 0 }); #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p2_6_pointer_to_member_argument_CountsPerMember_refp2_6_pointer_to_member_argument_HasTwoInts_first_ {} pub static mut count_1: std::cell::LazyCell = std::cell::LazyCell::new(|| unsafe { 0 }); #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p2_6_pointer_to_member_argument_CountsPerMember_refp2_6_pointer_to_member_argument_HasTwoInts_second_ {} pub static mut count_2: std::cell::LazyCell = std::cell::LazyCell::new(|| unsafe { 0 }); #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p2_6_pointer_to_member_argument_CountsPerMember_nullptr_ {} pub unsafe fn test_3() { diff --git a/tests/std/temp/temp.spec/out/refcount/temp.inst.rs b/tests/std/temp/temp.spec/out/refcount/temp.inst.rs index c68c34ceb4..a0c1d9cc91 100644 --- a/tests/std/temp/temp.spec/out/refcount/temp.inst.rs +++ b/tests/std/temp/temp.spec/out/refcount/temp.inst.rs @@ -6,18 +6,7 @@ use std::io::prelude::*; use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; -#[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(4)] pub struct p2_reference_does_not_instantiate_Member { #[offset(0)] diff --git a/tests/std/temp/temp.spec/out/unsafe/temp.inst.rs b/tests/std/temp/temp.spec/out/unsafe/temp.inst.rs index 79b46da7a5..6bc1120aca 100644 --- a/tests/std/temp/temp.spec/out/unsafe/temp.inst.rs +++ b/tests/std/temp/temp.spec/out/unsafe/temp.inst.rs @@ -7,16 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] -#[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct p2_reference_does_not_instantiate_Member { pub value: i32, } diff --git a/tests/std/utilities/utility/out/refcount/forward.rs b/tests/std/utilities/utility/out/refcount/forward.rs index 8c22889c9a..7f4e4d2d44 100644 --- a/tests/std/utilities/utility/out/refcount/forward.rs +++ b/tests/std/utilities/utility/out/refcount/forward.rs @@ -13,17 +13,7 @@ pub fn test_0() { assert!((source == 1)); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct p9_move_trivially_copyable_Point { diff --git a/tests/std/utilities/utility/out/refcount/utility.as.const.rs b/tests/std/utilities/utility/out/refcount/utility.as.const.rs index 0f28a31e2f..78beb98f85 100644 --- a/tests/std/utilities/utility/out/refcount/utility.as.const.rs +++ b/tests/std/utilities/utility/out/refcount/utility.as.const.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct p1_as_const_Counter { diff --git a/tests/std/utilities/utility/out/unsafe/forward.rs b/tests/std/utilities/utility/out/unsafe/forward.rs index 979d54538f..77931edff5 100644 --- a/tests/std/utilities/utility/out/unsafe/forward.rs +++ b/tests/std/utilities/utility/out/unsafe/forward.rs @@ -14,15 +14,7 @@ pub unsafe fn test_0() { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p9_move_trivially_copyable_Point { pub x: i32, diff --git a/tests/std/utilities/utility/out/unsafe/utility.as.const.rs b/tests/std/utilities/utility/out/unsafe/utility.as.const.rs index 88fad39535..57fe1a564b 100644 --- a/tests/std/utilities/utility/out/unsafe/utility.as.const.rs +++ b/tests/std/utilities/utility/out/unsafe/utility.as.const.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p1_as_const_Counter { pub value: i32, diff --git a/tests/ub/out/refcount/ctor_ref_member.rs b/tests/ub/out/refcount/ctor_ref_member.rs index f2e22d3562..1c7a1b5590 100644 --- a/tests/ub/out/refcount/ctor_ref_member.rs +++ b/tests/ub/out/refcount/ctor_ref_member.rs @@ -14,9 +14,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, CppFrom, - Destructible, TriviallyCopyable, - Copyable, Default, )] #[cpp_from(i32, construct, ptr)] diff --git a/tests/ub/out/refcount/self_referencing_initializer.rs b/tests/ub/out/refcount/self_referencing_initializer.rs index ef35a04147..13bfba46d5 100644 --- a/tests/ub/out/refcount/self_referencing_initializer.rs +++ b/tests/ub/out/refcount/self_referencing_initializer.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct pair { diff --git a/tests/ub/out/refcount/ub6.rs b/tests/ub/out/refcount/ub6.rs index 2c3ac00898..56fd4f0be5 100644 --- a/tests/ub/out/refcount/ub6.rs +++ b/tests/ub/out/refcount/ub6.rs @@ -7,16 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(16)] pub struct Pair { diff --git a/tests/ub/out/unsafe/ctor_ref_member.rs b/tests/ub/out/unsafe/ctor_ref_member.rs index d5d9afbf33..0e0e52e6f6 100644 --- a/tests/ub/out/unsafe/ctor_ref_member.rs +++ b/tests/ub/out/unsafe/ctor_ref_member.rs @@ -14,9 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, - DestructibleUnsafe, TriviallyCopyableUnsafe, - CopyableUnsafe, Default, )] #[cpp_from(i32, construct, ptr)] diff --git a/tests/ub/out/unsafe/self_referencing_initializer.rs b/tests/ub/out/unsafe/self_referencing_initializer.rs index c6020bc9f2..3a8b2f231e 100644 --- a/tests/ub/out/unsafe/self_referencing_initializer.rs +++ b/tests/ub/out/unsafe/self_referencing_initializer.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct pair { pub a: i32, diff --git a/tests/ub/out/unsafe/ub6.rs b/tests/ub/out/unsafe/ub6.rs index 8da8753b4f..f06685299d 100644 --- a/tests/ub/out/unsafe/ub6.rs +++ b/tests/ub/out/unsafe/ub6.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Pair { pub x1: *mut i32, diff --git a/tests/unit/out/refcount/05_new.rs b/tests/unit/out/refcount/05_new.rs index 788c501c80..924b7edc4d 100644 --- a/tests/unit/out/refcount/05_new.rs +++ b/tests/unit/out/refcount/05_new.rs @@ -7,32 +7,12 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct A {} #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct D {} diff --git a/tests/unit/out/refcount/10_struct.rs b/tests/unit/out/refcount/10_struct.rs index ae7268d95a..f51b0bce8c 100644 --- a/tests/unit/out/refcount/10_struct.rs +++ b/tests/unit/out/refcount/10_struct.rs @@ -7,16 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(16)] pub struct GraphNode { @@ -27,16 +18,7 @@ pub struct GraphNode { pub next: Ptr, } #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(16)] pub struct Graph { @@ -46,17 +28,7 @@ pub struct Graph { #[byte_size(8)] pub adj: Ptr>, } -#[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(8)] pub struct Partial { #[offset(0)] @@ -73,31 +45,12 @@ impl Default for Partial { } } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct Declared {} #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(16)] pub struct S { diff --git a/tests/unit/out/refcount/addr_of_global.rs b/tests/unit/out/refcount/addr_of_global.rs index 586dfc50ff..5b4397813b 100644 --- a/tests/unit/out/refcount/addr_of_global.rs +++ b/tests/unit/out/refcount/addr_of_global.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Inner { @@ -25,16 +15,7 @@ pub struct Inner { pub value: i32, } #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Outer { diff --git a/tests/unit/out/refcount/anonymous-struct.rs b/tests/unit/out/refcount/anonymous-struct.rs index f825707da8..8ace8a102f 100644 --- a/tests/unit/out/refcount/anonymous-struct.rs +++ b/tests/unit/out/refcount/anonymous-struct.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Outer_Named { @@ -27,17 +17,7 @@ pub struct Outer_Named { pub b: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct anon_0 { @@ -47,17 +27,7 @@ pub struct anon_0 { pub d: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct anon_1 { @@ -67,17 +37,7 @@ pub struct anon_1 { pub h: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct anon_2 { @@ -87,17 +47,7 @@ pub struct anon_2 { pub f: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct anon_4 { @@ -105,17 +55,7 @@ pub struct anon_4 { pub j: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct anon_5 { @@ -123,17 +63,7 @@ pub struct anon_5 { pub k: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(12)] pub struct anon_3 { @@ -147,17 +77,7 @@ pub struct anon_3 { pub anon_5: anon_5, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(44)] pub struct Outer { @@ -223,17 +143,7 @@ fn main_0() -> i32 { return 0; } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct anon_6 { diff --git a/tests/unit/out/refcount/anonymous-struct_c.rs b/tests/unit/out/refcount/anonymous-struct_c.rs index ea4fdb1ce6..9d1ab67c4b 100644 --- a/tests/unit/out/refcount/anonymous-struct_c.rs +++ b/tests/unit/out/refcount/anonymous-struct_c.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Named { @@ -27,17 +17,7 @@ pub struct Named { pub b: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct anon_0 { @@ -47,17 +27,7 @@ pub struct anon_0 { pub d: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct anon_1 { @@ -67,17 +37,7 @@ pub struct anon_1 { pub h: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct anon_2 { @@ -87,17 +47,7 @@ pub struct anon_2 { pub f: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct anon_4 { @@ -105,17 +55,7 @@ pub struct anon_4 { pub j: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct anon_5 { @@ -123,17 +63,7 @@ pub struct anon_5 { pub k: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(12)] pub struct anon_3 { @@ -147,17 +77,7 @@ pub struct anon_3 { pub anon_5: anon_5, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(44)] pub struct Outer { @@ -229,17 +149,7 @@ fn main_0() -> i32 { return 0; } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct anon_6 { diff --git a/tests/unit/out/refcount/anonymous_enum.rs b/tests/unit/out/refcount/anonymous_enum.rs index c06a15e379..26ed8c8e5e 100644 --- a/tests/unit/out/refcount/anonymous_enum.rs +++ b/tests/unit/out/refcount/anonymous_enum.rs @@ -13,17 +13,7 @@ pub type anon_1 = u32; pub const anon_1_SECOND_A: anon_1 = 0; pub const anon_1_SECOND_B: anon_1 = 1; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct S { @@ -37,17 +27,7 @@ pub type anon_2 = u32; pub const anon_2_FIELD_A: anon_2 = 0; pub const anon_2_FIELD_B: anon_2 = 1; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct WithAnonField { diff --git a/tests/unit/out/refcount/anonymous_enum_c.rs b/tests/unit/out/refcount/anonymous_enum_c.rs index d6a66068a4..dafdff28c1 100644 --- a/tests/unit/out/refcount/anonymous_enum_c.rs +++ b/tests/unit/out/refcount/anonymous_enum_c.rs @@ -13,17 +13,7 @@ pub type anon_1 = u32; pub const anon_1_SECOND_A: anon_1 = 0; pub const anon_1_SECOND_B: anon_1 = 1; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct S { @@ -37,17 +27,7 @@ pub type anon_2 = u32; pub const anon_2_FIELD_A: anon_2 = 0; pub const anon_2_FIELD_B: anon_2 = 1; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct WithAnonField { diff --git a/tests/unit/out/refcount/any.rs b/tests/unit/out/refcount/any.rs index 950dac7819..5270704b76 100644 --- a/tests/unit/out/refcount/any.rs +++ b/tests/unit/out/refcount/any.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Point { diff --git a/tests/unit/out/refcount/array_const_init.rs b/tests/unit/out/refcount/array_const_init.rs index c98ed32b44..2422bc4a53 100644 --- a/tests/unit/out/refcount/array_const_init.rs +++ b/tests/unit/out/refcount/array_const_init.rs @@ -6,17 +6,7 @@ use std::io::prelude::*; use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; -#[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(20)] pub struct S { #[offset(0)] @@ -49,17 +39,7 @@ thread_local!( })); ); #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct P { diff --git a/tests/unit/out/refcount/array_field_addr.rs b/tests/unit/out/refcount/array_field_addr.rs index fcd9adc4bf..4786cf7a8d 100644 --- a/tests/unit/out/refcount/array_field_addr.rs +++ b/tests/unit/out/refcount/array_field_addr.rs @@ -6,17 +6,7 @@ use std::io::prelude::*; use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; -#[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(12)] pub struct S { #[offset(0)] diff --git a/tests/unit/out/refcount/array_reference.rs b/tests/unit/out/refcount/array_reference.rs index c659086375..722a013a49 100644 --- a/tests/unit/out/refcount/array_reference.rs +++ b/tests/unit/out/refcount/array_reference.rs @@ -60,17 +60,7 @@ pub fn pick_10(s: Ptr) -> Ptr { return (s).clone(); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Point { diff --git a/tests/unit/out/refcount/as_const.rs b/tests/unit/out/refcount/as_const.rs index 6789e78b94..a8fdec8e55 100644 --- a/tests/unit/out/refcount/as_const.rs +++ b/tests/unit/out/refcount/as_const.rs @@ -10,17 +10,7 @@ pub type Overload = u32; pub const Overload_kMutableOverload: Overload = 1; pub const Overload_kConstOverload: Overload = 2; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct S { diff --git a/tests/unit/out/refcount/assign_rhs_first.rs b/tests/unit/out/refcount/assign_rhs_first.rs index 797d5be9e7..c332364203 100644 --- a/tests/unit/out/refcount/assign_rhs_first.rs +++ b/tests/unit/out/refcount/assign_rhs_first.rs @@ -16,16 +16,7 @@ pub fn advance_1() -> i32 { return 10; } #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct S { diff --git a/tests/unit/out/refcount/assignment_single_eval.rs b/tests/unit/out/refcount/assignment_single_eval.rs index 6b0528d854..48a44912bd 100644 --- a/tests/unit/out/refcount/assignment_single_eval.rs +++ b/tests/unit/out/refcount/assignment_single_eval.rs @@ -811,16 +811,7 @@ pub fn test_reference_members_9() { ); } #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Slot_6 { @@ -829,16 +820,7 @@ pub struct Slot_6 { pub value: Ptr, } #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Slot_8 { @@ -847,16 +829,7 @@ pub struct Slot_8 { pub value: Ptr, } #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Slot_10 { @@ -923,16 +896,7 @@ pub fn test_pointer_elements_11() { printf!(b"pointer increments %d %d\n", (*index.borrow()), value); } #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Holder_12 { @@ -968,16 +932,7 @@ pub fn test_reference_pointer_13() { ); } #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Node_14 { @@ -1076,17 +1031,7 @@ pub fn test_reference_subfields_18() { ); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Index_16 { @@ -1094,16 +1039,7 @@ pub struct Index_16 { pub value: u32, } #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Slot_17 { @@ -1112,17 +1048,7 @@ pub struct Slot_17 { pub ref_: Ptr, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(2)] pub struct Index_19 { @@ -1130,16 +1056,7 @@ pub struct Index_19 { pub value: i16, } #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Slot_20 { @@ -1183,17 +1100,7 @@ pub fn observe_24(mut assigned: i32, mut stored: Ptr) -> i32 { return ({ assigned } + { (stored.read()) }); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct GlobalRecord_Inner { @@ -1201,17 +1108,7 @@ pub struct GlobalRecord_Inner { pub value: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct GlobalRecord { @@ -1454,17 +1351,7 @@ thread_local!( static flag_31: Value = Rc::new(RefCell::new(false)); ); #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Record_32 { @@ -1472,16 +1359,7 @@ pub struct Record_32 { pub value: i32, } #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Link_33 { @@ -1494,17 +1372,7 @@ thread_local!( Rc::new(RefCell::new(Box::new([0_u32, 20_u32, 30_u32]))); ); #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct IndexedBinding {} @@ -1741,17 +1609,7 @@ thread_local!( ]))); ); #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(12)] pub struct IndexedMember { @@ -2114,16 +1972,7 @@ thread_local!( ]))); ); #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct PointerSelector { @@ -2347,17 +2196,7 @@ pub struct Counts_59 { pub counts: Vec, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Pair_60 { @@ -2670,34 +2509,14 @@ fn main_0() -> i32 { return 0; } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Index_62 { #[offset(0)] pub value: i32, } -#[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(12)] pub struct Owner_63 { #[offset(0)] diff --git a/tests/unit/out/refcount/bounded_struct_ptr.rs b/tests/unit/out/refcount/bounded_struct_ptr.rs index 465ea56223..3de5649ccc 100644 --- a/tests/unit/out/refcount/bounded_struct_ptr.rs +++ b/tests/unit/out/refcount/bounded_struct_ptr.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Foo { diff --git a/tests/unit/out/refcount/bst.rs b/tests/unit/out/refcount/bst.rs index 2a1f84adf5..8095021ce7 100644 --- a/tests/unit/out/refcount/bst.rs +++ b/tests/unit/out/refcount/bst.rs @@ -7,16 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(24)] pub struct node_t { diff --git a/tests/unit/out/refcount/c_struct.rs b/tests/unit/out/refcount/c_struct.rs index d5778e019d..1101707966 100644 --- a/tests/unit/out/refcount/c_struct.rs +++ b/tests/unit/out/refcount/c_struct.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Point { @@ -27,17 +17,7 @@ pub struct Point { pub y: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(16)] pub struct Line { @@ -49,16 +29,7 @@ pub struct Line { pub end: Point, } #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(16)] pub struct Node { @@ -73,17 +44,7 @@ pub const Color_RED: Color = 0; pub const Color_GREEN: Color = 1; pub const Color_BLUE: Color = 2; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Inner { @@ -93,17 +54,7 @@ pub struct Inner { pub b: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(16)] pub struct Container { diff --git a/tests/unit/out/refcount/cast.rs b/tests/unit/out/refcount/cast.rs index f073501970..f753b4b78c 100644 --- a/tests/unit/out/refcount/cast.rs +++ b/tests/unit/out/refcount/cast.rs @@ -11,17 +11,7 @@ pub const E_A: E = 0; pub const E_B: E = 1; pub const E_C: E = 2; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Pair { @@ -31,17 +21,7 @@ pub struct Pair { pub y: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(64)] #[byte_align(64)] @@ -49,17 +29,7 @@ pub struct Wide { #[offset(0)] pub c: i8, } -#[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(40)] pub struct Grid { #[offset(0)] diff --git a/tests/unit/out/refcount/cast_array_to_pointer_decay.rs b/tests/unit/out/refcount/cast_array_to_pointer_decay.rs index 0250336e19..65684a8a4a 100644 --- a/tests/unit/out/refcount/cast_array_to_pointer_decay.rs +++ b/tests/unit/out/refcount/cast_array_to_pointer_decay.rs @@ -16,17 +16,7 @@ pub fn strlen_1(mut s: Ptr) -> i32 { } return c; } -#[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(12)] pub struct Row { #[offset(0)] diff --git a/tests/unit/out/refcount/class.rs b/tests/unit/out/refcount/class.rs index 3b7da676c3..c0017c288d 100644 --- a/tests/unit/out/refcount/class.rs +++ b/tests/unit/out/refcount/class.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Pair { @@ -27,17 +17,7 @@ pub struct Pair { pub second: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(16)] pub struct Route { @@ -48,17 +28,7 @@ pub struct Route { pub cost: f64, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Counter { @@ -73,17 +43,7 @@ impl CppEq for Counter { } } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Tally { diff --git a/tests/unit/out/refcount/class_template_lazy_member.rs b/tests/unit/out/refcount/class_template_lazy_member.rs index 00a73e5ea4..e5730e47cf 100644 --- a/tests/unit/out/refcount/class_template_lazy_member.rs +++ b/tests/unit/out/refcount/class_template_lazy_member.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Point { @@ -25,17 +15,7 @@ pub struct Point { pub x: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Box_int_ { @@ -43,17 +23,7 @@ pub struct Box_int_ { pub val: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Box_Point_ { @@ -62,17 +32,7 @@ pub struct Box_Point_ { pub val: Point, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Deduced_int_ { @@ -80,17 +40,7 @@ pub struct Deduced_int_ { pub val: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Deduced_Point_ { diff --git a/tests/unit/out/refcount/class_templates.rs b/tests/unit/out/refcount/class_templates.rs index a786643a3c..1338a5d044 100644 --- a/tests/unit/out/refcount/class_templates.rs +++ b/tests/unit/out/refcount/class_templates.rs @@ -70,17 +70,7 @@ pub struct MyContainer_float_ { vec_: Vec, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(2)] pub struct Boxed_short_ { @@ -93,17 +83,7 @@ impl Boxed_short_ { } } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Boxed_int_ { @@ -116,17 +96,7 @@ impl Boxed_int_ { } } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Boxed_long_ { @@ -139,17 +109,7 @@ impl Boxed_long_ { } } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Outer_int__Inner_int_ { @@ -159,17 +119,7 @@ pub struct Outer_int__Inner_int_ { pub u: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Outer_int_ { @@ -177,17 +127,7 @@ pub struct Outer_int_ { pub v: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(16)] pub struct Outer_long__Inner_int_ { @@ -197,17 +137,7 @@ pub struct Outer_long__Inner_int_ { pub u: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(16)] pub struct Outer_long__Inner_char_ { @@ -217,17 +147,7 @@ pub struct Outer_long__Inner_char_ { pub u: i8, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Outer_long_ { @@ -235,17 +155,7 @@ pub struct Outer_long_ { pub v: i64, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Elem { diff --git a/tests/unit/out/refcount/clone_vs_move.rs b/tests/unit/out/refcount/clone_vs_move.rs index ed29de5983..8ff26fa496 100644 --- a/tests/unit/out/refcount/clone_vs_move.rs +++ b/tests/unit/out/refcount/clone_vs_move.rs @@ -7,34 +7,14 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Bar { #[offset(0)] pub w: i32, } -#[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(40)] pub struct Foo { #[offset(0)] @@ -67,16 +47,7 @@ impl Default for Foo { } } #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(16)] pub struct Refs { diff --git a/tests/unit/out/refcount/comma_operator.rs b/tests/unit/out/refcount/comma_operator.rs index 6eafe2162d..01cfc91200 100644 --- a/tests/unit/out/refcount/comma_operator.rs +++ b/tests/unit/out/refcount/comma_operator.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Pair { diff --git a/tests/unit/out/refcount/complex_function.rs b/tests/unit/out/refcount/complex_function.rs index ed65724fde..17ef61eafd 100644 --- a/tests/unit/out/refcount/complex_function.rs +++ b/tests/unit/out/refcount/complex_function.rs @@ -16,17 +16,7 @@ pub fn bar_2(x: Ptr) -> Ptr { return (x).clone(); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct X1 { @@ -34,16 +24,7 @@ pub struct X1 { pub v: i32, } #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct X2 { @@ -52,16 +33,7 @@ pub struct X2 { pub v: Ptr, } #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct X3 { @@ -70,16 +42,7 @@ pub struct X3 { pub v: Ptr, } #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct X4 { diff --git a/tests/unit/out/refcount/compound_assign_paren.rs b/tests/unit/out/refcount/compound_assign_paren.rs index f9c299d748..b044d3da66 100644 --- a/tests/unit/out/refcount/compound_assign_paren.rs +++ b/tests/unit/out/refcount/compound_assign_paren.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct Item { diff --git a/tests/unit/out/refcount/concepts.rs b/tests/unit/out/refcount/concepts.rs index b834c8956e..3791914faf 100644 --- a/tests/unit/out/refcount/concepts.rs +++ b/tests/unit/out/refcount/concepts.rs @@ -12,17 +12,7 @@ const _: () = assert!( "sizeof(int) == 4" ); #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct Sized {} diff --git a/tests/unit/out/refcount/constexpr_function.rs b/tests/unit/out/refcount/constexpr_function.rs index 507412a593..abcf1d334c 100644 --- a/tests/unit/out/refcount/constexpr_function.rs +++ b/tests/unit/out/refcount/constexpr_function.rs @@ -22,17 +22,7 @@ pub fn half_3(mut x: f64) -> f64 { return (x / 2_f64); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Flag { @@ -57,17 +47,7 @@ pub fn imm_7(mut b: bool) -> bool { return b; } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct P { diff --git a/tests/unit/out/refcount/constructor.rs b/tests/unit/out/refcount/constructor.rs index 4fad947ff0..e50d70586c 100644 --- a/tests/unit/out/refcount/constructor.rs +++ b/tests/unit/out/refcount/constructor.rs @@ -26,17 +26,7 @@ impl Destructible for S { } } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - CppFrom, - Destructible, - TriviallyCopyable, - Copyable, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, CppFrom, TriviallyCopyable, )] #[cpp_from(i32, construct_1, value)] #[byte_size(8)] diff --git a/tests/unit/out/refcount/conversion_operator_same_translation.rs b/tests/unit/out/refcount/conversion_operator_same_translation.rs index 44e3943c5c..d066554edb 100644 --- a/tests/unit/out/refcount/conversion_operator_same_translation.rs +++ b/tests/unit/out/refcount/conversion_operator_same_translation.rs @@ -15,9 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, CppFrom, - Destructible, TriviallyCopyable, - Copyable, Default, )] #[cpp_into(i8, to_i8)] @@ -36,9 +34,7 @@ pub struct S { VaArg, FnPtrArg, CppFrom, - Destructible, TriviallyCopyable, - Copyable, Default, )] #[cpp_into(i64, to_i64_1)] diff --git a/tests/unit/out/refcount/copy_move_defaulted.rs b/tests/unit/out/refcount/copy_move_defaulted.rs index eddd885852..6c6dc58b73 100644 --- a/tests/unit/out/refcount/copy_move_defaulted.rs +++ b/tests/unit/out/refcount/copy_move_defaulted.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Inner { @@ -46,17 +36,7 @@ impl Default for Explicit { { ::zero_init() } } } -#[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(16)] pub struct Implicit { #[offset(0)] diff --git a/tests/unit/out/refcount/default.rs b/tests/unit/out/refcount/default.rs index 631264a1f6..9e96eabb62 100644 --- a/tests/unit/out/refcount/default.rs +++ b/tests/unit/out/refcount/default.rs @@ -6,17 +6,7 @@ use std::io::prelude::*; use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; -#[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(144)] pub struct Pointers { #[offset(0)] @@ -53,17 +43,7 @@ impl Default for Pointers { } } } -#[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(440)] pub struct SmallArrays { #[offset(0)] @@ -98,17 +78,7 @@ impl Default for SmallArrays { } } } -#[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(132)] pub struct BigArray { #[offset(0)] diff --git a/tests/unit/out/refcount/default_function_arguments.rs b/tests/unit/out/refcount/default_function_arguments.rs index 1b9f7b6e2f..0f7ac66438 100644 --- a/tests/unit/out/refcount/default_function_arguments.rs +++ b/tests/unit/out/refcount/default_function_arguments.rs @@ -13,17 +13,7 @@ pub fn baz_1(mut a: Ptr, mut b: Ptr) -> bool { return ({ a } == { b }); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - CppFrom, - Destructible, - TriviallyCopyable, - Copyable, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, CppFrom, TriviallyCopyable, )] #[cpp_from(i32, construct, value)] #[byte_size(4)] @@ -71,17 +61,7 @@ pub fn first_9(r: Ptr) -> i32 { return (elem!(r, 0).read()); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Holder_int_ { diff --git a/tests/unit/out/refcount/default_in_statics.rs b/tests/unit/out/refcount/default_in_statics.rs index 8d0e5af66b..abf994b3ed 100644 --- a/tests/unit/out/refcount/default_in_statics.rs +++ b/tests/unit/out/refcount/default_in_statics.rs @@ -7,16 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(16)] pub struct Inner { @@ -26,17 +17,7 @@ pub struct Inner { #[byte_size(8)] pub name: Ptr, } -#[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(88)] pub struct Outer { #[offset(0)] @@ -83,16 +64,7 @@ impl Default for Outer { } } #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(40)] pub struct Foo { diff --git a/tests/unit/out/refcount/destructor_params.rs b/tests/unit/out/refcount/destructor_params.rs index 18324be10c..50277ed6b3 100644 --- a/tests/unit/out/refcount/destructor_params.rs +++ b/tests/unit/out/refcount/destructor_params.rs @@ -34,17 +34,7 @@ pub fn with_default_3(s: S) -> i32 { return { (*s.borrow()).v }; } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Holder { diff --git a/tests/unit/out/refcount/doubly_linked_list.rs b/tests/unit/out/refcount/doubly_linked_list.rs index f39c96626a..63273e8129 100644 --- a/tests/unit/out/refcount/doubly_linked_list.rs +++ b/tests/unit/out/refcount/doubly_linked_list.rs @@ -7,16 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(24)] pub struct Node { diff --git a/tests/unit/out/refcount/enum_default_in_static.rs b/tests/unit/out/refcount/enum_default_in_static.rs index e2a939232f..86f5e7d381 100644 --- a/tests/unit/out/refcount/enum_default_in_static.rs +++ b/tests/unit/out/refcount/enum_default_in_static.rs @@ -11,17 +11,7 @@ pub const Mode_MODE_NONE: Mode = 0; pub const Mode_MODE_ONE: Mode = 1; pub const Mode_MODE_TWO: Mode = 2; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Config { diff --git a/tests/unit/out/refcount/enum_int_interop.rs b/tests/unit/out/refcount/enum_int_interop.rs index 80ee9934e4..829a40e61e 100644 --- a/tests/unit/out/refcount/enum_int_interop.rs +++ b/tests/unit/out/refcount/enum_int_interop.rs @@ -20,16 +20,7 @@ pub const Tag_TAG_ZERO: Tag = 0; pub const Tag_TAG_ONE: Tag = 1; pub const Tag_TAG_TWO: Tag = 2; #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(16)] pub struct Entry { diff --git a/tests/unit/out/refcount/enum_int_interop_c.rs b/tests/unit/out/refcount/enum_int_interop_c.rs index 76268186d5..42305144b2 100644 --- a/tests/unit/out/refcount/enum_int_interop_c.rs +++ b/tests/unit/out/refcount/enum_int_interop_c.rs @@ -20,16 +20,7 @@ pub const Tag_enum_TAG_ZERO: Tag_enum = 0; pub const Tag_enum_TAG_ONE: Tag_enum = 1; pub const Tag_enum_TAG_TWO: Tag_enum = 2; #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(16)] pub struct Entry { diff --git a/tests/unit/out/refcount/enum_underlying_type.rs b/tests/unit/out/refcount/enum_underlying_type.rs index d252fd6c1e..44956ab035 100644 --- a/tests/unit/out/refcount/enum_underlying_type.rs +++ b/tests/unit/out/refcount/enum_underlying_type.rs @@ -25,18 +25,7 @@ pub type Scoped = i8; pub const Scoped_NEG: Scoped = -2; pub const Scoped_POS: Scoped = 2; pub type Empty = bool; -#[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(1)] pub struct HoldsEmpty { #[offset(0)] diff --git a/tests/unit/out/refcount/exprs.rs b/tests/unit/out/refcount/exprs.rs index 2f457c8464..d032496993 100644 --- a/tests/unit/out/refcount/exprs.rs +++ b/tests/unit/out/refcount/exprs.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct X { @@ -25,16 +15,7 @@ pub struct X { pub x: i32, } #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(16)] pub struct Y { diff --git a/tests/unit/out/refcount/fft.rs b/tests/unit/out/refcount/fft.rs index ed71bc0c0f..0c940fbdac 100644 --- a/tests/unit/out/refcount/fft.rs +++ b/tests/unit/out/refcount/fft.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(16)] pub struct Complex { diff --git a/tests/unit/out/refcount/field_aliasing.rs b/tests/unit/out/refcount/field_aliasing.rs index 5b50115745..f4137d0e56 100644 --- a/tests/unit/out/refcount/field_aliasing.rs +++ b/tests/unit/out/refcount/field_aliasing.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct In { @@ -26,17 +16,7 @@ pub struct In { #[offset(4)] pub y: i32, } -#[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(32)] pub struct S { #[offset(0)] @@ -64,16 +44,7 @@ impl Default for S { } } #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(16)] pub struct Node { diff --git a/tests/unit/out/refcount/field_array_elem_ptr.rs b/tests/unit/out/refcount/field_array_elem_ptr.rs index 308dbd479b..9127c29598 100644 --- a/tests/unit/out/refcount/field_array_elem_ptr.rs +++ b/tests/unit/out/refcount/field_array_elem_ptr.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Point { @@ -26,17 +16,7 @@ pub struct Point { #[offset(4)] pub y: i32, } -#[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(48)] pub struct Shape { #[offset(0)] diff --git a/tests/unit/out/refcount/field_method_receiver.rs b/tests/unit/out/refcount/field_method_receiver.rs index 85428adc82..0a731aa1f2 100644 --- a/tests/unit/out/refcount/field_method_receiver.rs +++ b/tests/unit/out/refcount/field_method_receiver.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Counter { diff --git a/tests/unit/out/refcount/field_pointers.rs b/tests/unit/out/refcount/field_pointers.rs index 7d56d9dd53..e028ee78ca 100644 --- a/tests/unit/out/refcount/field_pointers.rs +++ b/tests/unit/out/refcount/field_pointers.rs @@ -6,17 +6,7 @@ use std::io::prelude::*; use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; -#[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(12)] pub struct Inner { #[offset(0)] @@ -37,17 +27,7 @@ impl Default for Inner { } } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Header { diff --git a/tests/unit/out/refcount/field_pointers_malloced_struct.rs b/tests/unit/out/refcount/field_pointers_malloced_struct.rs index e117ab85dc..4116a4be0d 100644 --- a/tests/unit/out/refcount/field_pointers_malloced_struct.rs +++ b/tests/unit/out/refcount/field_pointers_malloced_struct.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(12)] pub struct S { diff --git a/tests/unit/out/refcount/field_reinterpret_write_through.rs b/tests/unit/out/refcount/field_reinterpret_write_through.rs index 8613df3c01..63f42705c9 100644 --- a/tests/unit/out/refcount/field_reinterpret_write_through.rs +++ b/tests/unit/out/refcount/field_reinterpret_write_through.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct In { @@ -26,17 +16,7 @@ pub struct In { #[offset(4)] pub b: i32, } -#[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(40)] pub struct S { #[offset(0)] diff --git a/tests/unit/out/refcount/find.rs b/tests/unit/out/refcount/find.rs index 499e031ee4..6127f973e3 100644 --- a/tests/unit/out/refcount/find.rs +++ b/tests/unit/out/refcount/find.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct P { diff --git a/tests/unit/out/refcount/first_field_ptr_covers_struct.rs b/tests/unit/out/refcount/first_field_ptr_covers_struct.rs index ac72474d07..1b46246e21 100644 --- a/tests/unit/out/refcount/first_field_ptr_covers_struct.rs +++ b/tests/unit/out/refcount/first_field_ptr_covers_struct.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct In { @@ -27,17 +17,7 @@ pub struct In { pub b: i16, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(12)] pub struct S { diff --git a/tests/unit/out/refcount/first_member_downcast.rs b/tests/unit/out/refcount/first_member_downcast.rs index fc8c70e03a..5a666356f0 100644 --- a/tests/unit/out/refcount/first_member_downcast.rs +++ b/tests/unit/out/refcount/first_member_downcast.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct base { @@ -25,17 +15,7 @@ pub struct base { pub kind: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(16)] pub struct derived { diff --git a/tests/unit/out/refcount/flex_array_member_incomplete.rs b/tests/unit/out/refcount/flex_array_member_incomplete.rs index ac869765e8..ddbc62be30 100644 --- a/tests/unit/out/refcount/flex_array_member_incomplete.rs +++ b/tests/unit/out/refcount/flex_array_member_incomplete.rs @@ -6,17 +6,7 @@ use std::io::prelude::*; use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; -#[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(4)] pub struct F { #[offset(0)] diff --git a/tests/unit/out/refcount/flex_array_member_sibling_write.rs b/tests/unit/out/refcount/flex_array_member_sibling_write.rs index fff2ac3ab0..4adacb075a 100644 --- a/tests/unit/out/refcount/flex_array_member_sibling_write.rs +++ b/tests/unit/out/refcount/flex_array_member_sibling_write.rs @@ -6,17 +6,7 @@ use std::io::prelude::*; use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; -#[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(8)] pub struct S { #[offset(0)] @@ -37,17 +27,7 @@ impl Default for S { } } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct E { @@ -56,17 +36,7 @@ pub struct E { #[offset(4)] pub w: i32, } -#[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(16)] pub struct T { #[offset(0)] diff --git a/tests/unit/out/refcount/fn_ptr.rs b/tests/unit/out/refcount/fn_ptr.rs index ad2d2d6d79..701d0c6524 100644 --- a/tests/unit/out/refcount/fn_ptr.rs +++ b/tests/unit/out/refcount/fn_ptr.rs @@ -36,9 +36,7 @@ pub fn identity_hash_6(mut v: bool) -> usize { VaArg, FnPtrArg, CppFrom, - Destructible, TriviallyCopyable, - Copyable, Default, )] #[cpp_from(FnPtr u64 > , construct, ptr)] diff --git a/tests/unit/out/refcount/fn_ptr_cast.rs b/tests/unit/out/refcount/fn_ptr_cast.rs index 53536b7ade..4dc050e5b3 100644 --- a/tests/unit/out/refcount/fn_ptr_cast.rs +++ b/tests/unit/out/refcount/fn_ptr_cast.rs @@ -25,16 +25,7 @@ pub fn test_double_cast_2() { assert!(({ (fn2).clone() } == { (fn_).clone() })); } #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Command { diff --git a/tests/unit/out/refcount/fn_ptr_stable_sort.rs b/tests/unit/out/refcount/fn_ptr_stable_sort.rs index 81f74356c1..37e1c2b3b5 100644 --- a/tests/unit/out/refcount/fn_ptr_stable_sort.rs +++ b/tests/unit/out/refcount/fn_ptr_stable_sort.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Item { diff --git a/tests/unit/out/refcount/fn_ptr_struct.rs b/tests/unit/out/refcount/fn_ptr_struct.rs index 460c147916..a191b748ff 100644 --- a/tests/unit/out/refcount/fn_ptr_struct.rs +++ b/tests/unit/out/refcount/fn_ptr_struct.rs @@ -7,16 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(16)] pub struct Handler { @@ -33,17 +24,7 @@ pub fn negate_1(mut x: i32) -> i32 { return -x; } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct S {} diff --git a/tests/unit/out/refcount/fn_ptr_typedef_cast.rs b/tests/unit/out/refcount/fn_ptr_typedef_cast.rs index 4068132b3c..c65724388e 100644 --- a/tests/unit/out/refcount/fn_ptr_typedef_cast.rs +++ b/tests/unit/out/refcount/fn_ptr_typedef_cast.rs @@ -19,17 +19,7 @@ pub fn via_size_t_return_3(mut b: u64) -> usize { return (b as usize); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct pair { diff --git a/tests/unit/out/refcount/fn_ptr_vtable.rs b/tests/unit/out/refcount/fn_ptr_vtable.rs index a055ea0c93..191b4b8b12 100644 --- a/tests/unit/out/refcount/fn_ptr_vtable.rs +++ b/tests/unit/out/refcount/fn_ptr_vtable.rs @@ -7,16 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(24)] pub struct Vtable { diff --git a/tests/unit/out/refcount/fn_ref.rs b/tests/unit/out/refcount/fn_ref.rs index 9c6a659641..cf5f330954 100644 --- a/tests/unit/out/refcount/fn_ref.rs +++ b/tests/unit/out/refcount/fn_ref.rs @@ -22,16 +22,7 @@ pub fn call_forwarded_4(f: FnPtr i32>, mut x: i32) -> i32 { return ({ f.call(x) }); } #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Holder { diff --git a/tests/unit/out/refcount/friend.rs b/tests/unit/out/refcount/friend.rs index 562f996f42..815a0be998 100644 --- a/tests/unit/out/refcount/friend.rs +++ b/tests/unit/out/refcount/friend.rs @@ -19,17 +19,7 @@ pub fn scaled_3(v: Ptr, mut k: f64) -> f64 { return ({ (v.with(|__s| __s.x) as f64) } * { k }); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct V { @@ -45,17 +35,7 @@ pub fn get_4(w: Ptr) -> i32 { return w.with(|__s| __s.x); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct W_int_ { @@ -66,17 +46,7 @@ pub fn get_5(w: Ptr) -> i64 { return w.with(|__s| __s.x); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct W_long_ { @@ -84,17 +54,7 @@ pub struct W_long_ { pub x: i64, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct D { diff --git a/tests/unit/out/refcount/function_overloading.rs b/tests/unit/out/refcount/function_overloading.rs index 8c4d218dce..6cc0887eb8 100644 --- a/tests/unit/out/refcount/function_overloading.rs +++ b/tests/unit/out/refcount/function_overloading.rs @@ -22,17 +22,7 @@ pub fn bar_4(x: Ptr) -> i32 { return (x.read()); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct Foo {} diff --git a/tests/unit/out/refcount/global_call_temporaries.rs b/tests/unit/out/refcount/global_call_temporaries.rs index 627d877c20..8a0fd53eb7 100644 --- a/tests/unit/out/refcount/global_call_temporaries.rs +++ b/tests/unit/out/refcount/global_call_temporaries.rs @@ -95,17 +95,7 @@ thread_local!( })); ); #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Item { diff --git a/tests/unit/out/refcount/global_init_side_effect.rs b/tests/unit/out/refcount/global_init_side_effect.rs index e158196fc8..e93ba19d93 100644 --- a/tests/unit/out/refcount/global_init_side_effect.rs +++ b/tests/unit/out/refcount/global_init_side_effect.rs @@ -18,9 +18,7 @@ thread_local!( VaArg, FnPtrArg, CppFrom, - Destructible, TriviallyCopyable, - Copyable, Default, )] #[cpp_from(i32, construct, value)] diff --git a/tests/unit/out/refcount/global_non_const_init.rs b/tests/unit/out/refcount/global_non_const_init.rs index dbca0ec9b7..b9ca793e92 100644 --- a/tests/unit/out/refcount/global_non_const_init.rs +++ b/tests/unit/out/refcount/global_non_const_init.rs @@ -32,18 +32,7 @@ thread_local!( pub static depends_on_call_6: Value = Rc::new(RefCell::new((from_call_5.with(|rc| *rc.borrow()) + 1))); ); -#[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(4)] pub struct Ctor { #[offset(0)] @@ -89,17 +78,7 @@ thread_local!( })); ); #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct Holder {} @@ -119,18 +98,7 @@ thread_local!( Rc::try_unwrap(__v).ok().unwrap().into_inner() })); ); -#[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(4)] pub struct Singleton { #[offset(0)] diff --git a/tests/unit/out/refcount/global_pointers.rs b/tests/unit/out/refcount/global_pointers.rs index 47420f3dfe..7a522bc748 100644 --- a/tests/unit/out/refcount/global_pointers.rs +++ b/tests/unit/out/refcount/global_pointers.rs @@ -7,16 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(16)] pub struct Entry { diff --git a/tests/unit/out/refcount/global_without_initializer.rs b/tests/unit/out/refcount/global_without_initializer.rs index 5e1fc50180..b2b979c7da 100644 --- a/tests/unit/out/refcount/global_without_initializer.rs +++ b/tests/unit/out/refcount/global_without_initializer.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct S { diff --git a/tests/unit/out/refcount/goto_aggregate_default.rs b/tests/unit/out/refcount/goto_aggregate_default.rs index f388002f7e..b8386b1071 100644 --- a/tests/unit/out/refcount/goto_aggregate_default.rs +++ b/tests/unit/out/refcount/goto_aggregate_default.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Point { diff --git a/tests/unit/out/refcount/goto_cleanup.rs b/tests/unit/out/refcount/goto_cleanup.rs index eb2bc9c360..e367f14245 100644 --- a/tests/unit/out/refcount/goto_cleanup.rs +++ b/tests/unit/out/refcount/goto_cleanup.rs @@ -77,16 +77,7 @@ pub fn from_switch_2(mut n: i32) -> i32 { panic!("ub: non-void function does not return a value") } #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct wrapper { diff --git a/tests/unit/out/refcount/huffman.rs b/tests/unit/out/refcount/huffman.rs index b6b3c8e05d..3331ded53d 100644 --- a/tests/unit/out/refcount/huffman.rs +++ b/tests/unit/out/refcount/huffman.rs @@ -7,16 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(24)] pub struct MinHeapNode { diff --git a/tests/unit/out/refcount/immutable-deref-on-func-call.rs b/tests/unit/out/refcount/immutable-deref-on-func-call.rs index 17b3f87fec..f91f095afb 100644 --- a/tests/unit/out/refcount/immutable-deref-on-func-call.rs +++ b/tests/unit/out/refcount/immutable-deref-on-func-call.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Item { diff --git a/tests/unit/out/refcount/in_class_field_initializer.rs b/tests/unit/out/refcount/in_class_field_initializer.rs index 3006e7846f..a37982771b 100644 --- a/tests/unit/out/refcount/in_class_field_initializer.rs +++ b/tests/unit/out/refcount/in_class_field_initializer.rs @@ -6,18 +6,7 @@ use std::io::prelude::*; use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; -#[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(8)] pub struct Inner { #[offset(0)] @@ -30,18 +19,7 @@ impl Default for Inner { { Inner { x: 3, y: 4 } } } } -#[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(24)] pub struct S { #[offset(0)] @@ -67,18 +45,7 @@ impl Default for S { } } } -#[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(8)] pub struct Boxed_int_ { #[offset(0)] diff --git a/tests/unit/out/refcount/init.rs b/tests/unit/out/refcount/init.rs index 9007e43512..e0b31f7990 100644 --- a/tests/unit/out/refcount/init.rs +++ b/tests/unit/out/refcount/init.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct X { diff --git a/tests/unit/out/refcount/init_list.rs b/tests/unit/out/refcount/init_list.rs index 00e4078f46..10c1f8308c 100644 --- a/tests/unit/out/refcount/init_list.rs +++ b/tests/unit/out/refcount/init_list.rs @@ -10,17 +10,7 @@ pub fn f_0(list: Vec) { let list: Value> = Rc::new(RefCell::new(list)); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Pair { @@ -29,18 +19,7 @@ pub struct Pair { #[offset(4)] pub b: i32, } -#[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(8)] pub struct Holder { #[offset(0)] @@ -59,18 +38,7 @@ impl Default for Holder { pub fn sum_1(p: Ptr) -> i32 { return ({ p.with(|__s| __s.a) } + { p.with(|__s| __s.b) }); } -#[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(4)] pub struct Seven { #[offset(0)] diff --git a/tests/unit/out/refcount/kruskal.rs b/tests/unit/out/refcount/kruskal.rs index cde1489ad6..abccf8af04 100644 --- a/tests/unit/out/refcount/kruskal.rs +++ b/tests/unit/out/refcount/kruskal.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(16)] pub struct Edge { diff --git a/tests/unit/out/refcount/lambda_as_field.rs b/tests/unit/out/refcount/lambda_as_field.rs index 08654edae0..b8e444244c 100644 --- a/tests/unit/out/refcount/lambda_as_field.rs +++ b/tests/unit/out/refcount/lambda_as_field.rs @@ -41,17 +41,7 @@ impl Destructible for Guard__lambda_at_lambda_as_field_cpp_45_13__ { ({ (*(*this).upgrade().deref()).f.call() }); } } -#[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(8)] pub struct Holder__lambda_at_lambda_as_field_cpp_39_12__ { #[offset(0)] @@ -75,16 +65,7 @@ impl Default for Holder__lambda_at_lambda_as_field_cpp_39_12__ { } } #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Holder__lambda_at_lambda_as_field_cpp_51_12__ { diff --git a/tests/unit/out/refcount/lambda_capture_ref.rs b/tests/unit/out/refcount/lambda_capture_ref.rs index 3dbdbe1b91..03a59eddea 100644 --- a/tests/unit/out/refcount/lambda_capture_ref.rs +++ b/tests/unit/out/refcount/lambda_capture_ref.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct S { diff --git a/tests/unit/out/refcount/lambda_capture_star_this.rs b/tests/unit/out/refcount/lambda_capture_star_this.rs index 6e0c0342ac..e17b5a6ada 100644 --- a/tests/unit/out/refcount/lambda_capture_star_this.rs +++ b/tests/unit/out/refcount/lambda_capture_star_this.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct S { diff --git a/tests/unit/out/refcount/lambda_capture_this.rs b/tests/unit/out/refcount/lambda_capture_this.rs index 7292b5cfcf..70ec2ff7c7 100644 --- a/tests/unit/out/refcount/lambda_capture_this.rs +++ b/tests/unit/out/refcount/lambda_capture_this.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct S { diff --git a/tests/unit/out/refcount/lambda_capture_value.rs b/tests/unit/out/refcount/lambda_capture_value.rs index da8b85451f..ace3ed41d7 100644 --- a/tests/unit/out/refcount/lambda_capture_value.rs +++ b/tests/unit/out/refcount/lambda_capture_value.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct S { diff --git a/tests/unit/out/refcount/lambda_decltype_type.rs b/tests/unit/out/refcount/lambda_decltype_type.rs index e35b53aa0a..d3eaefb6e1 100644 --- a/tests/unit/out/refcount/lambda_decltype_type.rs +++ b/tests/unit/out/refcount/lambda_decltype_type.rs @@ -6,17 +6,7 @@ use std::io::prelude::*; use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; -#[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(24)] pub struct Sorted__lambda_at_lambda_decltype_type_cpp_22_18__ { #[offset(0)] @@ -44,17 +34,7 @@ impl Default for Sorted__lambda_at_lambda_decltype_type_cpp_22_18__ { } } } -#[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(24)] pub struct Sorted__lambda_at_lambda_decltype_type_cpp_19_23__ { #[offset(0)] diff --git a/tests/unit/out/refcount/lambda_generic_explicit_args.rs b/tests/unit/out/refcount/lambda_generic_explicit_args.rs index 2fb46d2802..25f78269c9 100644 --- a/tests/unit/out/refcount/lambda_generic_explicit_args.rs +++ b/tests/unit/out/refcount/lambda_generic_explicit_args.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Val { diff --git a/tests/unit/out/refcount/lambda_immediate_init.rs b/tests/unit/out/refcount/lambda_immediate_init.rs index 189bf3557e..37c42aa45d 100644 --- a/tests/unit/out/refcount/lambda_immediate_init.rs +++ b/tests/unit/out/refcount/lambda_immediate_init.rs @@ -9,18 +9,7 @@ use std::rc::{Rc, Weak}; pub fn pick_0(mut x: i32) -> i32 { return x; } -#[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(8)] pub struct S { #[offset(0)] diff --git a/tests/unit/out/refcount/lambda_nested.rs b/tests/unit/out/refcount/lambda_nested.rs index adfa20a4a3..c53b4e3e1d 100644 --- a/tests/unit/out/refcount/lambda_nested.rs +++ b/tests/unit/out/refcount/lambda_nested.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct S { diff --git a/tests/unit/out/refcount/lambda_static_local.rs b/tests/unit/out/refcount/lambda_static_local.rs index 3bace3038e..b790203e59 100644 --- a/tests/unit/out/refcount/lambda_static_local.rs +++ b/tests/unit/out/refcount/lambda_static_local.rs @@ -79,17 +79,7 @@ thread_local!( static calls_3: Value = Rc::new(RefCell::new(0)); ); #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct P_4 { diff --git a/tests/unit/out/refcount/libc_struct_without_default.rs b/tests/unit/out/refcount/libc_struct_without_default.rs index 6e9b1a84e5..3023a29ddb 100644 --- a/tests/unit/out/refcount/libc_struct_without_default.rs +++ b/tests/unit/out/refcount/libc_struct_without_default.rs @@ -40,17 +40,7 @@ impl Default for UserDefined { } } } -#[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(16)] pub struct FieldIsLibcType { #[offset(0)] diff --git a/tests/unit/out/refcount/linked_list.rs b/tests/unit/out/refcount/linked_list.rs index 6a19627407..aa9f18a58f 100644 --- a/tests/unit/out/refcount/linked_list.rs +++ b/tests/unit/out/refcount/linked_list.rs @@ -7,16 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(16)] pub struct Node { diff --git a/tests/unit/out/refcount/local_anon_struct_collision.rs b/tests/unit/out/refcount/local_anon_struct_collision.rs index 7e694d2b92..227c717c4b 100644 --- a/tests/unit/out/refcount/local_anon_struct_collision.rs +++ b/tests/unit/out/refcount/local_anon_struct_collision.rs @@ -13,17 +13,7 @@ pub fn first_0() -> i32 { return (p.x + p.y); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct anon_1 { @@ -39,17 +29,7 @@ pub fn second_2() -> i32 { return ((q.a + q.b) as i32); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(16)] pub struct anon_3 { diff --git a/tests/unit/out/refcount/local_record_template.rs b/tests/unit/out/refcount/local_record_template.rs index 170b10c3cf..acee33e9c7 100644 --- a/tests/unit/out/refcount/local_record_template.rs +++ b/tests/unit/out/refcount/local_record_template.rs @@ -30,17 +30,7 @@ pub fn wrap_10(mut v: i64) -> i32 { return ({ get_6(l) }); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Local_5 { @@ -48,17 +38,7 @@ pub struct Local_5 { pub x: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Local_7 { @@ -70,17 +50,7 @@ pub fn other_11() -> i32 { return (({ get_0(l) }) + (l.y as i32)); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(16)] pub struct Local_1 { @@ -103,17 +73,7 @@ fn main_0() -> i32 { return 0; } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Local_3 { diff --git a/tests/unit/out/refcount/map.rs b/tests/unit/out/refcount/map.rs index f2b8b08f2d..ef7e401489 100644 --- a/tests/unit/out/refcount/map.rs +++ b/tests/unit/out/refcount/map.rs @@ -15,18 +15,7 @@ pub fn bar_1(x: Ptr) { pub fn inc_2(x: Ptr) { x.with_mut(|__v| __v.postfix_inc()); } -#[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(8)] pub struct Point { #[offset(0)] diff --git a/tests/unit/out/refcount/map_key_identity.rs b/tests/unit/out/refcount/map_key_identity.rs index ffdc26d200..b717fbb0ae 100644 --- a/tests/unit/out/refcount/map_key_identity.rs +++ b/tests/unit/out/refcount/map_key_identity.rs @@ -10,17 +10,7 @@ thread_local!( pub static default_constructions_0: Value = Rc::new(RefCell::new(0)); ); #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Key { @@ -45,18 +35,7 @@ pub fn operator_lt_1(a: Ptr, b: Ptr) -> bool { pub fn operator_eq_2(a: Ptr, b: Ptr) -> bool { return ({ a.with(|__s| __s.identity) } == { b.with(|__s| __s.identity) }); } -#[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(4)] pub struct Mapped { #[offset(0)] diff --git a/tests/unit/out/refcount/map_try_emplace.rs b/tests/unit/out/refcount/map_try_emplace.rs index 681f2b56d3..57cef67ecb 100644 --- a/tests/unit/out/refcount/map_try_emplace.rs +++ b/tests/unit/out/refcount/map_try_emplace.rs @@ -74,18 +74,7 @@ pub fn argument_4(item: Ptr) -> Ptr { (*calls_0.with(Value::clone).borrow_mut()).prefix_inc(); return (item).clone(); } -#[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(4)] pub struct RefItem { #[offset(0)] diff --git a/tests/unit/out/refcount/map_try_emplace_lvalues.rs b/tests/unit/out/refcount/map_try_emplace_lvalues.rs index c82f611f89..5b5b80cc68 100644 --- a/tests/unit/out/refcount/map_try_emplace_lvalues.rs +++ b/tests/unit/out/refcount/map_try_emplace_lvalues.rs @@ -12,18 +12,7 @@ thread_local!( thread_local!( pub static visits_1: Value = Rc::new(RefCell::new(0)); ); -#[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(4)] pub struct Item { #[offset(0)] @@ -53,17 +42,7 @@ pub fn place_3(n: Ptr) -> Ptr { thread_local!( pub static temporary_calls_4: Value = Rc::new(RefCell::new(0)); ); -#[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(12)] pub struct Temporary { #[offset(0)] @@ -85,16 +64,7 @@ impl Default for Temporary { } } #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(12)] pub struct Nested { @@ -147,16 +117,7 @@ impl Default for Noncopy { } } #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - CppFrom, - Destructible, - TriviallyCopyable, - Copyable, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, CppFrom, TriviallyCopyable, )] #[cpp_from(i32, construct_1, ptr)] #[byte_size(8)] diff --git a/tests/unit/out/refcount/memcpy_struct_bytes.rs b/tests/unit/out/refcount/memcpy_struct_bytes.rs index 50cba01c60..e473748993 100644 --- a/tests/unit/out/refcount/memcpy_struct_bytes.rs +++ b/tests/unit/out/refcount/memcpy_struct_bytes.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct point { diff --git a/tests/unit/out/refcount/memcpy_struct_layouts.rs b/tests/unit/out/refcount/memcpy_struct_layouts.rs index 93881aa084..847ea58c9a 100644 --- a/tests/unit/out/refcount/memcpy_struct_layouts.rs +++ b/tests/unit/out/refcount/memcpy_struct_layouts.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct packed { @@ -31,17 +21,7 @@ pub struct packed { pub d: i16, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(12)] pub struct reordered { @@ -53,17 +33,7 @@ pub struct reordered { pub c: i8, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(16)] pub struct tail { @@ -73,17 +43,7 @@ pub struct tail { pub b: f64, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(24)] pub struct nested { @@ -93,17 +53,7 @@ pub struct nested { #[offset(16)] pub c: i8, } -#[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(8)] pub struct array { #[offset(0)] diff --git a/tests/unit/out/refcount/memcpy_struct_struct.rs b/tests/unit/out/refcount/memcpy_struct_struct.rs index 38529d22bc..d85880c2b9 100644 --- a/tests/unit/out/refcount/memcpy_struct_struct.rs +++ b/tests/unit/out/refcount/memcpy_struct_struct.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Entry { diff --git a/tests/unit/out/refcount/memset_struct_tail.rs b/tests/unit/out/refcount/memset_struct_tail.rs index 7c45f16525..f035b8b1dc 100644 --- a/tests/unit/out/refcount/memset_struct_tail.rs +++ b/tests/unit/out/refcount/memset_struct_tail.rs @@ -6,17 +6,7 @@ use std::io::prelude::*; use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; -#[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(32)] pub struct S { #[offset(0)] diff --git a/tests/unit/out/refcount/nested_structs.rs b/tests/unit/out/refcount/nested_structs.rs index 9272a7afa2..9be477ba18 100644 --- a/tests/unit/out/refcount/nested_structs.rs +++ b/tests/unit/out/refcount/nested_structs.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Level0_Level1_1_Level2_1_Level3_1 { @@ -25,17 +15,7 @@ pub struct Level0_Level1_1_Level2_1_Level3_1 { pub x1: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Level0_Level1_1_Level2_1_Level3_2 { @@ -45,17 +25,7 @@ pub struct Level0_Level1_1_Level2_1_Level3_2 { pub x2: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Level0_Level1_1_Level2_1 { @@ -63,17 +33,7 @@ pub struct Level0_Level1_1_Level2_1 { pub x1: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Level0_Level1_1 { @@ -81,17 +41,7 @@ pub struct Level0_Level1_1 { pub x1: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Level0_Level1_2 { @@ -101,17 +51,7 @@ pub struct Level0_Level1_2 { pub x2: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct Level0 {} diff --git a/tests/unit/out/refcount/new.rs b/tests/unit/out/refcount/new.rs index db370992a7..9565136037 100644 --- a/tests/unit/out/refcount/new.rs +++ b/tests/unit/out/refcount/new.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Pair { diff --git a/tests/unit/out/refcount/new_bst.rs b/tests/unit/out/refcount/new_bst.rs index dc4409f397..6ceb595ab8 100644 --- a/tests/unit/out/refcount/new_bst.rs +++ b/tests/unit/out/refcount/new_bst.rs @@ -7,16 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(24)] pub struct node_t { diff --git a/tests/unit/out/refcount/new_struct.rs b/tests/unit/out/refcount/new_struct.rs index 6c6621a42a..ff32f5d11a 100644 --- a/tests/unit/out/refcount/new_struct.rs +++ b/tests/unit/out/refcount/new_struct.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Pair { @@ -27,17 +17,7 @@ pub struct Pair { pub y: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(16)] pub struct Triple { diff --git a/tests/unit/out/refcount/nttp_distinct_specializations.rs b/tests/unit/out/refcount/nttp_distinct_specializations.rs index 02d7dafa3d..4534577fd0 100644 --- a/tests/unit/out/refcount/nttp_distinct_specializations.rs +++ b/tests/unit/out/refcount/nttp_distinct_specializations.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct S_2_ { @@ -27,17 +17,7 @@ pub struct S_2_ { pub w: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct S_1_ { @@ -45,17 +25,7 @@ pub struct S_1_ { pub v: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct S_3_ { diff --git a/tests/unit/out/refcount/offsetof.rs b/tests/unit/out/refcount/offsetof.rs index 2b80d58402..c5ef2ed022 100644 --- a/tests/unit/out/refcount/offsetof.rs +++ b/tests/unit/out/refcount/offsetof.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(12)] pub struct Layout { @@ -28,17 +18,7 @@ pub struct Layout { #[offset(8)] pub c: u16, } -#[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(66)] pub struct Frame { #[offset(0)] diff --git a/tests/unit/out/refcount/opaque_forward_decl.rs b/tests/unit/out/refcount/opaque_forward_decl.rs index 7e22002f1b..69f6fbb662 100644 --- a/tests/unit/out/refcount/opaque_forward_decl.rs +++ b/tests/unit/out/refcount/opaque_forward_decl.rs @@ -7,16 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(16)] pub struct container { diff --git a/tests/unit/out/refcount/opaque_record_copy.rs b/tests/unit/out/refcount/opaque_record_copy.rs index 1da80b8d79..51bc05f6ab 100644 --- a/tests/unit/out/refcount/opaque_record_copy.rs +++ b/tests/unit/out/refcount/opaque_record_copy.rs @@ -7,32 +7,12 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct Probe {} #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Wrapper_Probe_ { diff --git a/tests/unit/out/refcount/opaque_then_defined.rs b/tests/unit/out/refcount/opaque_then_defined.rs index edde86f54d..663c006b0b 100644 --- a/tests/unit/out/refcount/opaque_then_defined.rs +++ b/tests/unit/out/refcount/opaque_then_defined.rs @@ -7,16 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(16)] pub struct list { @@ -27,16 +18,7 @@ pub struct list { pub size: i32, } #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(16)] pub struct node { diff --git a/tests/unit/out/refcount/operator_arithmetic_free.rs b/tests/unit/out/refcount/operator_arithmetic_free.rs index 2c26109484..54150ce7d4 100644 --- a/tests/unit/out/refcount/operator_arithmetic_free.rs +++ b/tests/unit/out/refcount/operator_arithmetic_free.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct S { diff --git a/tests/unit/out/refcount/operator_arithmetic_member.rs b/tests/unit/out/refcount/operator_arithmetic_member.rs index bb2b2ae7f3..7b57426f42 100644 --- a/tests/unit/out/refcount/operator_arithmetic_member.rs +++ b/tests/unit/out/refcount/operator_arithmetic_member.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct S { diff --git a/tests/unit/out/refcount/operator_bitwise_free.rs b/tests/unit/out/refcount/operator_bitwise_free.rs index 33d0ca1d10..25087efa40 100644 --- a/tests/unit/out/refcount/operator_bitwise_free.rs +++ b/tests/unit/out/refcount/operator_bitwise_free.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct S { diff --git a/tests/unit/out/refcount/operator_bitwise_member.rs b/tests/unit/out/refcount/operator_bitwise_member.rs index dea131ace8..f4b723a73e 100644 --- a/tests/unit/out/refcount/operator_bitwise_member.rs +++ b/tests/unit/out/refcount/operator_bitwise_member.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct S { diff --git a/tests/unit/out/refcount/operator_comparison_defaulted.rs b/tests/unit/out/refcount/operator_comparison_defaulted.rs index f6d188442d..1d684c95c8 100644 --- a/tests/unit/out/refcount/operator_comparison_defaulted.rs +++ b/tests/unit/out/refcount/operator_comparison_defaulted.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Eq { @@ -32,17 +22,7 @@ impl CppEq for Eq { } } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Cmp { @@ -62,17 +42,7 @@ impl CppEq for Cmp { } } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Both { @@ -90,17 +60,7 @@ impl CppEq for Both { } } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct OrdOnly { @@ -118,17 +78,7 @@ impl CppEq for OrdOnly { } } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Inner { @@ -146,17 +96,7 @@ impl CppEq for Inner { } } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Outer { @@ -177,17 +117,7 @@ impl CppEq for Outer { } } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Secondary { @@ -205,16 +135,7 @@ impl CppEq for Secondary { } } #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct PtrMember { diff --git a/tests/unit/out/refcount/operator_comparison_free.rs b/tests/unit/out/refcount/operator_comparison_free.rs index 5223c2501d..8fc0a8ac09 100644 --- a/tests/unit/out/refcount/operator_comparison_free.rs +++ b/tests/unit/out/refcount/operator_comparison_free.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct S { @@ -59,17 +49,7 @@ pub fn operator_lt_7(mut a: i32, b: Ptr) -> bool { return ({ a } < { b.with(|__s| __s.v) }); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct V { diff --git a/tests/unit/out/refcount/operator_comparison_member.rs b/tests/unit/out/refcount/operator_comparison_member.rs index 5a6c2e1763..f9742e1b8d 100644 --- a/tests/unit/out/refcount/operator_comparison_member.rs +++ b/tests/unit/out/refcount/operator_comparison_member.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct S { diff --git a/tests/unit/out/refcount/operator_comparison_mixed.rs b/tests/unit/out/refcount/operator_comparison_mixed.rs index fa55140b48..4ef2c1a398 100644 --- a/tests/unit/out/refcount/operator_comparison_mixed.rs +++ b/tests/unit/out/refcount/operator_comparison_mixed.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct S { diff --git a/tests/unit/out/refcount/operator_comparison_nonbool.rs b/tests/unit/out/refcount/operator_comparison_nonbool.rs index a2c92ff47f..0327803602 100644 --- a/tests/unit/out/refcount/operator_comparison_nonbool.rs +++ b/tests/unit/out/refcount/operator_comparison_nonbool.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct X { @@ -53,17 +43,7 @@ pub fn operator_ge_5(mut a: X, mut b: X) -> i32 { return if (a.v >= b.v) { 7 } else { 0 }; } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Result { @@ -71,17 +51,7 @@ pub struct Result { pub r: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Custom { @@ -89,17 +59,7 @@ pub struct Custom { pub v: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Mixed { @@ -125,9 +85,7 @@ impl CppEq for Mixed { VaArg, FnPtrArg, CppFrom, - Destructible, TriviallyCopyable, - Copyable, Default, )] #[cpp_into(bool, to_bool)] @@ -137,17 +95,7 @@ pub struct MyBool { pub value: bool, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Boolish { @@ -199,17 +147,7 @@ thread_local!( })); ); #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct RefInt { diff --git a/tests/unit/out/refcount/operator_compound_assignment_free.rs b/tests/unit/out/refcount/operator_compound_assignment_free.rs index b3a3824a9f..34d5b53645 100644 --- a/tests/unit/out/refcount/operator_compound_assignment_free.rs +++ b/tests/unit/out/refcount/operator_compound_assignment_free.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct S { diff --git a/tests/unit/out/refcount/operator_compound_assignment_member.rs b/tests/unit/out/refcount/operator_compound_assignment_member.rs index 3ebf598309..030449d785 100644 --- a/tests/unit/out/refcount/operator_compound_assignment_member.rs +++ b/tests/unit/out/refcount/operator_compound_assignment_member.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct S { diff --git a/tests/unit/out/refcount/operator_friend.rs b/tests/unit/out/refcount/operator_friend.rs index 33a54f3062..1d05674604 100644 --- a/tests/unit/out/refcount/operator_friend.rs +++ b/tests/unit/out/refcount/operator_friend.rs @@ -11,17 +11,7 @@ pub fn operator_eq_0(_a0: Ptr, _a1: Ptr) -> bool { && ({ _a0.with(|__s| __s.b) } == { _a1.with(|__s| __s.b) }); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Defaulted { @@ -51,17 +41,7 @@ pub fn operator_eq_2(_a0: Ptr, _a1: Ptr) -> bool { return ({ _a0.with(|__s| __s.a) } == { _a1.with(|__s| __s.a) }); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct DefaultedOrd { @@ -90,17 +70,7 @@ pub fn operator_add_5(x: Ptr, y: Ptr) -> Inline { }; } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Inline { @@ -118,17 +88,7 @@ impl CppEq for Inline { } } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct OutOfLine { @@ -156,17 +116,7 @@ pub fn operator_eq_10(x: Ptr, y: Ptr) -> bool { return ({ (x.with(|__s| __s.v) as i64) } == { y.with(|__s| __s.v) }); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Tmpl_int_ { @@ -184,17 +134,7 @@ impl CppEq for Tmpl_int_ { } } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Tmpl_long_ { @@ -205,17 +145,7 @@ pub fn operator_eq_11(_a0: Ptr, _a1: Ptr return ({ _a0.with(|__s| __s.v) } == { _a1.with(|__s| __s.v) }); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct TmplDefaulted_int_ { diff --git a/tests/unit/out/refcount/operator_less_than.rs b/tests/unit/out/refcount/operator_less_than.rs index 45d7b6bb6c..6ed2c5b32a 100644 --- a/tests/unit/out/refcount/operator_less_than.rs +++ b/tests/unit/out/refcount/operator_less_than.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Pair { diff --git a/tests/unit/out/refcount/operator_logical_free.rs b/tests/unit/out/refcount/operator_logical_free.rs index 7efdc067c8..86afec9078 100644 --- a/tests/unit/out/refcount/operator_logical_free.rs +++ b/tests/unit/out/refcount/operator_logical_free.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct S { diff --git a/tests/unit/out/refcount/operator_logical_member.rs b/tests/unit/out/refcount/operator_logical_member.rs index 4f4f581c1e..e14b6cdbeb 100644 --- a/tests/unit/out/refcount/operator_logical_member.rs +++ b/tests/unit/out/refcount/operator_logical_member.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct S { diff --git a/tests/unit/out/refcount/operator_member_pointer_free.rs b/tests/unit/out/refcount/operator_member_pointer_free.rs index a8d20f16f0..e99e28946e 100644 --- a/tests/unit/out/refcount/operator_member_pointer_free.rs +++ b/tests/unit/out/refcount/operator_member_pointer_free.rs @@ -7,34 +7,14 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Inner { #[offset(0)] pub x: i32, } -#[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(16)] pub struct S { #[offset(0)] diff --git a/tests/unit/out/refcount/operator_member_pointer_member.rs b/tests/unit/out/refcount/operator_member_pointer_member.rs index c086488ce5..74ac91c329 100644 --- a/tests/unit/out/refcount/operator_member_pointer_member.rs +++ b/tests/unit/out/refcount/operator_member_pointer_member.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Inner { @@ -25,17 +15,7 @@ pub struct Inner { pub x: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct Table {} @@ -47,17 +27,7 @@ impl Table { thread_local!( pub static table_0: Value> = Rc::new(RefCell::new(Box::new([7, 8, 9]))); ); -#[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(16)] pub struct S { #[offset(0)] diff --git a/tests/unit/out/refcount/operator_other_free.rs b/tests/unit/out/refcount/operator_other_free.rs index 9fea00ed34..dc4a505226 100644 --- a/tests/unit/out/refcount/operator_other_free.rs +++ b/tests/unit/out/refcount/operator_other_free.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct S { diff --git a/tests/unit/out/refcount/operator_other_member.rs b/tests/unit/out/refcount/operator_other_member.rs index d91b490e81..8622fd65b6 100644 --- a/tests/unit/out/refcount/operator_other_member.rs +++ b/tests/unit/out/refcount/operator_other_member.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct Static {} @@ -35,9 +25,7 @@ impl Static { VaArg, FnPtrArg, CppFrom, - Destructible, TriviallyCopyable, - Copyable, Default, )] #[cpp_into(i32, to_i32)] diff --git a/tests/unit/out/refcount/operator_overloads.rs b/tests/unit/out/refcount/operator_overloads.rs index 85a2d36afb..7e97765d20 100644 --- a/tests/unit/out/refcount/operator_overloads.rs +++ b/tests/unit/out/refcount/operator_overloads.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct S { diff --git a/tests/unit/out/refcount/operator_qualifiers.rs b/tests/unit/out/refcount/operator_qualifiers.rs index 3ed1b3597f..25080aa83f 100644 --- a/tests/unit/out/refcount/operator_qualifiers.rs +++ b/tests/unit/out/refcount/operator_qualifiers.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct S { diff --git a/tests/unit/out/refcount/operator_three_way.rs b/tests/unit/out/refcount/operator_three_way.rs index 6402d6e398..53c88f7262 100644 --- a/tests/unit/out/refcount/operator_three_way.rs +++ b/tests/unit/out/refcount/operator_three_way.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct S { diff --git a/tests/unit/out/refcount/operator_traits.rs b/tests/unit/out/refcount/operator_traits.rs index b6c7f9c0b6..61480deea5 100644 --- a/tests/unit/out/refcount/operator_traits.rs +++ b/tests/unit/out/refcount/operator_traits.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Lt { @@ -35,17 +25,7 @@ impl CppEq for Lt { } } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Eq { @@ -58,17 +38,7 @@ impl CppEq for Eq { } } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Cmp { @@ -86,17 +56,7 @@ impl CppEq for Cmp { } } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Free { @@ -120,17 +80,7 @@ pub fn operator_eq_1(a: Ptr, b: Ptr) -> bool { return ({ a.with(|__s| __s.v) } == { b.with(|__s| __s.v) }); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Wrapped_int_ { diff --git a/tests/unit/out/refcount/overload_mangling.rs b/tests/unit/out/refcount/overload_mangling.rs index 1ae9bb8f96..f4c4bca522 100644 --- a/tests/unit/out/refcount/overload_mangling.rs +++ b/tests/unit/out/refcount/overload_mangling.rs @@ -20,32 +20,12 @@ pub fn twice_2(mut n: i32) -> i32 { return (n * 2); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct Access_S_ {} #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct S { @@ -53,17 +33,7 @@ pub struct S { pub base: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Box_ { diff --git a/tests/unit/out/refcount/pair_converting_construction.rs b/tests/unit/out/refcount/pair_converting_construction.rs index 9f2afd6b6e..d9be805f1e 100644 --- a/tests/unit/out/refcount/pair_converting_construction.rs +++ b/tests/unit/out/refcount/pair_converting_construction.rs @@ -15,9 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, CppFrom, - Destructible, TriviallyCopyable, - Copyable, Default, )] #[cpp_from(i32, construct, value)] @@ -35,9 +33,7 @@ pub struct Celsius { VaArg, FnPtrArg, CppFrom, - Destructible, TriviallyCopyable, - Copyable, Default, )] #[cpp_into(i32, to_i32)] @@ -55,9 +51,7 @@ pub struct Meters { VaArg, FnPtrArg, CppFrom, - Destructible, TriviallyCopyable, - Copyable, Default, )] #[cpp_from(Celsius, construct, ptr)] @@ -75,9 +69,7 @@ pub struct Label { VaArg, FnPtrArg, CppFrom, - Destructible, TriviallyCopyable, - Copyable, Default, )] #[cpp_from(Celsius, construct_1, ptr)] @@ -98,9 +90,7 @@ pub struct Owner { VaArg, FnPtrArg, CppFrom, - Destructible, TriviallyCopyable, - Copyable, Default, )] #[cpp_from(Celsius, construct, value)] @@ -110,17 +100,7 @@ pub struct Holder { pub value: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - CppFrom, - Destructible, - TriviallyCopyable, - Copyable, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, CppFrom, TriviallyCopyable, )] #[cpp_from(i32, construct, value)] #[byte_size(4)] @@ -140,17 +120,7 @@ impl Default for Fallback { } } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Counter { @@ -166,9 +136,7 @@ pub struct Counter { VaArg, FnPtrArg, CppFrom, - Destructible, TriviallyCopyable, - Copyable, Default, )] #[cpp_from(Counter, construct, mut_ptr)] @@ -186,9 +154,7 @@ pub struct Observer { VaArg, FnPtrArg, CppFrom, - Destructible, TriviallyCopyable, - Copyable, Default, )] #[cpp_from(Celsius, construct, ptr)] @@ -206,9 +172,7 @@ pub struct Tag { VaArg, FnPtrArg, CppFrom, - Destructible, TriviallyCopyable, - Copyable, Default, )] #[cpp_from(Ptr< i8 > , construct, value)] diff --git a/tests/unit/out/refcount/pod.rs b/tests/unit/out/refcount/pod.rs index 0ad57e6f58..63da4a0c34 100644 --- a/tests/unit/out/refcount/pod.rs +++ b/tests/unit/out/refcount/pod.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(12)] pub struct POD { diff --git a/tests/unit/out/refcount/pointer_array.rs b/tests/unit/out/refcount/pointer_array.rs index 97581343fd..ece5f0abce 100644 --- a/tests/unit/out/refcount/pointer_array.rs +++ b/tests/unit/out/refcount/pointer_array.rs @@ -6,17 +6,7 @@ use std::io::prelude::*; use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; -#[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(24)] pub struct StackArray { #[offset(0)] diff --git a/tests/unit/out/refcount/pointers.rs b/tests/unit/out/refcount/pointers.rs index 510b5b0ace..88962e5de8 100644 --- a/tests/unit/out/refcount/pointers.rs +++ b/tests/unit/out/refcount/pointers.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Test { diff --git a/tests/unit/out/refcount/ptr_cast_init.rs b/tests/unit/out/refcount/ptr_cast_init.rs index 9a9a1a785e..efd5f6ae43 100644 --- a/tests/unit/out/refcount/ptr_cast_init.rs +++ b/tests/unit/out/refcount/ptr_cast_init.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct header { @@ -27,17 +17,7 @@ pub struct header { pub size: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct view { diff --git a/tests/unit/out/refcount/push_emplace_back.rs b/tests/unit/out/refcount/push_emplace_back.rs index 393b4e2e8e..39dad18550 100644 --- a/tests/unit/out/refcount/push_emplace_back.rs +++ b/tests/unit/out/refcount/push_emplace_back.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Chunk { @@ -25,16 +15,7 @@ pub struct Chunk { pub data: i32, } #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(16)] pub struct Writer { @@ -144,17 +125,7 @@ pub fn self_ref_push_6(mut comps: Ptr>) { }; } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - CppFrom, - Destructible, - TriviallyCopyable, - Copyable, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, CppFrom, TriviallyCopyable, )] #[cpp_from(i32, construct_1, value)] #[byte_size(8)] @@ -376,17 +347,7 @@ pub fn emplace_from_element_14(mut v: Ptr>>) { v.with_mut(|__v: &mut Vec>| __v.push(__tmp_14)); }; } -#[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(24)] pub struct Plain { #[offset(0)] @@ -420,17 +381,7 @@ thread_local!( Rc::new(RefCell::new(Ptr::>::null())); ); #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Counted { diff --git a/tests/unit/out/refcount/random.rs b/tests/unit/out/refcount/random.rs index 4612fdf593..93ae6f283a 100644 --- a/tests/unit/out/refcount/random.rs +++ b/tests/unit/out/refcount/random.rs @@ -6,17 +6,7 @@ use std::io::prelude::*; use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; -#[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(72)] pub struct Pair { #[offset(0)] @@ -62,17 +52,7 @@ pub fn zero_0() -> i32 { return 0; } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct X1 {} diff --git a/tests/unit/out/refcount/reference_wrapper.rs b/tests/unit/out/refcount/reference_wrapper.rs index 0031d6d505..65381cce47 100644 --- a/tests/unit/out/refcount/reference_wrapper.rs +++ b/tests/unit/out/refcount/reference_wrapper.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Point { diff --git a/tests/unit/out/refcount/references.rs b/tests/unit/out/refcount/references.rs index f3ba099ac2..c51ad1dbe1 100644 --- a/tests/unit/out/refcount/references.rs +++ b/tests/unit/out/refcount/references.rs @@ -6,17 +6,7 @@ use std::io::prelude::*; use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; -#[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(16)] pub struct Pair { #[offset(0)] @@ -40,16 +30,7 @@ impl Default for Pair { } } #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(16)] pub struct Nested { diff --git a/tests/unit/out/refcount/refs_as_args.rs b/tests/unit/out/refcount/refs_as_args.rs index fa14d671fb..8f7383be46 100644 --- a/tests/unit/out/refcount/refs_as_args.rs +++ b/tests/unit/out/refcount/refs_as_args.rs @@ -31,17 +31,7 @@ pub fn more_refs_0(x1: i32, x2: i32, r1: Ptr, r2: Ptr) { r1.write((rx2.read())); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Val { diff --git a/tests/unit/out/refcount/reinterpret_cast_ptr_cmp.rs b/tests/unit/out/refcount/reinterpret_cast_ptr_cmp.rs index 27d4cdb584..e777777307 100644 --- a/tests/unit/out/refcount/reinterpret_cast_ptr_cmp.rs +++ b/tests/unit/out/refcount/reinterpret_cast_ptr_cmp.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct S { @@ -26,17 +16,7 @@ pub struct S { #[offset(4)] pub y: i32, } -#[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(28)] pub struct W { #[offset(0)] @@ -56,17 +36,7 @@ impl Default for W { } } } -#[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(32)] pub struct P { #[offset(0)] diff --git a/tests/unit/out/refcount/reinterpret_cast_struct.rs b/tests/unit/out/refcount/reinterpret_cast_struct.rs index 762768e98d..a0c237aba6 100644 --- a/tests/unit/out/refcount/reinterpret_cast_struct.rs +++ b/tests/unit/out/refcount/reinterpret_cast_struct.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Point { diff --git a/tests/unit/out/refcount/reinterpret_cast_struct_to_struct.rs b/tests/unit/out/refcount/reinterpret_cast_struct_to_struct.rs index bbda224d7c..2b4b15d4d6 100644 --- a/tests/unit/out/refcount/reinterpret_cast_struct_to_struct.rs +++ b/tests/unit/out/refcount/reinterpret_cast_struct_to_struct.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Point { @@ -27,17 +17,7 @@ pub struct Point { pub y: u32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Pair { diff --git a/tests/unit/out/refcount/reserved_keywords.rs b/tests/unit/out/refcount/reserved_keywords.rs index 614215f853..61a59e4e1f 100644 --- a/tests/unit/out/refcount/reserved_keywords.rs +++ b/tests/unit/out/refcount/reserved_keywords.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(152)] pub struct S { @@ -99,17 +89,7 @@ pub struct S { pub vec_: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct type_ { @@ -117,17 +97,7 @@ pub struct type_ { pub v: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct loop_ { diff --git a/tests/unit/out/refcount/return_move.rs b/tests/unit/out/refcount/return_move.rs index d0af211e1a..c1b76be829 100644 --- a/tests/unit/out/refcount/return_move.rs +++ b/tests/unit/out/refcount/return_move.rs @@ -7,16 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(16)] pub struct node { @@ -27,16 +18,7 @@ pub struct node { pub next: Ptr, } #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(16)] pub struct pair_t { diff --git a/tests/unit/out/refcount/rvalue_struct.rs b/tests/unit/out/refcount/rvalue_struct.rs index d48e183b9a..7815aa553a 100644 --- a/tests/unit/out/refcount/rvalue_struct.rs +++ b/tests/unit/out/refcount/rvalue_struct.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct S { diff --git a/tests/unit/out/refcount/scalar_builtin_construct_destruct.rs b/tests/unit/out/refcount/scalar_builtin_construct_destruct.rs index f79583da4d..67b99a300a 100644 --- a/tests/unit/out/refcount/scalar_builtin_construct_destruct.rs +++ b/tests/unit/out/refcount/scalar_builtin_construct_destruct.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Pod { diff --git a/tests/unit/out/refcount/self_referencing_initializer.rs b/tests/unit/out/refcount/self_referencing_initializer.rs index 5e9b2460e8..cc26e02cc3 100644 --- a/tests/unit/out/refcount/self_referencing_initializer.rs +++ b/tests/unit/out/refcount/self_referencing_initializer.rs @@ -7,16 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct list_head { @@ -25,16 +16,7 @@ pub struct list_head { pub next: Ptr, } #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(16)] pub struct node { @@ -44,17 +26,7 @@ pub struct node { #[byte_size(8)] pub value_ptr: Ptr, } -#[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(16)] pub struct node_with_defaults { #[offset(0)] diff --git a/tests/unit/out/refcount/size_t_static_member.rs b/tests/unit/out/refcount/size_t_static_member.rs index fdf3cfe6d7..38685d971b 100644 --- a/tests/unit/out/refcount/size_t_static_member.rs +++ b/tests/unit/out/refcount/size_t_static_member.rs @@ -10,17 +10,7 @@ thread_local!( pub static c_0: Value = Rc::new(RefCell::new(5_usize)); ); #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct S {} @@ -28,17 +18,7 @@ thread_local!( pub static table_size_1: Value = Rc::new(RefCell::new(256_usize)); ); #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct Table_char_ {} diff --git a/tests/unit/out/refcount/size_t_template_param.rs b/tests/unit/out/refcount/size_t_template_param.rs index 732a7fe720..44017a11ce 100644 --- a/tests/unit/out/refcount/size_t_template_param.rs +++ b/tests/unit/out/refcount/size_t_template_param.rs @@ -19,9 +19,7 @@ pub fn array_ref_0(a: Ptr) -> u64 { VaArg, FnPtrArg, CppFrom, - Destructible, TriviallyCopyable, - Copyable, Default, )] #[cpp_from(Ptr< u64 > , construct, value)] @@ -39,9 +37,7 @@ pub struct PtrCtor_unsigned_long_ { VaArg, FnPtrArg, CppFrom, - Destructible, TriviallyCopyable, - Copyable, Default, )] #[cpp_from(u64, construct, ptr)] diff --git a/tests/unit/out/refcount/static_local.rs b/tests/unit/out/refcount/static_local.rs index 592e14439f..24ae2dfc21 100644 --- a/tests/unit/out/refcount/static_local.rs +++ b/tests/unit/out/refcount/static_local.rs @@ -34,17 +34,7 @@ thread_local!( static x_7: Value = Rc::new(RefCell::new(3)); ); #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct S_8 {} diff --git a/tests/unit/out/refcount/static_var_in_class.rs b/tests/unit/out/refcount/static_var_in_class.rs index 18c32915d4..35e90123f8 100644 --- a/tests/unit/out/refcount/static_var_in_class.rs +++ b/tests/unit/out/refcount/static_var_in_class.rs @@ -10,17 +10,7 @@ thread_local!( static inner_const_0: Value = Rc::new(RefCell::new(1)); ); #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct C {} @@ -30,17 +20,7 @@ thread_local!( pub type anon_3 = u32; pub const anon_3_kValue: anon_3 = 3; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct S {} diff --git a/tests/unit/out/refcount/stdcopy.rs b/tests/unit/out/refcount/stdcopy.rs index efca0fbcac..b432be3106 100644 --- a/tests/unit/out/refcount/stdcopy.rs +++ b/tests/unit/out/refcount/stdcopy.rs @@ -15,9 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, CppFrom, - Destructible, TriviallyCopyable, - Copyable, Default, )] #[cpp_from(i32, construct, value)] diff --git a/tests/unit/out/refcount/strdup.rs b/tests/unit/out/refcount/strdup.rs index 9ef21abec9..8e26d342dc 100644 --- a/tests/unit/out/refcount/strdup.rs +++ b/tests/unit/out/refcount/strdup.rs @@ -7,16 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct record { diff --git a/tests/unit/out/refcount/string_literal_ptr_init.rs b/tests/unit/out/refcount/string_literal_ptr_init.rs index 3aa7ccb71b..207c5f0207 100644 --- a/tests/unit/out/refcount/string_literal_ptr_init.rs +++ b/tests/unit/out/refcount/string_literal_ptr_init.rs @@ -7,16 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(24)] pub struct label { diff --git a/tests/unit/out/refcount/string_substr.rs b/tests/unit/out/refcount/string_substr.rs index 3010b4fad8..fd214114c0 100644 --- a/tests/unit/out/refcount/string_substr.rs +++ b/tests/unit/out/refcount/string_substr.rs @@ -7,16 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Text { diff --git a/tests/unit/out/refcount/struct_2d_array_field.rs b/tests/unit/out/refcount/struct_2d_array_field.rs index af5e08aa4c..006d428772 100644 --- a/tests/unit/out/refcount/struct_2d_array_field.rs +++ b/tests/unit/out/refcount/struct_2d_array_field.rs @@ -6,17 +6,7 @@ use std::io::prelude::*; use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; -#[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(40)] pub struct table { #[offset(0)] diff --git a/tests/unit/out/refcount/struct_ctor.rs b/tests/unit/out/refcount/struct_ctor.rs index 29ba151c96..3d98fc2e88 100644 --- a/tests/unit/out/refcount/struct_ctor.rs +++ b/tests/unit/out/refcount/struct_ctor.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct StructWithCtor { @@ -38,9 +28,7 @@ pub fn foo_0(x: Ptr) -> Ptr { VaArg, FnPtrArg, CppFrom, - Destructible, TriviallyCopyable, - Copyable, Default, )] #[cpp_from(i32, construct, value)] @@ -49,18 +37,7 @@ pub struct Value_ { #[offset(0)] pub v: i32, } -#[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(8)] pub struct Ptr_ { #[offset(0)] diff --git a/tests/unit/out/refcount/struct_default_ctor.rs b/tests/unit/out/refcount/struct_default_ctor.rs index fcb23804af..4f8707f78a 100644 --- a/tests/unit/out/refcount/struct_default_ctor.rs +++ b/tests/unit/out/refcount/struct_default_ctor.rs @@ -6,18 +6,7 @@ use std::io::prelude::*; use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; -#[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(8)] pub struct S { #[offset(0)] @@ -37,34 +26,14 @@ impl Default for S { } } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Declared { #[offset(0)] pub v: i32, } -#[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(16)] pub struct Holder { #[offset(0)] @@ -84,18 +53,7 @@ impl Default for Holder { thread_local!( pub static kInit_0: Value = Rc::new(RefCell::new(3)); ); -#[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(4)] pub struct FromStatic { #[offset(0)] diff --git a/tests/unit/out/refcount/struct_member_array_adjacency.rs b/tests/unit/out/refcount/struct_member_array_adjacency.rs index d08635aa8e..51904107ec 100644 --- a/tests/unit/out/refcount/struct_member_array_adjacency.rs +++ b/tests/unit/out/refcount/struct_member_array_adjacency.rs @@ -6,17 +6,7 @@ use std::io::prelude::*; use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; -#[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(32)] pub struct pair { #[offset(0)] diff --git a/tests/unit/out/refcount/struct_ptr.rs b/tests/unit/out/refcount/struct_ptr.rs index fb20d7e384..720a2e9fc5 100644 --- a/tests/unit/out/refcount/struct_ptr.rs +++ b/tests/unit/out/refcount/struct_ptr.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct XX { diff --git a/tests/unit/out/refcount/structured_binding_range_for.rs b/tests/unit/out/refcount/structured_binding_range_for.rs index 108974a8d8..acd97c4bfe 100644 --- a/tests/unit/out/refcount/structured_binding_range_for.rs +++ b/tests/unit/out/refcount/structured_binding_range_for.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Pair { diff --git a/tests/unit/out/refcount/structured_binding_ref.rs b/tests/unit/out/refcount/structured_binding_ref.rs index bd4d1598e0..9f79ef66d1 100644 --- a/tests/unit/out/refcount/structured_binding_ref.rs +++ b/tests/unit/out/refcount/structured_binding_ref.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(12)] pub struct Triple { diff --git a/tests/unit/out/refcount/structured_binding_trivial.rs b/tests/unit/out/refcount/structured_binding_trivial.rs index 0a858eb277..7214c5278d 100644 --- a/tests/unit/out/refcount/structured_binding_trivial.rs +++ b/tests/unit/out/refcount/structured_binding_trivial.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Pair { diff --git a/tests/unit/out/refcount/tag_vs_identifier_collision.rs b/tests/unit/out/refcount/tag_vs_identifier_collision.rs index f74af165ad..2db918945d 100644 --- a/tests/unit/out/refcount/tag_vs_identifier_collision.rs +++ b/tests/unit/out/refcount/tag_vs_identifier_collision.rs @@ -11,17 +11,7 @@ pub const widget_enum_MODE_IDLE: widget_enum = 0; pub const widget_enum_MODE_ACTIVE: widget_enum = 1; pub const widget_enum_MODE_DONE: widget_enum = 2; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct widget { @@ -31,17 +21,7 @@ pub struct widget { pub mode: widget_enum, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct point_struct { @@ -50,9 +30,7 @@ pub struct point_struct { #[offset(4)] pub y: i32, } -#[derive( - VaArg, FnPtrArg, Destructible, TriviallyCopyable, Copyable, ByteRepr, Clone, ZeroInitialization, -)] +#[derive(VaArg, FnPtrArg, TriviallyCopyable, ByteRepr, Clone, ZeroInitialization)] #[byte_size(4)] pub struct point { #[offset(0)] @@ -75,9 +53,7 @@ impl Default for point { } } } -#[derive( - VaArg, FnPtrArg, Destructible, TriviallyCopyable, Copyable, ByteRepr, Clone, ZeroInitialization, -)] +#[derive(VaArg, FnPtrArg, TriviallyCopyable, ByteRepr, Clone, ZeroInitialization)] #[byte_size(4)] pub struct slot_union { #[offset(0)] @@ -104,17 +80,7 @@ pub type slot = u32; pub const slot_SLOT_A: slot = 0; pub const slot_SLOT_B: slot = 1; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Inner { @@ -122,17 +88,7 @@ pub struct Inner { pub tag_field: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Outer { @@ -141,17 +97,7 @@ pub struct Outer { pub field: Inner, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Inner_struct { diff --git a/tests/unit/out/refcount/template_default_arg.rs b/tests/unit/out/refcount/template_default_arg.rs index dbb60dbc75..9f7312a0c9 100644 --- a/tests/unit/out/refcount/template_default_arg.rs +++ b/tests/unit/out/refcount/template_default_arg.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - CppFrom, - Destructible, - TriviallyCopyable, - Copyable, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, CppFrom, TriviallyCopyable, )] #[cpp_from(i32, construct_1, value)] #[byte_size(4)] @@ -36,18 +26,7 @@ impl Default for A { } } } -#[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(4)] pub struct B { #[offset(0)] @@ -73,9 +52,7 @@ impl Default for B { VaArg, FnPtrArg, CppFrom, - Destructible, TriviallyCopyable, - Copyable, Default, )] #[cpp_from(i32, construct, value)] @@ -105,9 +82,7 @@ pub fn always_given_3(mut x: NoDefault) -> i32 { VaArg, FnPtrArg, CppFrom, - Destructible, TriviallyCopyable, - Copyable, Default, )] #[cpp_from(i32, construct, value)] diff --git a/tests/unit/out/refcount/template_static_member.rs b/tests/unit/out/refcount/template_static_member.rs index 437d622b32..b97e23a677 100644 --- a/tests/unit/out/refcount/template_static_member.rs +++ b/tests/unit/out/refcount/template_static_member.rs @@ -10,17 +10,7 @@ thread_local!( pub static s_0: Value = Rc::new(RefCell::new(55)); ); #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct Static_int_ {} @@ -28,17 +18,7 @@ thread_local!( pub static s_1: Value = Rc::new(RefCell::new(55_i8)); ); #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct Static_char_ {} @@ -46,17 +26,7 @@ thread_local!( pub static s_2: Value = Rc::new(RefCell::new(55_i64)); ); #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct Static_long_ {} @@ -67,17 +37,7 @@ thread_local!( pub static hi_4: Value = Rc::new(RefCell::new(1)); ); #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct Range_int_ {} @@ -88,17 +48,7 @@ thread_local!( pub static hi_6: Value = Rc::new(RefCell::new(2_i64)); ); #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct Range_long_ {} diff --git a/tests/unit/out/refcount/temporary_field_ctor_arg.rs b/tests/unit/out/refcount/temporary_field_ctor_arg.rs index 6faceac316..7350b3db78 100644 --- a/tests/unit/out/refcount/temporary_field_ctor_arg.rs +++ b/tests/unit/out/refcount/temporary_field_ctor_arg.rs @@ -41,9 +41,7 @@ pub fn make_0() -> Outer { VaArg, FnPtrArg, CppFrom, - Destructible, TriviallyCopyable, - Copyable, Default, )] #[cpp_from(Vec , construct, ptr)] diff --git a/tests/unit/out/refcount/this.rs b/tests/unit/out/refcount/this.rs index 6535d79cc7..991563832f 100644 --- a/tests/unit/out/refcount/this.rs +++ b/tests/unit/out/refcount/this.rs @@ -14,9 +14,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, CppFrom, - Destructible, TriviallyCopyable, - Copyable, Default, )] #[cpp_from(i32, construct_1, value)] @@ -40,9 +38,7 @@ pub fn bump_0(mut p: Ptr) { VaArg, FnPtrArg, CppFrom, - Destructible, TriviallyCopyable, - Copyable, Default, )] #[cpp_from(i32, construct, value)] diff --git a/tests/unit/out/refcount/typedef-anon-struct.rs b/tests/unit/out/refcount/typedef-anon-struct.rs index 9c9246cac3..ecf4510a25 100644 --- a/tests/unit/out/refcount/typedef-anon-struct.rs +++ b/tests/unit/out/refcount/typedef-anon-struct.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Outer_RunInfo { diff --git a/tests/unit/out/refcount/unary_expr_or_type_trait.rs b/tests/unit/out/refcount/unary_expr_or_type_trait.rs index b7e8a55cfa..7c88368be3 100644 --- a/tests/unit/out/refcount/unary_expr_or_type_trait.rs +++ b/tests/unit/out/refcount/unary_expr_or_type_trait.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(16)] pub struct S { diff --git a/tests/unit/out/refcount/unboxed_locals.rs b/tests/unit/out/refcount/unboxed_locals.rs index c3b541ba36..be0c5e2949 100644 --- a/tests/unit/out/refcount/unboxed_locals.rs +++ b/tests/unit/out/refcount/unboxed_locals.rs @@ -15,17 +15,7 @@ pub fn inc_1(r: Ptr) { }); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Pair { diff --git a/tests/unit/out/refcount/unboxed_records.rs b/tests/unit/out/refcount/unboxed_records.rs index da87ae877a..d39d30b2e3 100644 --- a/tests/unit/out/refcount/unboxed_records.rs +++ b/tests/unit/out/refcount/unboxed_records.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Inner { @@ -26,17 +16,7 @@ pub struct Inner { #[offset(4)] pub b: i32, } -#[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(48)] pub struct Cookie { #[offset(0)] @@ -68,18 +48,7 @@ impl Default for Cookie { } } } -#[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(4)] pub struct Counter { #[offset(0)] diff --git a/tests/unit/out/refcount/union_addrof_external.rs b/tests/unit/out/refcount/union_addrof_external.rs index 2428b5a248..38db75558a 100644 --- a/tests/unit/out/refcount/union_addrof_external.rs +++ b/tests/unit/out/refcount/union_addrof_external.rs @@ -6,17 +6,7 @@ use std::io::prelude::*; use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; -#[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(16)] pub struct record { #[offset(0)] @@ -42,9 +32,7 @@ impl Default for record { } } } -#[derive( - VaArg, FnPtrArg, Destructible, TriviallyCopyable, Copyable, ByteRepr, Clone, ZeroInitialization, -)] +#[derive(VaArg, FnPtrArg, TriviallyCopyable, ByteRepr, Clone, ZeroInitialization)] #[byte_size(128)] pub struct anon_0 { #[offset(0)] @@ -68,16 +56,7 @@ impl Default for anon_0 { } } #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(128)] pub struct Container { diff --git a/tests/unit/out/refcount/union_basic.rs b/tests/unit/out/refcount/union_basic.rs index 49e772bf6a..4c0b892186 100644 --- a/tests/unit/out/refcount/union_basic.rs +++ b/tests/unit/out/refcount/union_basic.rs @@ -6,9 +6,7 @@ use std::io::prelude::*; use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; -#[derive( - VaArg, FnPtrArg, Destructible, TriviallyCopyable, Copyable, ByteRepr, Clone, ZeroInitialization, -)] +#[derive(VaArg, FnPtrArg, TriviallyCopyable, ByteRepr, Clone, ZeroInitialization)] #[byte_size(4)] pub struct basic { #[offset(0)] @@ -31,9 +29,7 @@ impl Default for basic { } } } -#[derive( - VaArg, FnPtrArg, Destructible, TriviallyCopyable, Copyable, ByteRepr, Clone, ZeroInitialization, -)] +#[derive(VaArg, FnPtrArg, TriviallyCopyable, ByteRepr, Clone, ZeroInitialization)] #[byte_size(1)] pub struct empty { #[offset(0)] @@ -49,9 +45,7 @@ impl Default for empty { } } } -#[derive( - VaArg, FnPtrArg, Destructible, TriviallyCopyable, Copyable, ByteRepr, Clone, ZeroInitialization, -)] +#[derive(VaArg, FnPtrArg, TriviallyCopyable, ByteRepr, Clone, ZeroInitialization)] #[byte_size(8)] pub struct underscores { #[offset(0)] @@ -129,9 +123,7 @@ fn main_0() -> i32 { assert!(((__ + ___) == 3)); return 0; } -#[derive( - VaArg, FnPtrArg, Destructible, TriviallyCopyable, Copyable, ByteRepr, Clone, ZeroInitialization, -)] +#[derive(VaArg, FnPtrArg, TriviallyCopyable, ByteRepr, Clone, ZeroInitialization)] #[byte_size(4)] pub struct anon_0 { #[offset(0)] diff --git a/tests/unit/out/refcount/union_cross_arm_cast.rs b/tests/unit/out/refcount/union_cross_arm_cast.rs index ce0dbe8fda..bc6e773407 100644 --- a/tests/unit/out/refcount/union_cross_arm_cast.rs +++ b/tests/unit/out/refcount/union_cross_arm_cast.rs @@ -6,17 +6,7 @@ use std::io::prelude::*; use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; -#[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(16)] pub struct shape_a { #[offset(0)] @@ -36,17 +26,7 @@ impl Default for shape_a { } } } -#[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(28)] pub struct shape_b { #[offset(0)] @@ -75,9 +55,7 @@ impl Default for shape_b { } } } -#[derive( - VaArg, FnPtrArg, Destructible, TriviallyCopyable, Copyable, ByteRepr, Clone, ZeroInitialization, -)] +#[derive(VaArg, FnPtrArg, TriviallyCopyable, ByteRepr, Clone, ZeroInitialization)] #[byte_size(64)] pub struct anon_0 { #[offset(0)] @@ -104,16 +82,7 @@ impl Default for anon_0 { } } #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(68)] pub struct Container { diff --git a/tests/unit/out/refcount/union_field_alignment.rs b/tests/unit/out/refcount/union_field_alignment.rs index ecaf33055b..d91fb62317 100644 --- a/tests/unit/out/refcount/union_field_alignment.rs +++ b/tests/unit/out/refcount/union_field_alignment.rs @@ -6,9 +6,7 @@ use std::io::prelude::*; use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; -#[derive( - VaArg, FnPtrArg, Destructible, TriviallyCopyable, Copyable, ByteRepr, Clone, ZeroInitialization, -)] +#[derive(VaArg, FnPtrArg, TriviallyCopyable, ByteRepr, Clone, ZeroInitialization)] #[byte_size(8)] pub struct anon_0 { #[offset(0)] @@ -32,16 +30,7 @@ impl Default for anon_0 { } } #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(16)] pub struct node { diff --git a/tests/unit/out/refcount/union_flex_array_member.rs b/tests/unit/out/refcount/union_flex_array_member.rs index a7f3458080..a69afd6de5 100644 --- a/tests/unit/out/refcount/union_flex_array_member.rs +++ b/tests/unit/out/refcount/union_flex_array_member.rs @@ -6,9 +6,7 @@ use std::io::prelude::*; use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; -#[derive( - VaArg, FnPtrArg, Destructible, TriviallyCopyable, Copyable, ByteRepr, Clone, ZeroInitialization, -)] +#[derive(VaArg, FnPtrArg, TriviallyCopyable, ByteRepr, Clone, ZeroInitialization)] #[byte_size(8)] pub struct anon_0 { #[offset(0)] @@ -32,16 +30,7 @@ impl Default for anon_0 { } } #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(24)] pub struct node { diff --git a/tests/unit/out/refcount/union_memset_memcpy.rs b/tests/unit/out/refcount/union_memset_memcpy.rs index 25d4f6717f..e215d22c1b 100644 --- a/tests/unit/out/refcount/union_memset_memcpy.rs +++ b/tests/unit/out/refcount/union_memset_memcpy.rs @@ -6,17 +6,7 @@ use std::io::prelude::*; use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; -#[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(16)] pub struct shape_a { #[offset(0)] @@ -36,17 +26,7 @@ impl Default for shape_a { } } } -#[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(16)] pub struct shape_b { #[offset(0)] @@ -72,9 +52,7 @@ impl Default for shape_b { } } } -#[derive( - VaArg, FnPtrArg, Destructible, TriviallyCopyable, Copyable, ByteRepr, Clone, ZeroInitialization, -)] +#[derive(VaArg, FnPtrArg, TriviallyCopyable, ByteRepr, Clone, ZeroInitialization)] #[byte_size(256)] pub struct anon_0 { #[offset(0)] @@ -101,16 +79,7 @@ impl Default for anon_0 { } } #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(256)] pub struct Container { diff --git a/tests/unit/out/refcount/union_nested.rs b/tests/unit/out/refcount/union_nested.rs index 1f9cfa6b9c..3acf138887 100644 --- a/tests/unit/out/refcount/union_nested.rs +++ b/tests/unit/out/refcount/union_nested.rs @@ -6,17 +6,7 @@ use std::io::prelude::*; use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; -#[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, -)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(16)] pub struct record { #[offset(0)] @@ -36,9 +26,7 @@ impl Default for record { } } } -#[derive( - VaArg, FnPtrArg, Destructible, TriviallyCopyable, Copyable, ByteRepr, Clone, ZeroInitialization, -)] +#[derive(VaArg, FnPtrArg, TriviallyCopyable, ByteRepr, Clone, ZeroInitialization)] #[byte_size(128)] pub struct anon_0 { #[offset(0)] @@ -62,16 +50,7 @@ impl Default for anon_0 { } } #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(128)] pub struct inner { @@ -79,9 +58,7 @@ pub struct inner { #[byte_size(128)] pub view: anon_0, } -#[derive( - VaArg, FnPtrArg, Destructible, TriviallyCopyable, Copyable, ByteRepr, Clone, ZeroInitialization, -)] +#[derive(VaArg, FnPtrArg, TriviallyCopyable, ByteRepr, Clone, ZeroInitialization)] #[byte_size(128)] pub struct anon_1 { #[offset(0)] @@ -105,16 +82,7 @@ impl Default for anon_1 { } } #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(144)] pub struct Outer { diff --git a/tests/unit/out/refcount/union_pointer_pun_address.rs b/tests/unit/out/refcount/union_pointer_pun_address.rs index 214359649b..687deafd25 100644 --- a/tests/unit/out/refcount/union_pointer_pun_address.rs +++ b/tests/unit/out/refcount/union_pointer_pun_address.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct node_a { @@ -25,16 +15,7 @@ pub struct node_a { pub n: i32, } #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(16)] pub struct node_b { @@ -57,9 +38,7 @@ fn main_0() -> i32 { assert!(({ (out).to_any() } == { (a.as_pointer()).to_any() })); return 0; } -#[derive( - VaArg, FnPtrArg, Destructible, TriviallyCopyable, Copyable, ByteRepr, Clone, ZeroInitialization, -)] +#[derive(VaArg, FnPtrArg, TriviallyCopyable, ByteRepr, Clone, ZeroInitialization)] #[byte_size(8)] pub struct anon_0 { #[offset(0)] diff --git a/tests/unit/out/refcount/union_pointer_pun_writethrough.rs b/tests/unit/out/refcount/union_pointer_pun_writethrough.rs index 5be7aa8146..222fc22741 100644 --- a/tests/unit/out/refcount/union_pointer_pun_writethrough.rs +++ b/tests/unit/out/refcount/union_pointer_pun_writethrough.rs @@ -18,9 +18,7 @@ fn main_0() -> i32 { assert!(({ ((*x.borrow()) == 42_i64) })); return 0; } -#[derive( - VaArg, FnPtrArg, Destructible, TriviallyCopyable, Copyable, ByteRepr, Clone, ZeroInitialization, -)] +#[derive(VaArg, FnPtrArg, TriviallyCopyable, ByteRepr, Clone, ZeroInitialization)] #[byte_size(8)] pub struct anon_0 { #[offset(0)] diff --git a/tests/unit/out/refcount/union_struct_dual_use.rs b/tests/unit/out/refcount/union_struct_dual_use.rs index 645db424f9..202db6881e 100644 --- a/tests/unit/out/refcount/union_struct_dual_use.rs +++ b/tests/unit/out/refcount/union_struct_dual_use.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Inner { @@ -29,9 +19,7 @@ pub struct Inner { pub fn sum_inner_0(mut i: Ptr) -> i32 { return ({ i.with(|__s| __s.a) } + { i.with(|__s| __s.b) }); } -#[derive( - VaArg, FnPtrArg, Destructible, TriviallyCopyable, Copyable, ByteRepr, Clone, ZeroInitialization, -)] +#[derive(VaArg, FnPtrArg, TriviallyCopyable, ByteRepr, Clone, ZeroInitialization)] #[byte_size(16)] pub struct anon_1 { #[offset(0)] @@ -55,16 +43,7 @@ impl Default for anon_1 { } } #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(16)] pub struct Outer { diff --git a/tests/unit/out/refcount/union_tagged_many_arms.rs b/tests/unit/out/refcount/union_tagged_many_arms.rs index 259defddbf..68a74d495f 100644 --- a/tests/unit/out/refcount/union_tagged_many_arms.rs +++ b/tests/unit/out/refcount/union_tagged_many_arms.rs @@ -12,9 +12,7 @@ pub const Tag_enum_T_NUM_U: Tag_enum = 1; pub const Tag_enum_T_TEXT: Tag_enum = 2; pub const Tag_enum_T_FLOAT: Tag_enum = 3; pub const Tag_enum_T_REF: Tag_enum = 4; -#[derive( - VaArg, FnPtrArg, Destructible, TriviallyCopyable, Copyable, ByteRepr, Clone, ZeroInitialization, -)] +#[derive(VaArg, FnPtrArg, TriviallyCopyable, ByteRepr, Clone, ZeroInitialization)] #[byte_size(8)] pub struct anon_0 { #[offset(0)] @@ -47,16 +45,7 @@ impl Default for anon_0 { } } #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(16)] pub struct Slot { diff --git a/tests/unit/out/refcount/union_tagged_simple.rs b/tests/unit/out/refcount/union_tagged_simple.rs index c953287182..9ac26454c1 100644 --- a/tests/unit/out/refcount/union_tagged_simple.rs +++ b/tests/unit/out/refcount/union_tagged_simple.rs @@ -9,9 +9,7 @@ use std::rc::{Rc, Weak}; pub type Kind_enum = u32; pub const Kind_enum_KIND_NONE: Kind_enum = 0; pub const Kind_enum_KIND_DONE: Kind_enum = 1; -#[derive( - VaArg, FnPtrArg, Destructible, TriviallyCopyable, Copyable, ByteRepr, Clone, ZeroInitialization, -)] +#[derive(VaArg, FnPtrArg, TriviallyCopyable, ByteRepr, Clone, ZeroInitialization)] #[byte_size(8)] pub struct anon_0 { #[offset(0)] @@ -35,16 +33,7 @@ impl Default for anon_0 { } } #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(24)] pub struct Event { diff --git a/tests/unit/out/refcount/union_tagged_struct_arms.rs b/tests/unit/out/refcount/union_tagged_struct_arms.rs index 89ab921cd8..761cc43908 100644 --- a/tests/unit/out/refcount/union_tagged_struct_arms.rs +++ b/tests/unit/out/refcount/union_tagged_struct_arms.rs @@ -11,16 +11,7 @@ pub const Choice_enum_C_LIST: Choice_enum = 1; pub const Choice_enum_C_LETTERS: Choice_enum = 2; pub const Choice_enum_C_INTEGERS: Choice_enum = 3; #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(24)] pub struct anon_1 { @@ -33,17 +24,7 @@ pub struct anon_1 { pub cursor: i64, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(16)] pub struct anon_2 { @@ -57,17 +38,7 @@ pub struct anon_2 { pub step: u8, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(40)] pub struct anon_3 { @@ -82,9 +53,7 @@ pub struct anon_3 { #[offset(32)] pub width: i32, } -#[derive( - VaArg, FnPtrArg, Destructible, TriviallyCopyable, Copyable, ByteRepr, Clone, ZeroInitialization, -)] +#[derive(VaArg, FnPtrArg, TriviallyCopyable, ByteRepr, Clone, ZeroInitialization)] #[byte_size(40)] pub struct anon_0 { #[offset(0)] @@ -111,16 +80,7 @@ impl Default for anon_0 { } } #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(48)] pub struct Branch { diff --git a/tests/unit/out/refcount/union_void_ptr_sized_deref.rs b/tests/unit/out/refcount/union_void_ptr_sized_deref.rs index 7bf9f4e19b..ee6473ddef 100644 --- a/tests/unit/out/refcount/union_void_ptr_sized_deref.rs +++ b/tests/unit/out/refcount/union_void_ptr_sized_deref.rs @@ -10,9 +10,7 @@ pub type Width_enum = u32; pub const Width_enum_W_64: Width_enum = 0; pub const Width_enum_W_32: Width_enum = 1; pub const Width_enum_W_16: Width_enum = 2; -#[derive( - VaArg, FnPtrArg, Destructible, TriviallyCopyable, Copyable, ByteRepr, Clone, ZeroInitialization, -)] +#[derive(VaArg, FnPtrArg, TriviallyCopyable, ByteRepr, Clone, ZeroInitialization)] #[byte_size(8)] pub struct anon_0 { #[offset(0)] @@ -42,16 +40,7 @@ impl Default for anon_0 { } } #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(16)] pub struct Sink { diff --git a/tests/unit/out/refcount/unique_ptr.rs b/tests/unit/out/refcount/unique_ptr.rs index 0a3289789e..cfe9c99961 100644 --- a/tests/unit/out/refcount/unique_ptr.rs +++ b/tests/unit/out/refcount/unique_ptr.rs @@ -17,17 +17,7 @@ pub struct SafePointer { pub ptr: Option>, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Pair { diff --git a/tests/unit/out/refcount/unique_ptr_field_reset.rs b/tests/unit/out/refcount/unique_ptr_field_reset.rs index 7f757b4804..b2349d77b5 100644 --- a/tests/unit/out/refcount/unique_ptr_field_reset.rs +++ b/tests/unit/out/refcount/unique_ptr_field_reset.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Data { diff --git a/tests/unit/out/refcount/unique_ptr_nested.rs b/tests/unit/out/refcount/unique_ptr_nested.rs index f98a913437..44621e9e33 100644 --- a/tests/unit/out/refcount/unique_ptr_nested.rs +++ b/tests/unit/out/refcount/unique_ptr_nested.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Inner { diff --git a/tests/unit/out/refcount/unique_ptr_struct.rs b/tests/unit/out/refcount/unique_ptr_struct.rs index 221dcfab5b..f2bd49ae0b 100644 --- a/tests/unit/out/refcount/unique_ptr_struct.rs +++ b/tests/unit/out/refcount/unique_ptr_struct.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Point { diff --git a/tests/unit/out/refcount/va_arg_mixed_types.rs b/tests/unit/out/refcount/va_arg_mixed_types.rs index de889e0015..2a0b78aa51 100644 --- a/tests/unit/out/refcount/va_arg_mixed_types.rs +++ b/tests/unit/out/refcount/va_arg_mixed_types.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct pair { diff --git a/tests/unit/out/refcount/va_arg_non_primitive_ptrs.rs b/tests/unit/out/refcount/va_arg_non_primitive_ptrs.rs index 0a2b3cdb42..d606d5b110 100644 --- a/tests/unit/out/refcount/va_arg_non_primitive_ptrs.rs +++ b/tests/unit/out/refcount/va_arg_non_primitive_ptrs.rs @@ -7,16 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(16)] pub struct node { diff --git a/tests/unit/out/refcount/va_arg_struct_ctx.rs b/tests/unit/out/refcount/va_arg_struct_ctx.rs index bc138a02a8..b68607d5f1 100644 --- a/tests/unit/out/refcount/va_arg_struct_ctx.rs +++ b/tests/unit/out/refcount/va_arg_struct_ctx.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct context { @@ -35,9 +25,7 @@ pub fn set_error_0(mut ctx: Ptr, fmt: Ptr, __args: Box<[VaArg]>) { field!(ctx, last_error).write((*ap.borrow_mut()).arg::()); } } -#[derive( - VaArg, FnPtrArg, Destructible, TriviallyCopyable, Copyable, ByteRepr, Clone, ZeroInitialization, -)] +#[derive(VaArg, FnPtrArg, TriviallyCopyable, ByteRepr, Clone, ZeroInitialization)] #[byte_size(8)] pub struct value { #[offset(0)] diff --git a/tests/unit/out/refcount/va_arg_void_ptr.rs b/tests/unit/out/refcount/va_arg_void_ptr.rs index ca2c5911ad..9a7b947b8f 100644 --- a/tests/unit/out/refcount/va_arg_void_ptr.rs +++ b/tests/unit/out/refcount/va_arg_void_ptr.rs @@ -7,16 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(16)] pub struct registry { diff --git a/tests/unit/out/refcount/va_list_field.rs b/tests/unit/out/refcount/va_list_field.rs index f941d3cc68..274f49b328 100644 --- a/tests/unit/out/refcount/va_list_field.rs +++ b/tests/unit/out/refcount/va_list_field.rs @@ -66,16 +66,7 @@ pub fn sum_ptr_2(n: i32, __args: Box<[VaArg]>) -> i32 { return total; } #[derive( - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Cursor_3 { diff --git a/tests/unit/out/refcount/vector.rs b/tests/unit/out/refcount/vector.rs index 16499c8067..2339640e96 100644 --- a/tests/unit/out/refcount/vector.rs +++ b/tests/unit/out/refcount/vector.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct S { @@ -58,9 +48,7 @@ pub struct Foo { VaArg, FnPtrArg, CppFrom, - Destructible, TriviallyCopyable, - Copyable, Default, )] #[cpp_from(i32, construct, value)] diff --git a/tests/unit/out/refcount/vector_iter_range_ctor.rs b/tests/unit/out/refcount/vector_iter_range_ctor.rs index 0ca6cc0628..6b64a33821 100644 --- a/tests/unit/out/refcount/vector_iter_range_ctor.rs +++ b/tests/unit/out/refcount/vector_iter_range_ctor.rs @@ -15,9 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, CppFrom, - Destructible, TriviallyCopyable, - Copyable, Default, )] #[cpp_from(i32, construct, value)] @@ -35,9 +33,7 @@ pub struct Degrees { VaArg, FnPtrArg, CppFrom, - Destructible, TriviallyCopyable, - Copyable, Default, )] #[cpp_into(i64, to_i64)] diff --git a/tests/unit/out/refcount/vector_subscript_direct.rs b/tests/unit/out/refcount/vector_subscript_direct.rs index ad0081ca62..b7ffae56bc 100644 --- a/tests/unit/out/refcount/vector_subscript_direct.rs +++ b/tests/unit/out/refcount/vector_subscript_direct.rs @@ -7,17 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Point { diff --git a/tests/unit/out/refcount/vector_with_allocator.rs b/tests/unit/out/refcount/vector_with_allocator.rs index a6fc89c2d4..bf2a2a2fae 100644 --- a/tests/unit/out/refcount/vector_with_allocator.rs +++ b/tests/unit/out/refcount/vector_with_allocator.rs @@ -7,32 +7,12 @@ use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct TestAllocator_int_ {} #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct TestAllocator_double_ {} diff --git a/tests/unit/out/refcount/void_cast.rs b/tests/unit/out/refcount/void_cast.rs index 9f965cdacd..6d4cfd5995 100644 --- a/tests/unit/out/refcount/void_cast.rs +++ b/tests/unit/out/refcount/void_cast.rs @@ -38,17 +38,7 @@ pub fn bump_and_return_4() -> i32 { return side_effect_counter_3.with(|rc| *rc.borrow()); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - TriviallyCopyable, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Holder { diff --git a/tests/unit/out/unsafe/05_new.rs b/tests/unit/out/unsafe/05_new.rs index 041cc64def..ebd9cebebf 100644 --- a/tests/unit/out/unsafe/05_new.rs +++ b/tests/unit/out/unsafe/05_new.rs @@ -8,28 +8,12 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct A {} #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct D {} impl D { diff --git a/tests/unit/out/unsafe/10_struct.rs b/tests/unit/out/unsafe/10_struct.rs index 57a940d385..613fd301d0 100644 --- a/tests/unit/out/unsafe/10_struct.rs +++ b/tests/unit/out/unsafe/10_struct.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct GraphNode { pub dst: u32, @@ -24,15 +16,7 @@ pub struct GraphNode { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Graph { pub V: u32, @@ -51,16 +35,7 @@ impl Graph { } } #[repr(C)] -#[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct Partial { pub p: *mut i32, } @@ -80,29 +55,13 @@ impl Default for Partial { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Declared {} impl Declared {} #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct S { pub i: i32, diff --git a/tests/unit/out/unsafe/addr_of_global.rs b/tests/unit/out/unsafe/addr_of_global.rs index 448c3e2af3..5e47f92c63 100644 --- a/tests/unit/out/unsafe/addr_of_global.rs +++ b/tests/unit/out/unsafe/addr_of_global.rs @@ -8,30 +8,14 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Inner { pub value: i32, } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Outer { pub p: *mut Inner, diff --git a/tests/unit/out/unsafe/anonymous-struct.rs b/tests/unit/out/unsafe/anonymous-struct.rs index 5985ca0bc0..fc1e8b5c3a 100644 --- a/tests/unit/out/unsafe/anonymous-struct.rs +++ b/tests/unit/out/unsafe/anonymous-struct.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Outer_Named { pub a: i32, @@ -24,15 +16,7 @@ pub struct Outer_Named { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct anon_0 { pub c: i32, @@ -40,15 +24,7 @@ pub struct anon_0 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct anon_1 { pub g: i32, @@ -56,15 +32,7 @@ pub struct anon_1 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct anon_2 { pub e: i32, @@ -72,45 +40,21 @@ pub struct anon_2 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct anon_4 { pub j: i32, } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct anon_5 { pub k: i32, } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct anon_3 { pub i: i32, @@ -119,15 +63,7 @@ pub struct anon_3 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Outer { pub named: Outer_Named, @@ -185,15 +121,7 @@ unsafe fn main_0() -> i32 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct anon_6 { pub x: i32, diff --git a/tests/unit/out/unsafe/anonymous-struct_c.rs b/tests/unit/out/unsafe/anonymous-struct_c.rs index 511f8acab2..405a2cac0b 100644 --- a/tests/unit/out/unsafe/anonymous-struct_c.rs +++ b/tests/unit/out/unsafe/anonymous-struct_c.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Named { pub a: i32, @@ -24,15 +16,7 @@ pub struct Named { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct anon_0 { pub c: i32, @@ -40,15 +24,7 @@ pub struct anon_0 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct anon_1 { pub g: i32, @@ -56,15 +32,7 @@ pub struct anon_1 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct anon_2 { pub e: i32, @@ -72,45 +40,21 @@ pub struct anon_2 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct anon_4 { pub j: i32, } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct anon_5 { pub k: i32, } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct anon_3 { pub i: i32, @@ -119,15 +63,7 @@ pub struct anon_3 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Outer { pub named: Named, @@ -191,15 +127,7 @@ unsafe fn main_0() -> i32 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct anon_6 { pub x: i32, diff --git a/tests/unit/out/unsafe/anonymous_enum.rs b/tests/unit/out/unsafe/anonymous_enum.rs index 057a2519fa..f8e6e55e5f 100644 --- a/tests/unit/out/unsafe/anonymous_enum.rs +++ b/tests/unit/out/unsafe/anonymous_enum.rs @@ -14,15 +14,7 @@ pub const anon_1_SECOND_A: anon_1 = 0; pub const anon_1_SECOND_B: anon_1 = 1; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct S { pub a: i32, @@ -35,15 +27,7 @@ pub const anon_2_FIELD_A: anon_2 = 0; pub const anon_2_FIELD_B: anon_2 = 1; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct WithAnonField { pub a: i32, diff --git a/tests/unit/out/unsafe/anonymous_enum_c.rs b/tests/unit/out/unsafe/anonymous_enum_c.rs index 3b1910757d..05055b8ed6 100644 --- a/tests/unit/out/unsafe/anonymous_enum_c.rs +++ b/tests/unit/out/unsafe/anonymous_enum_c.rs @@ -14,15 +14,7 @@ pub const anon_1_SECOND_A: anon_1 = 0; pub const anon_1_SECOND_B: anon_1 = 1; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct S { pub a: i32, @@ -35,15 +27,7 @@ pub const anon_2_FIELD_A: anon_2 = 0; pub const anon_2_FIELD_B: anon_2 = 1; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct WithAnonField { pub a: i32, diff --git a/tests/unit/out/unsafe/any.rs b/tests/unit/out/unsafe/any.rs index 1517c3df98..855caed29d 100644 --- a/tests/unit/out/unsafe/any.rs +++ b/tests/unit/out/unsafe/any.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Point { pub x: i32, diff --git a/tests/unit/out/unsafe/array_const_init.rs b/tests/unit/out/unsafe/array_const_init.rs index 9630936a3c..2f76988087 100644 --- a/tests/unit/out/unsafe/array_const_init.rs +++ b/tests/unit/out/unsafe/array_const_init.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct S { pub head: i32, @@ -32,15 +24,7 @@ pub static mut s_0: std::cell::LazyCell = std::cell::LazyCell::new(|| unsafe }); #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct P { pub x: i32, diff --git a/tests/unit/out/unsafe/array_field_addr.rs b/tests/unit/out/unsafe/array_field_addr.rs index 95d8fc9e53..2625480bd5 100644 --- a/tests/unit/out/unsafe/array_field_addr.rs +++ b/tests/unit/out/unsafe/array_field_addr.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct S { pub before: i32, diff --git a/tests/unit/out/unsafe/array_reference.rs b/tests/unit/out/unsafe/array_reference.rs index 596b6dd301..77bec757c9 100644 --- a/tests/unit/out/unsafe/array_reference.rs +++ b/tests/unit/out/unsafe/array_reference.rs @@ -58,15 +58,7 @@ pub unsafe fn pick_10(s: *const [libc::c_char; 5]) -> *const [libc::c_char; 5] { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Point { pub x: i32, diff --git a/tests/unit/out/unsafe/as_const.rs b/tests/unit/out/unsafe/as_const.rs index 159376f61d..268e0a0336 100644 --- a/tests/unit/out/unsafe/as_const.rs +++ b/tests/unit/out/unsafe/as_const.rs @@ -11,15 +11,7 @@ pub const Overload_kMutableOverload: Overload = 1; pub const Overload_kConstOverload: Overload = 2; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct S { pub v: i32, diff --git a/tests/unit/out/unsafe/assign_rhs_first.rs b/tests/unit/out/unsafe/assign_rhs_first.rs index 7b8230333c..65997d2d5d 100644 --- a/tests/unit/out/unsafe/assign_rhs_first.rs +++ b/tests/unit/out/unsafe/assign_rhs_first.rs @@ -14,15 +14,7 @@ pub unsafe fn advance_1() -> i32 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct S { pub ptr: *mut i32, diff --git a/tests/unit/out/unsafe/assignment_single_eval.rs b/tests/unit/out/unsafe/assignment_single_eval.rs index 33006d3ae1..128874e05c 100644 --- a/tests/unit/out/unsafe/assignment_single_eval.rs +++ b/tests/unit/out/unsafe/assignment_single_eval.rs @@ -837,45 +837,21 @@ pub unsafe fn test_reference_members_9() { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Slot_6 { pub value: *mut u32, } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Slot_8 { pub value: *mut i16, } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Slot_10 { pub value: *mut i32, @@ -926,15 +902,7 @@ pub unsafe fn test_pointer_elements_11() { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Holder_12 { pub p: *mut i32, @@ -962,15 +930,7 @@ pub unsafe fn test_reference_pointer_13() { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Node_14 { pub link: *mut *mut Node_14, @@ -1045,60 +1005,28 @@ pub unsafe fn test_reference_subfields_18() { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Index_16 { pub value: u32, } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Slot_17 { pub ref_: *mut Index_16, } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Index_19 { pub value: i16, } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Slot_20 { pub ref_: *mut Index_19, @@ -1140,30 +1068,14 @@ pub unsafe fn observe_24(mut assigned: i32, mut stored: *const i32) -> i32 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct GlobalRecord_Inner { pub value: i32, } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct GlobalRecord { pub inner: GlobalRecord_Inner, @@ -1431,30 +1343,14 @@ static mut promoted_30: std::cell::LazyCell = std::cell::LazyCell::new(|| u static mut flag_31: std::cell::LazyCell = std::cell::LazyCell::new(|| unsafe { false }); #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Record_32 { pub value: i32, } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Link_33 { pub next: *mut Link_33, @@ -1463,15 +1359,7 @@ pub static mut selected_values_34: std::cell::LazyCell<[u32; 3]> = std::cell::LazyCell::new(|| unsafe { [0_u32, 20_u32, 30_u32] }); #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct IndexedBinding {} impl IndexedBinding { @@ -1692,15 +1580,7 @@ pub static mut global_rows_46: std::cell::LazyCell<[[u32; 2]; 2]> = std::cell::LazyCell::new(|| unsafe { [[0_u32, 10_u32], [20_u32, 30_u32]] }); #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct IndexedMember { pub key: i32, @@ -1961,15 +1841,7 @@ pub static mut scoped_pointers_53: std::cell::LazyCell<[*mut u32; 1]> = }); #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct PointerSelector { pub ptr: *mut u32, @@ -2144,15 +2016,7 @@ pub struct Counts_59 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Pair_60 { pub u: u32, @@ -2456,30 +2320,14 @@ unsafe fn main_0() -> i32 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Index_62 { pub value: i32, } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Owner_63 { pub values: [i32; 2], diff --git a/tests/unit/out/unsafe/bounded_struct_ptr.rs b/tests/unit/out/unsafe/bounded_struct_ptr.rs index babf1c099f..16f0402ee3 100644 --- a/tests/unit/out/unsafe/bounded_struct_ptr.rs +++ b/tests/unit/out/unsafe/bounded_struct_ptr.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Foo { pub x1: i32, diff --git a/tests/unit/out/unsafe/bst.rs b/tests/unit/out/unsafe/bst.rs index ddd5a75247..0058a5ad73 100644 --- a/tests/unit/out/unsafe/bst.rs +++ b/tests/unit/out/unsafe/bst.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct node_t { pub left: *mut node_t, diff --git a/tests/unit/out/unsafe/c_struct.rs b/tests/unit/out/unsafe/c_struct.rs index 4f7d137dc8..ff68b685b8 100644 --- a/tests/unit/out/unsafe/c_struct.rs +++ b/tests/unit/out/unsafe/c_struct.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Point { pub x: i32, @@ -24,15 +16,7 @@ pub struct Point { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Line { pub start: Point, @@ -40,15 +24,7 @@ pub struct Line { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Node { pub value: i32, @@ -60,15 +36,7 @@ pub const Color_GREEN: Color = 1; pub const Color_BLUE: Color = 2; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Inner { pub a: i32, @@ -76,15 +44,7 @@ pub struct Inner { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Container { pub inner: Inner, diff --git a/tests/unit/out/unsafe/cast.rs b/tests/unit/out/unsafe/cast.rs index e14105cd59..3d531690a9 100644 --- a/tests/unit/out/unsafe/cast.rs +++ b/tests/unit/out/unsafe/cast.rs @@ -12,15 +12,7 @@ pub const E_B: E = 1; pub const E_C: E = 2; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Pair { pub x: i32, @@ -28,30 +20,14 @@ pub struct Pair { } #[repr(C, align(64))] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Wide { pub c: libc::c_char, } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Grid { pub h: i32, diff --git a/tests/unit/out/unsafe/cast_array_to_pointer_decay.rs b/tests/unit/out/unsafe/cast_array_to_pointer_decay.rs index 89c1c98d88..325a9458f0 100644 --- a/tests/unit/out/unsafe/cast_array_to_pointer_decay.rs +++ b/tests/unit/out/unsafe/cast_array_to_pointer_decay.rs @@ -18,15 +18,7 @@ pub unsafe fn strlen_1(mut s: *mut libc::c_char) -> i32 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Row { pub a: [i32; 3], diff --git a/tests/unit/out/unsafe/class.rs b/tests/unit/out/unsafe/class.rs index e2bdf5eae9..750d263682 100644 --- a/tests/unit/out/unsafe/class.rs +++ b/tests/unit/out/unsafe/class.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Pair { pub first: i32, @@ -53,15 +45,7 @@ impl Pair { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Route { pub path: Pair, @@ -76,15 +60,7 @@ impl Route { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Counter { pub v: i32, @@ -108,15 +84,7 @@ impl std::cmp::PartialEq for Counter { impl std::cmp::Eq for Counter {} #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Tally { pub calls: i32, diff --git a/tests/unit/out/unsafe/class_template_lazy_member.rs b/tests/unit/out/unsafe/class_template_lazy_member.rs index 86d66b63a8..94e7837f31 100644 --- a/tests/unit/out/unsafe/class_template_lazy_member.rs +++ b/tests/unit/out/unsafe/class_template_lazy_member.rs @@ -8,30 +8,14 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Point { pub x: i32, } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Box_int_ { pub val: i32, @@ -43,15 +27,7 @@ impl Box_int_ { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Box_Point_ { pub val: Point, @@ -63,15 +39,7 @@ impl Box_Point_ { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Deduced_int_ { pub val: i32, @@ -83,15 +51,7 @@ impl Deduced_int_ { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Deduced_Point_ { pub val: Point, diff --git a/tests/unit/out/unsafe/class_templates.rs b/tests/unit/out/unsafe/class_templates.rs index 70aec70bcb..22557ec64c 100644 --- a/tests/unit/out/unsafe/class_templates.rs +++ b/tests/unit/out/unsafe/class_templates.rs @@ -131,15 +131,7 @@ impl MyContainer_float_ { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Boxed_short_ { pub value: i16, @@ -154,15 +146,7 @@ impl Boxed_short_ { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Boxed_int_ { pub value: i32, @@ -177,15 +161,7 @@ impl Boxed_int_ { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Boxed_long_ { pub value: i64, @@ -200,15 +176,7 @@ impl Boxed_long_ { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Outer_int__Inner_int_ { pub t: i32, @@ -221,15 +189,7 @@ impl Outer_int__Inner_int_ { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Outer_int_ { pub v: i32, @@ -241,15 +201,7 @@ impl Outer_int_ { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Outer_long__Inner_int_ { pub t: i64, @@ -262,15 +214,7 @@ impl Outer_long__Inner_int_ { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Outer_long__Inner_char_ { pub t: i64, @@ -283,15 +227,7 @@ impl Outer_long__Inner_char_ { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Outer_long_ { pub v: i64, @@ -303,15 +239,7 @@ impl Outer_long_ { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Elem { pub i: i32, diff --git a/tests/unit/out/unsafe/clone_vs_move.rs b/tests/unit/out/unsafe/clone_vs_move.rs index fc76e031c0..1bb270b340 100644 --- a/tests/unit/out/unsafe/clone_vs_move.rs +++ b/tests/unit/out/unsafe/clone_vs_move.rs @@ -8,30 +8,14 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Bar { pub w: i32, } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Foo { pub x: i32, @@ -42,15 +26,7 @@ pub struct Foo { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Refs { pub a: *mut i32, diff --git a/tests/unit/out/unsafe/comma_operator.rs b/tests/unit/out/unsafe/comma_operator.rs index dbdd962d71..2d4598027a 100644 --- a/tests/unit/out/unsafe/comma_operator.rs +++ b/tests/unit/out/unsafe/comma_operator.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Pair { pub first: i32, diff --git a/tests/unit/out/unsafe/complex_function.rs b/tests/unit/out/unsafe/complex_function.rs index b10b7d49d4..0e2b7bebfb 100644 --- a/tests/unit/out/unsafe/complex_function.rs +++ b/tests/unit/out/unsafe/complex_function.rs @@ -17,30 +17,14 @@ pub unsafe fn bar_2(x: *mut i32) -> *mut i32 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct X1 { pub v: i32, } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct X2 { pub v: *mut X1, @@ -52,15 +36,7 @@ impl X2 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct X3 { pub v: *mut X2, @@ -72,15 +48,7 @@ impl X3 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct X4 { pub v: X3, diff --git a/tests/unit/out/unsafe/compound_assign_paren.rs b/tests/unit/out/unsafe/compound_assign_paren.rs index 1da54ab99a..d04fd5c815 100644 --- a/tests/unit/out/unsafe/compound_assign_paren.rs +++ b/tests/unit/out/unsafe/compound_assign_paren.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Item { pub flags: u8, diff --git a/tests/unit/out/unsafe/concepts.rs b/tests/unit/out/unsafe/concepts.rs index e88a9624f9..480c879e74 100644 --- a/tests/unit/out/unsafe/concepts.rs +++ b/tests/unit/out/unsafe/concepts.rs @@ -13,15 +13,7 @@ const _: () = assert!( ); #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Sized {} impl Sized { diff --git a/tests/unit/out/unsafe/constexpr_function.rs b/tests/unit/out/unsafe/constexpr_function.rs index c10340f799..0ab56af31f 100644 --- a/tests/unit/out/unsafe/constexpr_function.rs +++ b/tests/unit/out/unsafe/constexpr_function.rs @@ -23,15 +23,7 @@ pub unsafe fn half_3(mut x: f64) -> f64 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Flag { pub v: i32, @@ -59,15 +51,7 @@ pub unsafe fn imm_7(mut b: bool) -> bool { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct P { pub v: i32, diff --git a/tests/unit/out/unsafe/constructor.rs b/tests/unit/out/unsafe/constructor.rs index fc4ffd01cd..61f6b2f371 100644 --- a/tests/unit/out/unsafe/constructor.rs +++ b/tests/unit/out/unsafe/constructor.rs @@ -38,15 +38,7 @@ impl DestructibleUnsafe for S { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - CppFromUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, TriviallyCopyableUnsafe, )] #[cpp_from(i32, construct_1, value)] pub struct Point { diff --git a/tests/unit/out/unsafe/conversion_operator_same_translation.rs b/tests/unit/out/unsafe/conversion_operator_same_translation.rs index f321a956de..a80b02ea99 100644 --- a/tests/unit/out/unsafe/conversion_operator_same_translation.rs +++ b/tests/unit/out/unsafe/conversion_operator_same_translation.rs @@ -14,9 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, - DestructibleUnsafe, TriviallyCopyableUnsafe, - CopyableUnsafe, Default, )] #[cpp_into(libc::c_char, to_libcc_char)] @@ -40,9 +38,7 @@ impl S { FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, - DestructibleUnsafe, TriviallyCopyableUnsafe, - CopyableUnsafe, Default, )] #[cpp_into(i64, to_i64_1)] diff --git a/tests/unit/out/unsafe/copy_move_defaulted.rs b/tests/unit/out/unsafe/copy_move_defaulted.rs index 4de070a3f1..3c6962454d 100644 --- a/tests/unit/out/unsafe/copy_move_defaulted.rs +++ b/tests/unit/out/unsafe/copy_move_defaulted.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Inner { pub x: i32, @@ -43,15 +35,7 @@ impl DestructibleUnsafe for Explicit { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Implicit { pub v: i32, diff --git a/tests/unit/out/unsafe/default.rs b/tests/unit/out/unsafe/default.rs index a8968fc265..7a7e47d5e3 100644 --- a/tests/unit/out/unsafe/default.rs +++ b/tests/unit/out/unsafe/default.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Pointers { pub x1: *mut i32, @@ -27,15 +19,7 @@ pub struct Pointers { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct SmallArrays { pub a: [i32; 32], @@ -44,16 +28,7 @@ pub struct SmallArrays { pub p: [Pointers; 2], } #[repr(C)] -#[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct BigArray { pub a: [i32; 33], } diff --git a/tests/unit/out/unsafe/default_function_arguments.rs b/tests/unit/out/unsafe/default_function_arguments.rs index 315f964fba..a4f692e6c7 100644 --- a/tests/unit/out/unsafe/default_function_arguments.rs +++ b/tests/unit/out/unsafe/default_function_arguments.rs @@ -14,15 +14,7 @@ pub unsafe fn baz_1(mut a: *mut i32, mut b: *mut i32) -> bool { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - CppFromUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, TriviallyCopyableUnsafe, )] #[cpp_from(i32, construct, value)] pub struct Bar { @@ -72,15 +64,7 @@ pub unsafe fn first_9(r: *mut [i32; 3]) -> i32 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Holder_int_ { pub v: i32, diff --git a/tests/unit/out/unsafe/default_in_statics.rs b/tests/unit/out/unsafe/default_in_statics.rs index e7cc601662..34002d7223 100644 --- a/tests/unit/out/unsafe/default_in_statics.rs +++ b/tests/unit/out/unsafe/default_in_statics.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Inner { pub v: i32, @@ -24,15 +16,7 @@ pub struct Inner { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Outer { pub p1: *mut i32, @@ -46,15 +30,7 @@ pub struct Outer { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Foo { pub s1: *const libc::c_char, diff --git a/tests/unit/out/unsafe/destructor_params.rs b/tests/unit/out/unsafe/destructor_params.rs index 0e81b43b86..59984412c7 100644 --- a/tests/unit/out/unsafe/destructor_params.rs +++ b/tests/unit/out/unsafe/destructor_params.rs @@ -28,15 +28,7 @@ pub unsafe fn with_default_3(mut s: S) -> i32 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Holder { pub v: i32, diff --git a/tests/unit/out/unsafe/doubly_linked_list.rs b/tests/unit/out/unsafe/doubly_linked_list.rs index 4a85d45824..49791e76f9 100644 --- a/tests/unit/out/unsafe/doubly_linked_list.rs +++ b/tests/unit/out/unsafe/doubly_linked_list.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Node { pub val: i32, diff --git a/tests/unit/out/unsafe/enum_default_in_static.rs b/tests/unit/out/unsafe/enum_default_in_static.rs index 29e8538098..5cad8e0ea3 100644 --- a/tests/unit/out/unsafe/enum_default_in_static.rs +++ b/tests/unit/out/unsafe/enum_default_in_static.rs @@ -12,15 +12,7 @@ pub const Mode_MODE_ONE: Mode = 1; pub const Mode_MODE_TWO: Mode = 2; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Config { pub count: i32, diff --git a/tests/unit/out/unsafe/enum_int_interop.rs b/tests/unit/out/unsafe/enum_int_interop.rs index fc27955386..465cf425c9 100644 --- a/tests/unit/out/unsafe/enum_int_interop.rs +++ b/tests/unit/out/unsafe/enum_int_interop.rs @@ -21,15 +21,7 @@ pub const Tag_TAG_ONE: Tag = 1; pub const Tag_TAG_TWO: Tag = 2; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Entry { pub name: *const libc::c_char, diff --git a/tests/unit/out/unsafe/enum_int_interop_c.rs b/tests/unit/out/unsafe/enum_int_interop_c.rs index f850f70e10..196efb71de 100644 --- a/tests/unit/out/unsafe/enum_int_interop_c.rs +++ b/tests/unit/out/unsafe/enum_int_interop_c.rs @@ -21,15 +21,7 @@ pub const Tag_enum_TAG_ONE: Tag_enum = 1; pub const Tag_enum_TAG_TWO: Tag_enum = 2; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Entry { pub name: *const libc::c_char, diff --git a/tests/unit/out/unsafe/enum_underlying_type.rs b/tests/unit/out/unsafe/enum_underlying_type.rs index 998c91f5b1..df814b3919 100644 --- a/tests/unit/out/unsafe/enum_underlying_type.rs +++ b/tests/unit/out/unsafe/enum_underlying_type.rs @@ -26,16 +26,7 @@ pub const Scoped_NEG: Scoped = -2; pub const Scoped_POS: Scoped = 2; pub type Empty = bool; #[repr(C)] -#[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct HoldsEmpty { pub e: Empty, } diff --git a/tests/unit/out/unsafe/exprs.rs b/tests/unit/out/unsafe/exprs.rs index ae37efcc36..587c772493 100644 --- a/tests/unit/out/unsafe/exprs.rs +++ b/tests/unit/out/unsafe/exprs.rs @@ -8,30 +8,14 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct X { pub x: i32, } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Y { pub x: X, diff --git a/tests/unit/out/unsafe/fft.rs b/tests/unit/out/unsafe/fft.rs index 3a89ee473e..4b58094771 100644 --- a/tests/unit/out/unsafe/fft.rs +++ b/tests/unit/out/unsafe/fft.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Complex { pub re: f64, diff --git a/tests/unit/out/unsafe/field_aliasing.rs b/tests/unit/out/unsafe/field_aliasing.rs index f7a0dff37e..ae45a46254 100644 --- a/tests/unit/out/unsafe/field_aliasing.rs +++ b/tests/unit/out/unsafe/field_aliasing.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct In { pub x: i32, @@ -24,15 +16,7 @@ pub struct In { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct S { pub in_: In, @@ -42,15 +26,7 @@ pub struct S { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Node { pub x: i32, diff --git a/tests/unit/out/unsafe/field_array_elem_ptr.rs b/tests/unit/out/unsafe/field_array_elem_ptr.rs index 5e64672553..9d94aafcd0 100644 --- a/tests/unit/out/unsafe/field_array_elem_ptr.rs +++ b/tests/unit/out/unsafe/field_array_elem_ptr.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Point { pub x: i32, @@ -24,15 +16,7 @@ pub struct Point { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Shape { pub id: i32, diff --git a/tests/unit/out/unsafe/field_method_receiver.rs b/tests/unit/out/unsafe/field_method_receiver.rs index ed7c8322bc..16651f982b 100644 --- a/tests/unit/out/unsafe/field_method_receiver.rs +++ b/tests/unit/out/unsafe/field_method_receiver.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Counter { pub n: i32, diff --git a/tests/unit/out/unsafe/field_pointers.rs b/tests/unit/out/unsafe/field_pointers.rs index f31160c797..996ddddf87 100644 --- a/tests/unit/out/unsafe/field_pointers.rs +++ b/tests/unit/out/unsafe/field_pointers.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Inner { pub a: i32, @@ -24,15 +16,7 @@ pub struct Inner { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Header { pub tag: i32, diff --git a/tests/unit/out/unsafe/field_pointers_malloced_struct.rs b/tests/unit/out/unsafe/field_pointers_malloced_struct.rs index 8851382acf..599048e691 100644 --- a/tests/unit/out/unsafe/field_pointers_malloced_struct.rs +++ b/tests/unit/out/unsafe/field_pointers_malloced_struct.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct S { pub a: i32, diff --git a/tests/unit/out/unsafe/field_reinterpret_write_through.rs b/tests/unit/out/unsafe/field_reinterpret_write_through.rs index d2418a9ad2..322d84a1ac 100644 --- a/tests/unit/out/unsafe/field_reinterpret_write_through.rs +++ b/tests/unit/out/unsafe/field_reinterpret_write_through.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct In { pub a: i16, @@ -24,15 +16,7 @@ pub struct In { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct S { pub x: i32, diff --git a/tests/unit/out/unsafe/find.rs b/tests/unit/out/unsafe/find.rs index 69f110d998..d6a9669f68 100644 --- a/tests/unit/out/unsafe/find.rs +++ b/tests/unit/out/unsafe/find.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct P { pub x: i32, diff --git a/tests/unit/out/unsafe/first_field_ptr_covers_struct.rs b/tests/unit/out/unsafe/first_field_ptr_covers_struct.rs index faa1ce4563..c8d27d5f2d 100644 --- a/tests/unit/out/unsafe/first_field_ptr_covers_struct.rs +++ b/tests/unit/out/unsafe/first_field_ptr_covers_struct.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct In { pub a: i16, @@ -24,15 +16,7 @@ pub struct In { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct S { pub x: i32, diff --git a/tests/unit/out/unsafe/first_member_downcast.rs b/tests/unit/out/unsafe/first_member_downcast.rs index 32bf2c1b76..10998b103e 100644 --- a/tests/unit/out/unsafe/first_member_downcast.rs +++ b/tests/unit/out/unsafe/first_member_downcast.rs @@ -8,30 +8,14 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct base { pub kind: i32, } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct derived { pub head: base, diff --git a/tests/unit/out/unsafe/flex_array_member_incomplete.rs b/tests/unit/out/unsafe/flex_array_member_incomplete.rs index f2363773bd..bd098b41b0 100644 --- a/tests/unit/out/unsafe/flex_array_member_incomplete.rs +++ b/tests/unit/out/unsafe/flex_array_member_incomplete.rs @@ -7,16 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] -#[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct F { pub n: i32, pub tail: [libc::c_char; 0], diff --git a/tests/unit/out/unsafe/flex_array_member_sibling_write.rs b/tests/unit/out/unsafe/flex_array_member_sibling_write.rs index 7a45bfaf35..ab6c9a3511 100644 --- a/tests/unit/out/unsafe/flex_array_member_sibling_write.rs +++ b/tests/unit/out/unsafe/flex_array_member_sibling_write.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct S { pub n: i32, @@ -24,15 +16,7 @@ pub struct S { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct E { pub id: i32, @@ -40,15 +24,7 @@ pub struct E { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct T { pub n: i32, diff --git a/tests/unit/out/unsafe/fn_ptr.rs b/tests/unit/out/unsafe/fn_ptr.rs index 5deb01ec8c..edc159f955 100644 --- a/tests/unit/out/unsafe/fn_ptr.rs +++ b/tests/unit/out/unsafe/fn_ptr.rs @@ -39,9 +39,7 @@ pub unsafe fn identity_hash_6(mut v: bool) -> usize { FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, - DestructibleUnsafe, TriviallyCopyableUnsafe, - CopyableUnsafe, Default, )] #[cpp_from(Option u64 > , construct, ptr)] diff --git a/tests/unit/out/unsafe/fn_ptr_cast.rs b/tests/unit/out/unsafe/fn_ptr_cast.rs index e3ef54b6f6..825705351a 100644 --- a/tests/unit/out/unsafe/fn_ptr_cast.rs +++ b/tests/unit/out/unsafe/fn_ptr_cast.rs @@ -31,15 +31,7 @@ pub unsafe fn test_double_cast_2() { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Command { pub data: *mut ::libc::c_void, diff --git a/tests/unit/out/unsafe/fn_ptr_stable_sort.rs b/tests/unit/out/unsafe/fn_ptr_stable_sort.rs index 78a6c6467a..df7044da69 100644 --- a/tests/unit/out/unsafe/fn_ptr_stable_sort.rs +++ b/tests/unit/out/unsafe/fn_ptr_stable_sort.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Item { pub key: i32, diff --git a/tests/unit/out/unsafe/fn_ptr_struct.rs b/tests/unit/out/unsafe/fn_ptr_struct.rs index d3930d4c56..265f3850ea 100644 --- a/tests/unit/out/unsafe/fn_ptr_struct.rs +++ b/tests/unit/out/unsafe/fn_ptr_struct.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Handler { pub tag: i32, @@ -30,15 +22,7 @@ pub unsafe fn negate_1(mut x: i32) -> i32 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct S {} impl S { diff --git a/tests/unit/out/unsafe/fn_ptr_typedef_cast.rs b/tests/unit/out/unsafe/fn_ptr_typedef_cast.rs index 3c256f7b56..1d944e9e7a 100644 --- a/tests/unit/out/unsafe/fn_ptr_typedef_cast.rs +++ b/tests/unit/out/unsafe/fn_ptr_typedef_cast.rs @@ -20,15 +20,7 @@ pub unsafe fn via_size_t_return_3(mut b: u64) -> usize { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct pair { pub a: i32, diff --git a/tests/unit/out/unsafe/fn_ptr_vtable.rs b/tests/unit/out/unsafe/fn_ptr_vtable.rs index 72648df0ad..7cf2c23e14 100644 --- a/tests/unit/out/unsafe/fn_ptr_vtable.rs +++ b/tests/unit/out/unsafe/fn_ptr_vtable.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Vtable { pub create: Option *mut ::libc::c_void>, diff --git a/tests/unit/out/unsafe/fn_ref.rs b/tests/unit/out/unsafe/fn_ref.rs index 71b5ce70ec..b4d5eef237 100644 --- a/tests/unit/out/unsafe/fn_ref.rs +++ b/tests/unit/out/unsafe/fn_ref.rs @@ -23,15 +23,7 @@ pub unsafe fn call_forwarded_4(f: Option i32>, mut x: i32) -> } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Holder { pub f: Option i32>, diff --git a/tests/unit/out/unsafe/friend.rs b/tests/unit/out/unsafe/friend.rs index 6816b83c02..9640b96b2a 100644 --- a/tests/unit/out/unsafe/friend.rs +++ b/tests/unit/out/unsafe/friend.rs @@ -20,15 +20,7 @@ pub unsafe fn scaled_3(v: *const V, mut k: f64) -> f64 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct V { pub x: i32, @@ -44,15 +36,7 @@ pub unsafe fn get_4(w: *const W_int_) -> i32 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct W_int_ { pub x: i32, @@ -62,30 +46,14 @@ pub unsafe fn get_5(w: *const W_long_) -> i64 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct W_long_ { pub x: i64, } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct D { pub x: i32, diff --git a/tests/unit/out/unsafe/function_overloading.rs b/tests/unit/out/unsafe/function_overloading.rs index 1b9aa042f9..f4a7056241 100644 --- a/tests/unit/out/unsafe/function_overloading.rs +++ b/tests/unit/out/unsafe/function_overloading.rs @@ -23,15 +23,7 @@ pub unsafe fn bar_4(x: *mut i32) -> i32 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Foo {} impl Foo { diff --git a/tests/unit/out/unsafe/global_call_temporaries.rs b/tests/unit/out/unsafe/global_call_temporaries.rs index c4b3a2ecbb..b5136c2e10 100644 --- a/tests/unit/out/unsafe/global_call_temporaries.rs +++ b/tests/unit/out/unsafe/global_call_temporaries.rs @@ -78,15 +78,7 @@ pub static mut call_assigned_6: std::cell::LazyCell = std::cell::LazyCell:: }); #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Item { pub value: i32, diff --git a/tests/unit/out/unsafe/global_init_side_effect.rs b/tests/unit/out/unsafe/global_init_side_effect.rs index e14b10d871..19ef3b0524 100644 --- a/tests/unit/out/unsafe/global_init_side_effect.rs +++ b/tests/unit/out/unsafe/global_init_side_effect.rs @@ -15,9 +15,7 @@ pub static mut total_0: std::cell::LazyCell = std::cell::LazyCell::new(|| u FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, - DestructibleUnsafe, TriviallyCopyableUnsafe, - CopyableUnsafe, Default, )] #[cpp_from(i32, construct, value)] diff --git a/tests/unit/out/unsafe/global_non_const_init.rs b/tests/unit/out/unsafe/global_non_const_init.rs index e2daf1e67f..7a1fc91ea3 100644 --- a/tests/unit/out/unsafe/global_non_const_init.rs +++ b/tests/unit/out/unsafe/global_non_const_init.rs @@ -28,16 +28,7 @@ pub static mut depends_on_call_6: std::cell::LazyCell = std::cell::LazyCell ((*std::cell::LazyCell::force_mut(&mut *&raw mut from_call_5)) + (1)) }); #[repr(C)] -#[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct Ctor { pub v: i32, } @@ -91,15 +82,7 @@ pub static mut inline_member_11: std::cell::LazyCell = std::cell::LazyCell }); #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Holder {} pub static mut member_10: std::cell::LazyCell = @@ -118,16 +101,7 @@ static mut local_ctor_14: std::cell::LazyCell = std::cell::LazyCell::new(| } }); #[repr(C)] -#[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct Singleton { pub hits: i32, } diff --git a/tests/unit/out/unsafe/global_pointers.rs b/tests/unit/out/unsafe/global_pointers.rs index 6bbe743362..8eecf5ac09 100644 --- a/tests/unit/out/unsafe/global_pointers.rs +++ b/tests/unit/out/unsafe/global_pointers.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Entry { pub name: *const libc::c_char, diff --git a/tests/unit/out/unsafe/global_without_initializer.rs b/tests/unit/out/unsafe/global_without_initializer.rs index f0ac4f736b..074b02c2c8 100644 --- a/tests/unit/out/unsafe/global_without_initializer.rs +++ b/tests/unit/out/unsafe/global_without_initializer.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct S { pub a: i32, diff --git a/tests/unit/out/unsafe/goto_aggregate_default.rs b/tests/unit/out/unsafe/goto_aggregate_default.rs index 5f3b0f194c..c098ed98ac 100644 --- a/tests/unit/out/unsafe/goto_aggregate_default.rs +++ b/tests/unit/out/unsafe/goto_aggregate_default.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Point { pub x: i32, diff --git a/tests/unit/out/unsafe/goto_cleanup.rs b/tests/unit/out/unsafe/goto_cleanup.rs index f8684cf662..b37692ba80 100644 --- a/tests/unit/out/unsafe/goto_cleanup.rs +++ b/tests/unit/out/unsafe/goto_cleanup.rs @@ -78,15 +78,7 @@ pub unsafe fn from_switch_2(mut n: i32) -> i32 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct wrapper { pub item: *mut i32, diff --git a/tests/unit/out/unsafe/huffman.rs b/tests/unit/out/unsafe/huffman.rs index 35cea0ebca..aecc080728 100644 --- a/tests/unit/out/unsafe/huffman.rs +++ b/tests/unit/out/unsafe/huffman.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct MinHeapNode { pub data: libc::c_char, diff --git a/tests/unit/out/unsafe/immutable-deref-on-func-call.rs b/tests/unit/out/unsafe/immutable-deref-on-func-call.rs index 37dbf723d1..02cd1fd8ca 100644 --- a/tests/unit/out/unsafe/immutable-deref-on-func-call.rs +++ b/tests/unit/out/unsafe/immutable-deref-on-func-call.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Item { pub value: i32, diff --git a/tests/unit/out/unsafe/in_class_field_initializer.rs b/tests/unit/out/unsafe/in_class_field_initializer.rs index 6a2e3d9018..4372b9097c 100644 --- a/tests/unit/out/unsafe/in_class_field_initializer.rs +++ b/tests/unit/out/unsafe/in_class_field_initializer.rs @@ -7,16 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] -#[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct Inner { pub x: i32, pub y: i32, @@ -27,16 +18,7 @@ impl Default for Inner { } } #[repr(C)] -#[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct S { pub a: i32, pub b: libc::c_char, @@ -56,16 +38,7 @@ impl Default for S { } } #[repr(C)] -#[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct Boxed_int_ { pub v: i32, pub tag: i32, diff --git a/tests/unit/out/unsafe/init.rs b/tests/unit/out/unsafe/init.rs index cba15d0ec2..dff1966872 100644 --- a/tests/unit/out/unsafe/init.rs +++ b/tests/unit/out/unsafe/init.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct X { pub x: i32, diff --git a/tests/unit/out/unsafe/init_list.rs b/tests/unit/out/unsafe/init_list.rs index d60f1b2720..c77ac10955 100644 --- a/tests/unit/out/unsafe/init_list.rs +++ b/tests/unit/out/unsafe/init_list.rs @@ -9,31 +9,14 @@ use std::rc::Rc; pub unsafe fn f_0(mut list: Vec) {} #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Pair { pub a: i32, pub b: i32, } #[repr(C)] -#[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct Holder { pub p: Pair, } @@ -56,16 +39,7 @@ pub unsafe fn sum_1(p: *const Pair) -> i32 { return (((*p).a) + ((*p).b)); } #[repr(C)] -#[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct Seven { pub v: i32, } diff --git a/tests/unit/out/unsafe/kruskal.rs b/tests/unit/out/unsafe/kruskal.rs index 8275d0f08b..4b3e877125 100644 --- a/tests/unit/out/unsafe/kruskal.rs +++ b/tests/unit/out/unsafe/kruskal.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Edge { pub u: i32, diff --git a/tests/unit/out/unsafe/lambda_as_field.rs b/tests/unit/out/unsafe/lambda_as_field.rs index 4f439ef4e3..8ec874e2eb 100644 --- a/tests/unit/out/unsafe/lambda_as_field.rs +++ b/tests/unit/out/unsafe/lambda_as_field.rs @@ -38,15 +38,7 @@ impl DestructibleUnsafe for Guard__lambda_at_lambda_as_field_cpp_45_13__ { } } #[repr(C)] -#[derive( - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct Holder__lambda_at_lambda_as_field_cpp_39_12__ { pub f: FnPtr i32>, pub calls: i32, @@ -72,16 +64,7 @@ impl Default for Holder__lambda_at_lambda_as_field_cpp_39_12__ { } } #[repr(C)] -#[derive( - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, -)] +#[derive(Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default)] pub struct Holder__lambda_at_lambda_as_field_cpp_51_12__ { pub f: FnPtr i32>, pub calls: i32, diff --git a/tests/unit/out/unsafe/lambda_capture_ref.rs b/tests/unit/out/unsafe/lambda_capture_ref.rs index 14e29f19f0..273bccdd6d 100644 --- a/tests/unit/out/unsafe/lambda_capture_ref.rs +++ b/tests/unit/out/unsafe/lambda_capture_ref.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct S { pub x: i32, diff --git a/tests/unit/out/unsafe/lambda_capture_star_this.rs b/tests/unit/out/unsafe/lambda_capture_star_this.rs index b8bfc984c2..be3bf1f6e9 100644 --- a/tests/unit/out/unsafe/lambda_capture_star_this.rs +++ b/tests/unit/out/unsafe/lambda_capture_star_this.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct S { pub n: i32, diff --git a/tests/unit/out/unsafe/lambda_capture_this.rs b/tests/unit/out/unsafe/lambda_capture_this.rs index 8c26eb30ed..ee019462ca 100644 --- a/tests/unit/out/unsafe/lambda_capture_this.rs +++ b/tests/unit/out/unsafe/lambda_capture_this.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct S { pub n: i32, diff --git a/tests/unit/out/unsafe/lambda_capture_value.rs b/tests/unit/out/unsafe/lambda_capture_value.rs index 562dce0964..1d721ec289 100644 --- a/tests/unit/out/unsafe/lambda_capture_value.rs +++ b/tests/unit/out/unsafe/lambda_capture_value.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct S { pub x: i32, diff --git a/tests/unit/out/unsafe/lambda_decltype_type.rs b/tests/unit/out/unsafe/lambda_decltype_type.rs index e6cb7a7e32..16f90a62a7 100644 --- a/tests/unit/out/unsafe/lambda_decltype_type.rs +++ b/tests/unit/out/unsafe/lambda_decltype_type.rs @@ -7,15 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] -#[derive( - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct Sorted__lambda_at_lambda_decltype_type_cpp_22_18__ { pub items: [i32; 4], pub size: i32, @@ -53,15 +45,7 @@ impl Default for Sorted__lambda_at_lambda_decltype_type_cpp_22_18__ { } } #[repr(C)] -#[derive( - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct Sorted__lambda_at_lambda_decltype_type_cpp_19_23__ { pub items: [i32; 4], pub size: i32, diff --git a/tests/unit/out/unsafe/lambda_generic_explicit_args.rs b/tests/unit/out/unsafe/lambda_generic_explicit_args.rs index a6d47a7dd1..887fadc14d 100644 --- a/tests/unit/out/unsafe/lambda_generic_explicit_args.rs +++ b/tests/unit/out/unsafe/lambda_generic_explicit_args.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Val { pub x: i32, diff --git a/tests/unit/out/unsafe/lambda_immediate_init.rs b/tests/unit/out/unsafe/lambda_immediate_init.rs index 609738fc73..63e8e560ae 100644 --- a/tests/unit/out/unsafe/lambda_immediate_init.rs +++ b/tests/unit/out/unsafe/lambda_immediate_init.rs @@ -10,16 +10,7 @@ pub unsafe fn pick_0(mut x: i32) -> i32 { return x; } #[repr(C)] -#[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct S { pub j: i32, pub k: i32, diff --git a/tests/unit/out/unsafe/lambda_nested.rs b/tests/unit/out/unsafe/lambda_nested.rs index 952898cdb2..1afcc23943 100644 --- a/tests/unit/out/unsafe/lambda_nested.rs +++ b/tests/unit/out/unsafe/lambda_nested.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct S { pub v: i32, diff --git a/tests/unit/out/unsafe/lambda_static_local.rs b/tests/unit/out/unsafe/lambda_static_local.rs index 5a1876b031..8c46892420 100644 --- a/tests/unit/out/unsafe/lambda_static_local.rs +++ b/tests/unit/out/unsafe/lambda_static_local.rs @@ -69,15 +69,7 @@ static mut calls_2: std::cell::LazyCell = std::cell::LazyCell::new(|| unsaf static mut calls_3: std::cell::LazyCell = std::cell::LazyCell::new(|| unsafe { 0 }); #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct P_4 { pub x: i32, diff --git a/tests/unit/out/unsafe/libc_struct_without_default.rs b/tests/unit/out/unsafe/libc_struct_without_default.rs index 9f8e3a07d5..739788ab15 100644 --- a/tests/unit/out/unsafe/libc_struct_without_default.rs +++ b/tests/unit/out/unsafe/libc_struct_without_default.rs @@ -34,16 +34,7 @@ impl Default for UserDefined { } } #[repr(C)] -#[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct FieldIsLibcType { pub addr: libc::sockaddr, } diff --git a/tests/unit/out/unsafe/linked_list.rs b/tests/unit/out/unsafe/linked_list.rs index 49073d09c0..17392bf6ab 100644 --- a/tests/unit/out/unsafe/linked_list.rs +++ b/tests/unit/out/unsafe/linked_list.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Node { pub val: i32, diff --git a/tests/unit/out/unsafe/local_anon_struct_collision.rs b/tests/unit/out/unsafe/local_anon_struct_collision.rs index 19420cf7c8..22a5a31b74 100644 --- a/tests/unit/out/unsafe/local_anon_struct_collision.rs +++ b/tests/unit/out/unsafe/local_anon_struct_collision.rs @@ -14,15 +14,7 @@ pub unsafe fn first_0() -> i32 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct anon_1 { pub x: i32, @@ -36,15 +28,7 @@ pub unsafe fn second_2() -> i32 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct anon_3 { pub a: i64, diff --git a/tests/unit/out/unsafe/local_record_template.rs b/tests/unit/out/unsafe/local_record_template.rs index 94e3e7ec17..6bfee633be 100644 --- a/tests/unit/out/unsafe/local_record_template.rs +++ b/tests/unit/out/unsafe/local_record_template.rs @@ -31,30 +31,14 @@ pub unsafe fn wrap_10(mut v: i64) -> i32 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Local_5 { pub x: i32, } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Local_7 { pub x: i64, @@ -65,15 +49,7 @@ pub unsafe fn other_11() -> i32 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Local_1 { pub x: i64, @@ -96,15 +72,7 @@ unsafe fn main_0() -> i32 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Local_3 { pub x: i32, diff --git a/tests/unit/out/unsafe/map.rs b/tests/unit/out/unsafe/map.rs index 163b9f144d..2386426f67 100644 --- a/tests/unit/out/unsafe/map.rs +++ b/tests/unit/out/unsafe/map.rs @@ -16,16 +16,7 @@ pub unsafe fn inc_2(x: *mut i32) { (*x).postfix_inc(); } #[repr(C)] -#[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct Point { pub x: i32, pub y: i32, diff --git a/tests/unit/out/unsafe/map_key_identity.rs b/tests/unit/out/unsafe/map_key_identity.rs index 77ee88dfda..579d8cc551 100644 --- a/tests/unit/out/unsafe/map_key_identity.rs +++ b/tests/unit/out/unsafe/map_key_identity.rs @@ -10,15 +10,7 @@ pub static mut default_constructions_0: std::cell::LazyCell = std::cell::LazyCell::new(|| unsafe { 0 }); #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Key { pub order: i32, @@ -55,16 +47,7 @@ pub unsafe fn operator_eq_2(a: *const Key, b: *const Key) -> bool { return (((*a).identity) == ((*b).identity)); } #[repr(C)] -#[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct Mapped { pub value: i32, } diff --git a/tests/unit/out/unsafe/map_try_emplace.rs b/tests/unit/out/unsafe/map_try_emplace.rs index 03e85d4ae5..99592788fa 100644 --- a/tests/unit/out/unsafe/map_try_emplace.rs +++ b/tests/unit/out/unsafe/map_try_emplace.rs @@ -72,16 +72,7 @@ pub unsafe fn argument_4(item: *mut Item) -> *mut Item { return item; } #[repr(C)] -#[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct RefItem { pub value: i32, } diff --git a/tests/unit/out/unsafe/map_try_emplace_lvalues.rs b/tests/unit/out/unsafe/map_try_emplace_lvalues.rs index efcd84d2e2..7788a2d0f2 100644 --- a/tests/unit/out/unsafe/map_try_emplace_lvalues.rs +++ b/tests/unit/out/unsafe/map_try_emplace_lvalues.rs @@ -9,16 +9,7 @@ use std::rc::Rc; pub static mut made_0: std::cell::LazyCell = std::cell::LazyCell::new(|| unsafe { 0 }); pub static mut visits_1: std::cell::LazyCell = std::cell::LazyCell::new(|| unsafe { 0 }); #[repr(C)] -#[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct Item { pub value: i32, } @@ -56,16 +47,7 @@ pub unsafe fn place_3(n: *mut i32) -> *mut i32 { pub static mut temporary_calls_4: std::cell::LazyCell = std::cell::LazyCell::new(|| unsafe { 0 }); #[repr(C)] -#[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct Temporary { pub n: i32, pub data: [i32; 2], @@ -90,15 +72,7 @@ impl Default for Temporary { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Nested { pub inner: Temporary, @@ -168,15 +142,7 @@ impl Default for Noncopy { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - CppFromUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, TriviallyCopyableUnsafe, )] #[cpp_from(i32, construct_1, ptr)] pub struct Held { diff --git a/tests/unit/out/unsafe/memcpy_struct_bytes.rs b/tests/unit/out/unsafe/memcpy_struct_bytes.rs index b5d73ffb3d..52ed9a3a88 100644 --- a/tests/unit/out/unsafe/memcpy_struct_bytes.rs +++ b/tests/unit/out/unsafe/memcpy_struct_bytes.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct point { pub x: i32, diff --git a/tests/unit/out/unsafe/memcpy_struct_layouts.rs b/tests/unit/out/unsafe/memcpy_struct_layouts.rs index e7ff617014..b39f168db7 100644 --- a/tests/unit/out/unsafe/memcpy_struct_layouts.rs +++ b/tests/unit/out/unsafe/memcpy_struct_layouts.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct packed { pub a: i32, @@ -26,15 +18,7 @@ pub struct packed { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct reordered { pub a: libc::c_char, @@ -43,15 +27,7 @@ pub struct reordered { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct tail { pub a: libc::c_char, @@ -59,15 +35,7 @@ pub struct tail { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct nested { pub t: tail, @@ -75,15 +43,7 @@ pub struct nested { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct array { pub name: [libc::c_char; 3], diff --git a/tests/unit/out/unsafe/memcpy_struct_struct.rs b/tests/unit/out/unsafe/memcpy_struct_struct.rs index f1fafa0861..0bc61206d3 100644 --- a/tests/unit/out/unsafe/memcpy_struct_struct.rs +++ b/tests/unit/out/unsafe/memcpy_struct_struct.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Entry { pub bits: u8, diff --git a/tests/unit/out/unsafe/memset_struct_tail.rs b/tests/unit/out/unsafe/memset_struct_tail.rs index 9de95fb539..68364362d3 100644 --- a/tests/unit/out/unsafe/memset_struct_tail.rs +++ b/tests/unit/out/unsafe/memset_struct_tail.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct S { pub keep: i32, diff --git a/tests/unit/out/unsafe/nested_structs.rs b/tests/unit/out/unsafe/nested_structs.rs index b1a927435b..44583fc00c 100644 --- a/tests/unit/out/unsafe/nested_structs.rs +++ b/tests/unit/out/unsafe/nested_structs.rs @@ -8,30 +8,14 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Level0_Level1_1_Level2_1_Level3_1 { pub x1: i32, } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Level0_Level1_1_Level2_1_Level3_2 { pub x1: i32, @@ -39,45 +23,21 @@ pub struct Level0_Level1_1_Level2_1_Level3_2 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Level0_Level1_1_Level2_1 { pub x1: i32, } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Level0_Level1_1 { pub x1: i32, } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Level0_Level1_2 { pub x1: i32, @@ -85,15 +45,7 @@ pub struct Level0_Level1_2 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Level0 {} pub fn main() { diff --git a/tests/unit/out/unsafe/new.rs b/tests/unit/out/unsafe/new.rs index f1370dd9b7..e0d3015cbc 100644 --- a/tests/unit/out/unsafe/new.rs +++ b/tests/unit/out/unsafe/new.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Pair { pub x: i32, diff --git a/tests/unit/out/unsafe/new_bst.rs b/tests/unit/out/unsafe/new_bst.rs index da6abd1ad6..97b631f9e3 100644 --- a/tests/unit/out/unsafe/new_bst.rs +++ b/tests/unit/out/unsafe/new_bst.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct node_t { pub left: *mut node_t, diff --git a/tests/unit/out/unsafe/new_struct.rs b/tests/unit/out/unsafe/new_struct.rs index 7f5630c25c..a9f66e50da 100644 --- a/tests/unit/out/unsafe/new_struct.rs +++ b/tests/unit/out/unsafe/new_struct.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Pair { pub x: i32, @@ -24,15 +16,7 @@ pub struct Pair { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Triple { pub a: i32, diff --git a/tests/unit/out/unsafe/nttp_distinct_specializations.rs b/tests/unit/out/unsafe/nttp_distinct_specializations.rs index a64d4ab646..7e4ddc2f00 100644 --- a/tests/unit/out/unsafe/nttp_distinct_specializations.rs +++ b/tests/unit/out/unsafe/nttp_distinct_specializations.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct S_2_ { pub v: i32, @@ -29,15 +21,7 @@ impl S_2_ { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct S_1_ { pub v: i32, @@ -49,15 +33,7 @@ impl S_1_ { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct S_3_ { pub v: i32, diff --git a/tests/unit/out/unsafe/offsetof.rs b/tests/unit/out/unsafe/offsetof.rs index ffa7299065..c65bc82147 100644 --- a/tests/unit/out/unsafe/offsetof.rs +++ b/tests/unit/out/unsafe/offsetof.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Layout { pub a: u8, @@ -24,16 +16,7 @@ pub struct Layout { pub c: u16, } #[repr(C)] -#[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct Frame { pub tag: u16, pub body: [libc::c_char; 64], diff --git a/tests/unit/out/unsafe/opaque_forward_decl.rs b/tests/unit/out/unsafe/opaque_forward_decl.rs index 8a10558a3f..35a56e4387 100644 --- a/tests/unit/out/unsafe/opaque_forward_decl.rs +++ b/tests/unit/out/unsafe/opaque_forward_decl.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct container { pub p: *mut opaque, diff --git a/tests/unit/out/unsafe/opaque_record_copy.rs b/tests/unit/out/unsafe/opaque_record_copy.rs index b4c5df9d05..935d03778c 100644 --- a/tests/unit/out/unsafe/opaque_record_copy.rs +++ b/tests/unit/out/unsafe/opaque_record_copy.rs @@ -8,28 +8,12 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Probe {} #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Wrapper_Probe_ { pub base_: Probe, diff --git a/tests/unit/out/unsafe/opaque_then_defined.rs b/tests/unit/out/unsafe/opaque_then_defined.rs index 77fdeab957..b9fa7b8b1d 100644 --- a/tests/unit/out/unsafe/opaque_then_defined.rs +++ b/tests/unit/out/unsafe/opaque_then_defined.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct list { pub head: *mut node, @@ -24,15 +16,7 @@ pub struct list { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct node { pub value: i32, diff --git a/tests/unit/out/unsafe/operator_arithmetic_free.rs b/tests/unit/out/unsafe/operator_arithmetic_free.rs index 3906668e03..64109d8e9b 100644 --- a/tests/unit/out/unsafe/operator_arithmetic_free.rs +++ b/tests/unit/out/unsafe/operator_arithmetic_free.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct S { pub v: i32, diff --git a/tests/unit/out/unsafe/operator_arithmetic_member.rs b/tests/unit/out/unsafe/operator_arithmetic_member.rs index 347f4fd71a..ee2d516935 100644 --- a/tests/unit/out/unsafe/operator_arithmetic_member.rs +++ b/tests/unit/out/unsafe/operator_arithmetic_member.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct S { pub v: i32, diff --git a/tests/unit/out/unsafe/operator_bitwise_free.rs b/tests/unit/out/unsafe/operator_bitwise_free.rs index a5c8807928..3bb31d9b8e 100644 --- a/tests/unit/out/unsafe/operator_bitwise_free.rs +++ b/tests/unit/out/unsafe/operator_bitwise_free.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct S { pub v: u32, diff --git a/tests/unit/out/unsafe/operator_bitwise_member.rs b/tests/unit/out/unsafe/operator_bitwise_member.rs index 2d2daeca6e..87bf73b2ab 100644 --- a/tests/unit/out/unsafe/operator_bitwise_member.rs +++ b/tests/unit/out/unsafe/operator_bitwise_member.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct S { pub v: u32, diff --git a/tests/unit/out/unsafe/operator_comparison_defaulted.rs b/tests/unit/out/unsafe/operator_comparison_defaulted.rs index 48520ceb9b..88aa881c93 100644 --- a/tests/unit/out/unsafe/operator_comparison_defaulted.rs +++ b/tests/unit/out/unsafe/operator_comparison_defaulted.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Eq { pub a: i32, @@ -36,15 +28,7 @@ impl std::cmp::PartialEq for Eq { impl std::cmp::Eq for Eq {} #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Cmp { pub a: i32, @@ -91,15 +75,7 @@ impl std::cmp::PartialEq for Cmp { impl std::cmp::Eq for Cmp {} #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Both { pub a: i32, @@ -137,15 +113,7 @@ impl std::cmp::PartialEq for Both { impl std::cmp::Eq for Both {} #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct OrdOnly { pub a: i32, @@ -180,15 +148,7 @@ impl std::cmp::PartialEq for OrdOnly { impl std::cmp::Eq for OrdOnly {} #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Inner { pub x: i32, @@ -226,15 +186,7 @@ impl std::cmp::PartialEq for Inner { impl std::cmp::Eq for Inner {} #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Outer { pub i: Inner, @@ -285,15 +237,7 @@ impl std::cmp::PartialEq for Outer { impl std::cmp::Eq for Outer {} #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Secondary { pub a: i32, @@ -342,15 +286,7 @@ impl std::cmp::PartialEq for Secondary { impl std::cmp::Eq for Secondary {} #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct PtrMember { pub p: *mut i32, diff --git a/tests/unit/out/unsafe/operator_comparison_free.rs b/tests/unit/out/unsafe/operator_comparison_free.rs index cc81d5ec9c..32cff29854 100644 --- a/tests/unit/out/unsafe/operator_comparison_free.rs +++ b/tests/unit/out/unsafe/operator_comparison_free.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct S { pub v: i32, @@ -71,15 +63,7 @@ pub unsafe fn operator_lt_7(mut a: i32, b: *const S) -> bool { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct V { pub v: i32, diff --git a/tests/unit/out/unsafe/operator_comparison_member.rs b/tests/unit/out/unsafe/operator_comparison_member.rs index 46ba021117..ea4b46c0a2 100644 --- a/tests/unit/out/unsafe/operator_comparison_member.rs +++ b/tests/unit/out/unsafe/operator_comparison_member.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct S { pub v: i32, diff --git a/tests/unit/out/unsafe/operator_comparison_mixed.rs b/tests/unit/out/unsafe/operator_comparison_mixed.rs index 9b79b773bb..ee981c88a3 100644 --- a/tests/unit/out/unsafe/operator_comparison_mixed.rs +++ b/tests/unit/out/unsafe/operator_comparison_mixed.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct S { pub v: i32, diff --git a/tests/unit/out/unsafe/operator_comparison_nonbool.rs b/tests/unit/out/unsafe/operator_comparison_nonbool.rs index 9c94e01f51..2545422fb7 100644 --- a/tests/unit/out/unsafe/operator_comparison_nonbool.rs +++ b/tests/unit/out/unsafe/operator_comparison_nonbool.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct X { pub v: i32, @@ -65,30 +57,14 @@ pub unsafe fn operator_ge_5(mut a: X, mut b: X) -> i32 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Result { pub r: i32, } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Custom { pub v: i32, @@ -102,15 +78,7 @@ impl Custom { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Mixed { pub v: i32, @@ -160,9 +128,7 @@ impl std::cmp::Eq for Mixed {} FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, - DestructibleUnsafe, TriviallyCopyableUnsafe, - CopyableUnsafe, Default, )] #[cpp_into(bool, to_bool)] @@ -179,15 +145,7 @@ impl MyBool { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Boolish { pub v: i32, @@ -264,15 +222,7 @@ pub static mut ref_true_8: std::cell::LazyCell = std::cell::LazyCell::n }); #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct RefInt { pub v: i32, diff --git a/tests/unit/out/unsafe/operator_compound_assignment_free.rs b/tests/unit/out/unsafe/operator_compound_assignment_free.rs index 8fac39d9f5..fb40f51dc6 100644 --- a/tests/unit/out/unsafe/operator_compound_assignment_free.rs +++ b/tests/unit/out/unsafe/operator_compound_assignment_free.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct S { pub v: u32, diff --git a/tests/unit/out/unsafe/operator_compound_assignment_member.rs b/tests/unit/out/unsafe/operator_compound_assignment_member.rs index 695f45e803..0808deae9b 100644 --- a/tests/unit/out/unsafe/operator_compound_assignment_member.rs +++ b/tests/unit/out/unsafe/operator_compound_assignment_member.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct S { pub v: u32, diff --git a/tests/unit/out/unsafe/operator_friend.rs b/tests/unit/out/unsafe/operator_friend.rs index d628963b02..a6df4497b0 100644 --- a/tests/unit/out/unsafe/operator_friend.rs +++ b/tests/unit/out/unsafe/operator_friend.rs @@ -11,15 +11,7 @@ pub unsafe fn operator_eq_0(_a0: *const Defaulted, _a1: *const Defaulted) -> boo } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Defaulted { pub a: i32, @@ -48,15 +40,7 @@ pub unsafe fn operator_eq_2(_a0: *const DefaultedOrd, _a1: *const DefaultedOrd) } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct DefaultedOrd { pub a: i32, @@ -90,15 +74,7 @@ pub unsafe fn operator_add_5(x: *const Inline, y: *const Inline) -> Inline { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Inline { pub a: i32, @@ -129,15 +105,7 @@ impl std::cmp::PartialEq for Inline { impl std::cmp::Eq for Inline {} #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct OutOfLine { pub a: i32, @@ -168,15 +136,7 @@ pub unsafe fn operator_eq_10(x: *const Tmpl_int_, y: *const Tmpl_long_) -> bool } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Tmpl_int_ { pub v: i32, @@ -207,15 +167,7 @@ impl std::cmp::PartialEq for Tmpl_int_ { impl std::cmp::Eq for Tmpl_int_ {} #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Tmpl_long_ { pub v: i64, @@ -228,15 +180,7 @@ pub unsafe fn operator_eq_11( } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct TmplDefaulted_int_ { pub v: i32, diff --git a/tests/unit/out/unsafe/operator_less_than.rs b/tests/unit/out/unsafe/operator_less_than.rs index dc088a7530..f103a49839 100644 --- a/tests/unit/out/unsafe/operator_less_than.rs +++ b/tests/unit/out/unsafe/operator_less_than.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Pair { pub x: i32, diff --git a/tests/unit/out/unsafe/operator_logical_free.rs b/tests/unit/out/unsafe/operator_logical_free.rs index 85069d9554..db4b49c826 100644 --- a/tests/unit/out/unsafe/operator_logical_free.rs +++ b/tests/unit/out/unsafe/operator_logical_free.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct S { pub v: i32, diff --git a/tests/unit/out/unsafe/operator_logical_member.rs b/tests/unit/out/unsafe/operator_logical_member.rs index 6f64653667..a368075737 100644 --- a/tests/unit/out/unsafe/operator_logical_member.rs +++ b/tests/unit/out/unsafe/operator_logical_member.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct S { pub v: i32, diff --git a/tests/unit/out/unsafe/operator_member_pointer_free.rs b/tests/unit/out/unsafe/operator_member_pointer_free.rs index efd5c25cff..ee71b10103 100644 --- a/tests/unit/out/unsafe/operator_member_pointer_free.rs +++ b/tests/unit/out/unsafe/operator_member_pointer_free.rs @@ -8,30 +8,14 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Inner { pub x: i32, } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct S { pub data: [i32; 3], diff --git a/tests/unit/out/unsafe/operator_member_pointer_member.rs b/tests/unit/out/unsafe/operator_member_pointer_member.rs index a4350d620b..a8a73c8051 100644 --- a/tests/unit/out/unsafe/operator_member_pointer_member.rs +++ b/tests/unit/out/unsafe/operator_member_pointer_member.rs @@ -8,30 +8,14 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Inner { pub x: i32, } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Table {} impl Table { @@ -43,15 +27,7 @@ pub static mut table_0: std::cell::LazyCell<[i32; 3]> = std::cell::LazyCell::new(|| unsafe { [7, 8, 9] }); #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct S { pub data: [i32; 3], diff --git a/tests/unit/out/unsafe/operator_other_free.rs b/tests/unit/out/unsafe/operator_other_free.rs index f0aa3d0812..720986742f 100644 --- a/tests/unit/out/unsafe/operator_other_free.rs +++ b/tests/unit/out/unsafe/operator_other_free.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct S { pub v: i32, diff --git a/tests/unit/out/unsafe/operator_other_member.rs b/tests/unit/out/unsafe/operator_other_member.rs index 8188ff0f73..a86f1392c8 100644 --- a/tests/unit/out/unsafe/operator_other_member.rs +++ b/tests/unit/out/unsafe/operator_other_member.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Static {} impl Static { @@ -32,9 +24,7 @@ impl Static { FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, - DestructibleUnsafe, TriviallyCopyableUnsafe, - CopyableUnsafe, Default, )] #[cpp_into(i32, to_i32)] diff --git a/tests/unit/out/unsafe/operator_overloads.rs b/tests/unit/out/unsafe/operator_overloads.rs index 0daac089a3..40733c02ca 100644 --- a/tests/unit/out/unsafe/operator_overloads.rs +++ b/tests/unit/out/unsafe/operator_overloads.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct S { pub v: i32, diff --git a/tests/unit/out/unsafe/operator_qualifiers.rs b/tests/unit/out/unsafe/operator_qualifiers.rs index f159c75391..d8385e40b6 100644 --- a/tests/unit/out/unsafe/operator_qualifiers.rs +++ b/tests/unit/out/unsafe/operator_qualifiers.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct S { pub v: i32, diff --git a/tests/unit/out/unsafe/operator_three_way.rs b/tests/unit/out/unsafe/operator_three_way.rs index 68880cbe84..6ee24d91b7 100644 --- a/tests/unit/out/unsafe/operator_three_way.rs +++ b/tests/unit/out/unsafe/operator_three_way.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct S { pub v: i32, diff --git a/tests/unit/out/unsafe/operator_traits.rs b/tests/unit/out/unsafe/operator_traits.rs index b9527773cc..00009f4690 100644 --- a/tests/unit/out/unsafe/operator_traits.rs +++ b/tests/unit/out/unsafe/operator_traits.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Lt { pub v: i32, @@ -55,15 +47,7 @@ impl std::cmp::PartialEq for Lt { impl std::cmp::Eq for Lt {} #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Eq { pub v: i32, @@ -81,15 +65,7 @@ impl std::cmp::PartialEq for Eq { impl std::cmp::Eq for Eq {} #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Cmp { pub v: i32, @@ -120,15 +96,7 @@ impl std::cmp::PartialEq for Cmp { impl std::cmp::Eq for Cmp {} #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Free { pub v: i32, @@ -165,15 +133,7 @@ pub unsafe fn operator_eq_1(a: *const Free, b: *const Free) -> bool { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Wrapped_int_ { pub v: i32, diff --git a/tests/unit/out/unsafe/overload_mangling.rs b/tests/unit/out/unsafe/overload_mangling.rs index 26ff80a792..c03438486d 100644 --- a/tests/unit/out/unsafe/overload_mangling.rs +++ b/tests/unit/out/unsafe/overload_mangling.rs @@ -17,15 +17,7 @@ pub unsafe fn twice_2(mut n: i32) -> i32 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Access_S_ {} impl Access_S_ { @@ -44,15 +36,7 @@ impl Access_S_ { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct S { pub base: i32, @@ -128,15 +112,7 @@ impl S { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Box_ { pub v: i32, diff --git a/tests/unit/out/unsafe/pair_converting_construction.rs b/tests/unit/out/unsafe/pair_converting_construction.rs index 885edd46da..21764ba5f4 100644 --- a/tests/unit/out/unsafe/pair_converting_construction.rs +++ b/tests/unit/out/unsafe/pair_converting_construction.rs @@ -14,9 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, - DestructibleUnsafe, TriviallyCopyableUnsafe, - CopyableUnsafe, Default, )] #[cpp_from(i32, construct, value)] @@ -36,9 +34,7 @@ impl Celsius { FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, - DestructibleUnsafe, TriviallyCopyableUnsafe, - CopyableUnsafe, Default, )] #[cpp_into(i32, to_i32)] @@ -58,9 +54,7 @@ impl Meters { FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, - DestructibleUnsafe, TriviallyCopyableUnsafe, - CopyableUnsafe, Default, )] #[cpp_from(Celsius, construct, ptr)] @@ -80,9 +74,7 @@ impl Label { FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, - DestructibleUnsafe, TriviallyCopyableUnsafe, - CopyableUnsafe, Default, )] #[cpp_from(Celsius, construct_1, ptr)] @@ -109,9 +101,7 @@ impl Owner { FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, - DestructibleUnsafe, TriviallyCopyableUnsafe, - CopyableUnsafe, Default, )] #[cpp_from(Celsius, construct, value)] @@ -125,15 +115,7 @@ impl Holder { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - CppFromUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, TriviallyCopyableUnsafe, )] #[cpp_from(i32, construct, value)] pub struct Fallback { @@ -157,15 +139,7 @@ impl Default for Fallback { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Counter { pub hits: i32, @@ -178,9 +152,7 @@ pub struct Counter { FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, - DestructibleUnsafe, TriviallyCopyableUnsafe, - CopyableUnsafe, Default, )] #[cpp_from(Counter, construct, mut_ptr)] @@ -206,9 +178,7 @@ impl Tag { FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, - DestructibleUnsafe, TriviallyCopyableUnsafe, - CopyableUnsafe, Default, )] #[cpp_from(Celsius, construct, ptr)] @@ -223,9 +193,7 @@ pub struct Tag { FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, - DestructibleUnsafe, TriviallyCopyableUnsafe, - CopyableUnsafe, Default, )] #[cpp_from(*const libc::c_char , construct, value)] diff --git a/tests/unit/out/unsafe/pod.rs b/tests/unit/out/unsafe/pod.rs index 9faa6ab9b7..426d5907a1 100644 --- a/tests/unit/out/unsafe/pod.rs +++ b/tests/unit/out/unsafe/pod.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct POD { pub x1: i32, diff --git a/tests/unit/out/unsafe/pointer_array.rs b/tests/unit/out/unsafe/pointer_array.rs index 6d746272c0..ed7cea0ce1 100644 --- a/tests/unit/out/unsafe/pointer_array.rs +++ b/tests/unit/out/unsafe/pointer_array.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct StackArray { pub arr: [*mut i32; 3], diff --git a/tests/unit/out/unsafe/pointers.rs b/tests/unit/out/unsafe/pointers.rs index 26524925b4..befa1c43c2 100644 --- a/tests/unit/out/unsafe/pointers.rs +++ b/tests/unit/out/unsafe/pointers.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Test { pub x: i32, diff --git a/tests/unit/out/unsafe/ptr_cast_init.rs b/tests/unit/out/unsafe/ptr_cast_init.rs index 15d9e2c5e0..b75e0c1aa8 100644 --- a/tests/unit/out/unsafe/ptr_cast_init.rs +++ b/tests/unit/out/unsafe/ptr_cast_init.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct header { pub tag: i32, @@ -24,15 +16,7 @@ pub struct header { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct view { pub tag: i32, diff --git a/tests/unit/out/unsafe/push_emplace_back.rs b/tests/unit/out/unsafe/push_emplace_back.rs index 7b69248edd..b84b317a8e 100644 --- a/tests/unit/out/unsafe/push_emplace_back.rs +++ b/tests/unit/out/unsafe/push_emplace_back.rs @@ -8,30 +8,14 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Chunk { pub data: i32, } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Writer { pub output: *mut Vec, @@ -122,15 +106,7 @@ pub unsafe fn self_ref_push_6(mut comps: *mut Vec) { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - CppFromUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, TriviallyCopyableUnsafe, )] #[cpp_from(i32, construct_1, value)] pub struct Pair { @@ -267,15 +243,7 @@ pub unsafe fn emplace_from_element_14(mut v: *mut Vec>) { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Plain { pub a: i32, @@ -292,15 +260,7 @@ pub static mut all_counted_16: std::cell::LazyCell<*mut Vec> = std::cell::LazyCell::new(|| unsafe { std::ptr::null_mut() }); #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Counted { pub seen: usize, diff --git a/tests/unit/out/unsafe/random.rs b/tests/unit/out/unsafe/random.rs index e38fe02e5f..1d648ec428 100644 --- a/tests/unit/out/unsafe/random.rs +++ b/tests/unit/out/unsafe/random.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Pair { pub x: i32, @@ -52,15 +44,7 @@ pub unsafe fn zero_0() -> i32 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct X1 {} pub unsafe fn foo_1(mut x1: i32, x2: *mut i32, mut x3: *mut i32, p2: *mut Pair, mut p3: *mut Pair) { diff --git a/tests/unit/out/unsafe/reference_wrapper.rs b/tests/unit/out/unsafe/reference_wrapper.rs index 1bce59cd0d..1b0bea1b7d 100644 --- a/tests/unit/out/unsafe/reference_wrapper.rs +++ b/tests/unit/out/unsafe/reference_wrapper.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Point { pub x: i32, diff --git a/tests/unit/out/unsafe/references.rs b/tests/unit/out/unsafe/references.rs index 9e847e2cb2..3aee6a8e84 100644 --- a/tests/unit/out/unsafe/references.rs +++ b/tests/unit/out/unsafe/references.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Pair { pub x: i32, @@ -25,15 +17,7 @@ pub struct Pair { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Nested { pub p: Pair, diff --git a/tests/unit/out/unsafe/refs_as_args.rs b/tests/unit/out/unsafe/refs_as_args.rs index f6166c7ed7..6787508651 100644 --- a/tests/unit/out/unsafe/refs_as_args.rs +++ b/tests/unit/out/unsafe/refs_as_args.rs @@ -19,15 +19,7 @@ pub unsafe fn more_refs_0(mut x1: i32, mut x2: i32, r1: *mut i32, r2: *const i32 } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Val { pub x: i32, diff --git a/tests/unit/out/unsafe/reinterpret_cast_ptr_cmp.rs b/tests/unit/out/unsafe/reinterpret_cast_ptr_cmp.rs index cc3d354b20..4d4b50fbf5 100644 --- a/tests/unit/out/unsafe/reinterpret_cast_ptr_cmp.rs +++ b/tests/unit/out/unsafe/reinterpret_cast_ptr_cmp.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct S { pub x: i32, @@ -24,15 +16,7 @@ pub struct S { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct W { pub h: i32, @@ -40,15 +24,7 @@ pub struct W { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct P { pub a: *mut i32, diff --git a/tests/unit/out/unsafe/reinterpret_cast_struct.rs b/tests/unit/out/unsafe/reinterpret_cast_struct.rs index a3984eb6b1..70c3f03d6a 100644 --- a/tests/unit/out/unsafe/reinterpret_cast_struct.rs +++ b/tests/unit/out/unsafe/reinterpret_cast_struct.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Point { pub x: i32, diff --git a/tests/unit/out/unsafe/reinterpret_cast_struct_to_struct.rs b/tests/unit/out/unsafe/reinterpret_cast_struct_to_struct.rs index 2eacbfb83f..5d4fe4a7a4 100644 --- a/tests/unit/out/unsafe/reinterpret_cast_struct_to_struct.rs +++ b/tests/unit/out/unsafe/reinterpret_cast_struct_to_struct.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Point { pub x: u32, @@ -24,15 +16,7 @@ pub struct Point { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Pair { pub first: u32, diff --git a/tests/unit/out/unsafe/reserved_keywords.rs b/tests/unit/out/unsafe/reserved_keywords.rs index 9fc31e9fc6..877a6e3bd7 100644 --- a/tests/unit/out/unsafe/reserved_keywords.rs +++ b/tests/unit/out/unsafe/reserved_keywords.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct S { pub as_: i32, @@ -60,30 +52,14 @@ pub struct S { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct type_ { pub v: i32, } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct loop_ { pub t: type_, diff --git a/tests/unit/out/unsafe/return_move.rs b/tests/unit/out/unsafe/return_move.rs index 8830e486b5..55e500cd2f 100644 --- a/tests/unit/out/unsafe/return_move.rs +++ b/tests/unit/out/unsafe/return_move.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct node { pub value: i32, @@ -24,15 +16,7 @@ pub struct node { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct pair_t { pub a: i32, diff --git a/tests/unit/out/unsafe/rvalue_struct.rs b/tests/unit/out/unsafe/rvalue_struct.rs index d1d4c88f3d..d6ce18406c 100644 --- a/tests/unit/out/unsafe/rvalue_struct.rs +++ b/tests/unit/out/unsafe/rvalue_struct.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct S { pub a: i32, diff --git a/tests/unit/out/unsafe/scalar_builtin_construct_destruct.rs b/tests/unit/out/unsafe/scalar_builtin_construct_destruct.rs index b5eb981b0a..a2269572cb 100644 --- a/tests/unit/out/unsafe/scalar_builtin_construct_destruct.rs +++ b/tests/unit/out/unsafe/scalar_builtin_construct_destruct.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Pod { pub v: i32, diff --git a/tests/unit/out/unsafe/self_referencing_initializer.rs b/tests/unit/out/unsafe/self_referencing_initializer.rs index c7400ea11a..2b3660c3e9 100644 --- a/tests/unit/out/unsafe/self_referencing_initializer.rs +++ b/tests/unit/out/unsafe/self_referencing_initializer.rs @@ -8,46 +8,21 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct list_head { pub next: *mut list_head, } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct node { pub value: i32, pub value_ptr: *mut i32, } #[repr(C)] -#[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct node_with_defaults { pub next: *mut node_with_defaults, pub value: i32, diff --git a/tests/unit/out/unsafe/size_t_static_member.rs b/tests/unit/out/unsafe/size_t_static_member.rs index 0de6005546..769cdd00c5 100644 --- a/tests/unit/out/unsafe/size_t_static_member.rs +++ b/tests/unit/out/unsafe/size_t_static_member.rs @@ -9,30 +9,14 @@ use std::rc::Rc; pub static mut c_0: std::cell::LazyCell = std::cell::LazyCell::new(|| unsafe { 5_usize }); #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct S {} pub static mut table_size_1: std::cell::LazyCell = std::cell::LazyCell::new(|| unsafe { 256_usize }); #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Table_char_ {} pub fn main() { diff --git a/tests/unit/out/unsafe/size_t_template_param.rs b/tests/unit/out/unsafe/size_t_template_param.rs index 508e802558..2ae0627be2 100644 --- a/tests/unit/out/unsafe/size_t_template_param.rs +++ b/tests/unit/out/unsafe/size_t_template_param.rs @@ -18,9 +18,7 @@ pub unsafe fn array_ref_0(a: *mut [u64; 3]) -> u64 { FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, - DestructibleUnsafe, TriviallyCopyableUnsafe, - CopyableUnsafe, Default, )] #[cpp_from(*const u64 , construct, value)] @@ -40,9 +38,7 @@ impl PtrCtor_unsigned_long_ { FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, - DestructibleUnsafe, TriviallyCopyableUnsafe, - CopyableUnsafe, Default, )] #[cpp_from(u64, construct, ptr)] diff --git a/tests/unit/out/unsafe/static_local.rs b/tests/unit/out/unsafe/static_local.rs index 49031e80b9..bb036d12a4 100644 --- a/tests/unit/out/unsafe/static_local.rs +++ b/tests/unit/out/unsafe/static_local.rs @@ -23,15 +23,7 @@ pub unsafe fn from_local_class_6() -> i32 { static mut x_7: std::cell::LazyCell = std::cell::LazyCell::new(|| unsafe { 3 }); #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct S_8 {} impl S_8 { diff --git a/tests/unit/out/unsafe/static_var_in_class.rs b/tests/unit/out/unsafe/static_var_in_class.rs index 97aa33cb94..47d463cbbe 100644 --- a/tests/unit/out/unsafe/static_var_in_class.rs +++ b/tests/unit/out/unsafe/static_var_in_class.rs @@ -9,15 +9,7 @@ use std::rc::Rc; static mut inner_const_0: std::cell::LazyCell = std::cell::LazyCell::new(|| unsafe { 1 }); #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct C {} impl C { @@ -30,15 +22,7 @@ pub type anon_3 = u32; pub const anon_3_kValue: anon_3 = 3; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct S {} impl S { diff --git a/tests/unit/out/unsafe/stdcopy.rs b/tests/unit/out/unsafe/stdcopy.rs index e4e849da52..166d2a7737 100644 --- a/tests/unit/out/unsafe/stdcopy.rs +++ b/tests/unit/out/unsafe/stdcopy.rs @@ -14,9 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, - DestructibleUnsafe, TriviallyCopyableUnsafe, - CopyableUnsafe, Default, )] #[cpp_from(i32, construct, value)] diff --git a/tests/unit/out/unsafe/strdup.rs b/tests/unit/out/unsafe/strdup.rs index c521370ba5..f8f193d880 100644 --- a/tests/unit/out/unsafe/strdup.rs +++ b/tests/unit/out/unsafe/strdup.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct record { pub name: *mut libc::c_char, diff --git a/tests/unit/out/unsafe/string_literal_ptr_init.rs b/tests/unit/out/unsafe/string_literal_ptr_init.rs index 21068d4dfe..db1f57c658 100644 --- a/tests/unit/out/unsafe/string_literal_ptr_init.rs +++ b/tests/unit/out/unsafe/string_literal_ptr_init.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct label { pub name: *const libc::c_char, diff --git a/tests/unit/out/unsafe/string_substr.rs b/tests/unit/out/unsafe/string_substr.rs index 967c666cf5..8a30096f81 100644 --- a/tests/unit/out/unsafe/string_substr.rs +++ b/tests/unit/out/unsafe/string_substr.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Text { pub value: *mut Vec, diff --git a/tests/unit/out/unsafe/struct_2d_array_field.rs b/tests/unit/out/unsafe/struct_2d_array_field.rs index 2eed298726..eede3d9f91 100644 --- a/tests/unit/out/unsafe/struct_2d_array_field.rs +++ b/tests/unit/out/unsafe/struct_2d_array_field.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct table { pub rows: [[libc::c_char; 10]; 3], diff --git a/tests/unit/out/unsafe/struct_ctor.rs b/tests/unit/out/unsafe/struct_ctor.rs index 982bfccf28..0590ff9da9 100644 --- a/tests/unit/out/unsafe/struct_ctor.rs +++ b/tests/unit/out/unsafe/struct_ctor.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct StructWithCtor { x1_: i32, @@ -47,9 +39,7 @@ pub unsafe fn foo_0(x: *mut i32) -> *mut i32 { FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, - DestructibleUnsafe, TriviallyCopyableUnsafe, - CopyableUnsafe, Default, )] #[cpp_from(i32, construct, value)] @@ -62,16 +52,7 @@ impl Value_ { } } #[repr(C)] -#[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct Ptr_ { pub v1: Value_, pub v2: Value_, diff --git a/tests/unit/out/unsafe/struct_default_ctor.rs b/tests/unit/out/unsafe/struct_default_ctor.rs index 0e6ba0a22b..639719e520 100644 --- a/tests/unit/out/unsafe/struct_default_ctor.rs +++ b/tests/unit/out/unsafe/struct_default_ctor.rs @@ -7,16 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] -#[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct S { pub a: i32, pub b: bool, @@ -40,15 +31,7 @@ impl Default for S { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Declared { pub v: i32, @@ -56,31 +39,14 @@ pub struct Declared { impl Declared {} #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Holder { pub items: [S; 2], } pub static mut kInit_0: std::cell::LazyCell = std::cell::LazyCell::new(|| unsafe { 3 }); #[repr(C)] -#[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct FromStatic { pub v: i32, } diff --git a/tests/unit/out/unsafe/struct_member_array_adjacency.rs b/tests/unit/out/unsafe/struct_member_array_adjacency.rs index 2656c8ae5d..3e0de4505b 100644 --- a/tests/unit/out/unsafe/struct_member_array_adjacency.rs +++ b/tests/unit/out/unsafe/struct_member_array_adjacency.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct pair { pub a: [i32; 4], diff --git a/tests/unit/out/unsafe/struct_ptr.rs b/tests/unit/out/unsafe/struct_ptr.rs index 9fbe59a3dc..16cebb0e9f 100644 --- a/tests/unit/out/unsafe/struct_ptr.rs +++ b/tests/unit/out/unsafe/struct_ptr.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct XX { pub x: i32, diff --git a/tests/unit/out/unsafe/structured_binding_range_for.rs b/tests/unit/out/unsafe/structured_binding_range_for.rs index decdc51094..0e7b34de55 100644 --- a/tests/unit/out/unsafe/structured_binding_range_for.rs +++ b/tests/unit/out/unsafe/structured_binding_range_for.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Pair { pub first: i32, diff --git a/tests/unit/out/unsafe/structured_binding_ref.rs b/tests/unit/out/unsafe/structured_binding_ref.rs index d06987fd18..22848283b9 100644 --- a/tests/unit/out/unsafe/structured_binding_ref.rs +++ b/tests/unit/out/unsafe/structured_binding_ref.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Triple { pub a: i32, diff --git a/tests/unit/out/unsafe/structured_binding_trivial.rs b/tests/unit/out/unsafe/structured_binding_trivial.rs index 4d1191a728..5c791ba031 100644 --- a/tests/unit/out/unsafe/structured_binding_trivial.rs +++ b/tests/unit/out/unsafe/structured_binding_trivial.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Pair { pub first: i32, diff --git a/tests/unit/out/unsafe/tag_vs_identifier_collision.rs b/tests/unit/out/unsafe/tag_vs_identifier_collision.rs index 62eb28ef27..b877ab1c96 100644 --- a/tests/unit/out/unsafe/tag_vs_identifier_collision.rs +++ b/tests/unit/out/unsafe/tag_vs_identifier_collision.rs @@ -12,15 +12,7 @@ pub const widget_enum_MODE_ACTIVE: widget_enum = 1; pub const widget_enum_MODE_DONE: widget_enum = 2; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct widget { pub id: i32, @@ -28,31 +20,14 @@ pub struct widget { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct point_struct { pub x: i32, pub y: i32, } #[repr(C)] -#[derive( - Copy, - Clone, - FnPtrArg, - VaArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub union point { pub whole: i32, pub half: i16, @@ -63,16 +38,7 @@ impl Default for point { } } #[repr(C)] -#[derive( - Copy, - Clone, - FnPtrArg, - VaArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub union slot_union { pub i: i32, pub u: u32, @@ -87,45 +53,21 @@ pub const slot_SLOT_A: slot = 0; pub const slot_SLOT_B: slot = 1; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Inner { pub tag_field: i32, } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Outer { pub field: Inner, } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Inner_struct { pub typedef_field: i32, diff --git a/tests/unit/out/unsafe/template_default_arg.rs b/tests/unit/out/unsafe/template_default_arg.rs index 0be8eece59..e7439926b7 100644 --- a/tests/unit/out/unsafe/template_default_arg.rs +++ b/tests/unit/out/unsafe/template_default_arg.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - CppFromUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, TriviallyCopyableUnsafe, )] #[cpp_from(i32, construct_1, value)] pub struct A { @@ -42,16 +34,7 @@ impl Default for A { } } #[repr(C)] -#[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct B { pub v: i32, } @@ -79,9 +62,7 @@ impl Default for B { FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, - DestructibleUnsafe, TriviallyCopyableUnsafe, - CopyableUnsafe, Default, )] #[cpp_from(i32, construct, value)] @@ -113,9 +94,7 @@ pub unsafe fn always_given_3(mut x: NoDefault) -> i32 { FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, - DestructibleUnsafe, TriviallyCopyableUnsafe, - CopyableUnsafe, Default, )] #[cpp_from(i32, construct, value)] diff --git a/tests/unit/out/unsafe/template_static_member.rs b/tests/unit/out/unsafe/template_static_member.rs index 47ac994744..bc79dde79b 100644 --- a/tests/unit/out/unsafe/template_static_member.rs +++ b/tests/unit/out/unsafe/template_static_member.rs @@ -9,59 +9,27 @@ use std::rc::Rc; pub static mut s_0: std::cell::LazyCell = std::cell::LazyCell::new(|| unsafe { 55 }); #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Static_int_ {} pub static mut s_1: std::cell::LazyCell = std::cell::LazyCell::new(|| unsafe { (55 as libc::c_char) }); #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Static_char_ {} pub static mut s_2: std::cell::LazyCell = std::cell::LazyCell::new(|| unsafe { 55_i64 }); #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Static_long_ {} pub static mut lo_3: std::cell::LazyCell = std::cell::LazyCell::new(|| unsafe { -1_i32 }); pub static mut hi_4: std::cell::LazyCell = std::cell::LazyCell::new(|| unsafe { 1 }); #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Range_int_ {} pub static mut lo_5: std::cell::LazyCell = @@ -69,15 +37,7 @@ pub static mut lo_5: std::cell::LazyCell = pub static mut hi_6: std::cell::LazyCell = std::cell::LazyCell::new(|| unsafe { 2_i64 }); #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Range_long_ {} pub fn main() { diff --git a/tests/unit/out/unsafe/temporary_field_ctor_arg.rs b/tests/unit/out/unsafe/temporary_field_ctor_arg.rs index 4c988758cc..064fce4538 100644 --- a/tests/unit/out/unsafe/temporary_field_ctor_arg.rs +++ b/tests/unit/out/unsafe/temporary_field_ctor_arg.rs @@ -36,9 +36,7 @@ pub unsafe fn make_0() -> Outer { FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, - DestructibleUnsafe, TriviallyCopyableUnsafe, - CopyableUnsafe, Default, )] #[cpp_from(Vec , construct, ptr)] diff --git a/tests/unit/out/unsafe/this.rs b/tests/unit/out/unsafe/this.rs index 1fc64bb99c..cca0ba2b77 100644 --- a/tests/unit/out/unsafe/this.rs +++ b/tests/unit/out/unsafe/this.rs @@ -14,9 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, - DestructibleUnsafe, TriviallyCopyableUnsafe, - CopyableUnsafe, Default, )] #[cpp_from(i32, construct_1, value)] @@ -119,9 +117,7 @@ pub unsafe fn bump_0(mut p: *mut S) { FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, - DestructibleUnsafe, TriviallyCopyableUnsafe, - CopyableUnsafe, Default, )] #[cpp_from(i32, construct, value)] diff --git a/tests/unit/out/unsafe/typedef-anon-struct.rs b/tests/unit/out/unsafe/typedef-anon-struct.rs index 03557fd799..4a65e1aa98 100644 --- a/tests/unit/out/unsafe/typedef-anon-struct.rs +++ b/tests/unit/out/unsafe/typedef-anon-struct.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Outer_RunInfo { pub block_idx: i32, diff --git a/tests/unit/out/unsafe/unary_expr_or_type_trait.rs b/tests/unit/out/unsafe/unary_expr_or_type_trait.rs index ca2ccbcb1c..21d2a4b70d 100644 --- a/tests/unit/out/unsafe/unary_expr_or_type_trait.rs +++ b/tests/unit/out/unsafe/unary_expr_or_type_trait.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C, align(16))] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct S { pub c: libc::c_char, diff --git a/tests/unit/out/unsafe/unboxed_locals.rs b/tests/unit/out/unsafe/unboxed_locals.rs index 87b8ca6ac8..ba618290d5 100644 --- a/tests/unit/out/unsafe/unboxed_locals.rs +++ b/tests/unit/out/unsafe/unboxed_locals.rs @@ -14,15 +14,7 @@ pub unsafe fn inc_1(r: *mut i32) { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Pair { pub first: i32, diff --git a/tests/unit/out/unsafe/unboxed_records.rs b/tests/unit/out/unsafe/unboxed_records.rs index d0852370af..e417e9742c 100644 --- a/tests/unit/out/unsafe/unboxed_records.rs +++ b/tests/unit/out/unsafe/unboxed_records.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Inner { pub a: i32, @@ -24,15 +16,7 @@ pub struct Inner { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Cookie { pub x: i32, @@ -42,16 +26,7 @@ pub struct Cookie { pub arr: [i32; 4], } #[repr(C)] -#[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct Counter { pub n: i32, } diff --git a/tests/unit/out/unsafe/union_addrof_external.rs b/tests/unit/out/unsafe/union_addrof_external.rs index 41a91a7fce..0f754c8ee8 100644 --- a/tests/unit/out/unsafe/union_addrof_external.rs +++ b/tests/unit/out/unsafe/union_addrof_external.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct record { pub code: u16, @@ -25,16 +17,7 @@ pub struct record { pub pad: [libc::c_char; 8], } #[repr(C)] -#[derive( - Copy, - Clone, - FnPtrArg, - VaArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub union anon_0 { pub h: record, pub raw_: [libc::c_char; 128], @@ -46,15 +29,7 @@ impl Default for anon_0 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Container { pub view: anon_0, diff --git a/tests/unit/out/unsafe/union_basic.rs b/tests/unit/out/unsafe/union_basic.rs index 13e17e67c5..a7abc7ab17 100644 --- a/tests/unit/out/unsafe/union_basic.rs +++ b/tests/unit/out/unsafe/union_basic.rs @@ -7,16 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] -#[derive( - Copy, - Clone, - FnPtrArg, - VaArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub union basic { pub i: i32, pub f: f32, @@ -27,16 +18,7 @@ impl Default for basic { } } #[repr(C)] -#[derive( - Copy, - Clone, - FnPtrArg, - VaArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub union empty { __empty: u8, } @@ -46,16 +28,7 @@ impl Default for empty { } } #[repr(C)] -#[derive( - Copy, - Clone, - FnPtrArg, - VaArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub union underscores { pub __: i32, pub ___: f64, @@ -118,16 +91,7 @@ unsafe fn main_0() -> i32 { return 0; } #[repr(C)] -#[derive( - Copy, - Clone, - FnPtrArg, - VaArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub union anon_0 { pub ai: i32, pub af: f32, diff --git a/tests/unit/out/unsafe/union_cross_arm_cast.rs b/tests/unit/out/unsafe/union_cross_arm_cast.rs index 98dd8dfca2..09ac989918 100644 --- a/tests/unit/out/unsafe/union_cross_arm_cast.rs +++ b/tests/unit/out/unsafe/union_cross_arm_cast.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct shape_a { pub code: u16, @@ -24,15 +16,7 @@ pub struct shape_a { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct shape_b { pub code: u16, @@ -42,16 +26,7 @@ pub struct shape_b { pub tail: u32, } #[repr(C)] -#[derive( - Copy, - Clone, - FnPtrArg, - VaArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub union anon_0 { pub a: shape_a, pub b: shape_b, @@ -64,15 +39,7 @@ impl Default for anon_0 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Container { pub len: u32, diff --git a/tests/unit/out/unsafe/union_field_alignment.rs b/tests/unit/out/unsafe/union_field_alignment.rs index 6d11667278..e8e05f86a0 100644 --- a/tests/unit/out/unsafe/union_field_alignment.rs +++ b/tests/unit/out/unsafe/union_field_alignment.rs @@ -7,16 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] -#[derive( - Copy, - Clone, - FnPtrArg, - VaArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub union anon_0 { pub bytes: [u8; 1], pub aligner: *mut ::libc::c_void, @@ -28,15 +19,7 @@ impl Default for anon_0 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct node { pub next: *mut node, diff --git a/tests/unit/out/unsafe/union_flex_array_member.rs b/tests/unit/out/unsafe/union_flex_array_member.rs index 506a11bf3a..db9fcda57c 100644 --- a/tests/unit/out/unsafe/union_flex_array_member.rs +++ b/tests/unit/out/unsafe/union_flex_array_member.rs @@ -7,16 +7,7 @@ use std::io::{Read, Seek, Write}; use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] -#[derive( - Copy, - Clone, - FnPtrArg, - VaArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub union anon_0 { pub bytes: [u8; 1], pub aligner: *mut ::libc::c_void, @@ -28,15 +19,7 @@ impl Default for anon_0 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct node { pub len: usize, diff --git a/tests/unit/out/unsafe/union_memset_memcpy.rs b/tests/unit/out/unsafe/union_memset_memcpy.rs index a5747e788d..55f7fccb24 100644 --- a/tests/unit/out/unsafe/union_memset_memcpy.rs +++ b/tests/unit/out/unsafe/union_memset_memcpy.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct shape_a { pub code: u16, @@ -24,15 +16,7 @@ pub struct shape_a { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct shape_b { pub code: u16, @@ -41,16 +25,7 @@ pub struct shape_b { pub fill: [libc::c_char; 8], } #[repr(C)] -#[derive( - Copy, - Clone, - FnPtrArg, - VaArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub union anon_0 { pub a: shape_a, pub b: shape_b, @@ -63,15 +38,7 @@ impl Default for anon_0 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Container { pub view: anon_0, diff --git a/tests/unit/out/unsafe/union_nested.rs b/tests/unit/out/unsafe/union_nested.rs index 2b4486b2ce..8d3fcb317c 100644 --- a/tests/unit/out/unsafe/union_nested.rs +++ b/tests/unit/out/unsafe/union_nested.rs @@ -8,31 +8,14 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct record { pub code: u16, pub pad: [libc::c_char; 14], } #[repr(C)] -#[derive( - Copy, - Clone, - FnPtrArg, - VaArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub union anon_0 { pub h: record, pub raw_: [libc::c_char; 128], @@ -44,30 +27,13 @@ impl Default for anon_0 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct inner { pub view: anon_0, } #[repr(C)] -#[derive( - Copy, - Clone, - FnPtrArg, - VaArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub union anon_1 { pub h: record, pub nested: inner, @@ -79,15 +45,7 @@ impl Default for anon_1 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Outer { pub kind: i32, diff --git a/tests/unit/out/unsafe/union_pointer_pun_address.rs b/tests/unit/out/unsafe/union_pointer_pun_address.rs index cac995bfe0..69afa6f4c5 100644 --- a/tests/unit/out/unsafe/union_pointer_pun_address.rs +++ b/tests/unit/out/unsafe/union_pointer_pun_address.rs @@ -8,30 +8,14 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct node_a { pub n: i32, } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct node_b { pub data: *mut ::libc::c_void, @@ -52,16 +36,7 @@ unsafe fn main_0() -> i32 { return 0; } #[repr(C)] -#[derive( - Copy, - Clone, - FnPtrArg, - VaArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub union anon_0 { pub to_a: *mut node_a, pub to_b: *mut node_b, diff --git a/tests/unit/out/unsafe/union_pointer_pun_writethrough.rs b/tests/unit/out/unsafe/union_pointer_pun_writethrough.rs index d4dd65d477..61886a058c 100644 --- a/tests/unit/out/unsafe/union_pointer_pun_writethrough.rs +++ b/tests/unit/out/unsafe/union_pointer_pun_writethrough.rs @@ -21,16 +21,7 @@ unsafe fn main_0() -> i32 { return 0; } #[repr(C)] -#[derive( - Copy, - Clone, - FnPtrArg, - VaArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub union anon_0 { pub as_unsigned: *mut u64, pub as_signed: *mut i64, diff --git a/tests/unit/out/unsafe/union_struct_dual_use.rs b/tests/unit/out/unsafe/union_struct_dual_use.rs index 31160a3938..002cfff370 100644 --- a/tests/unit/out/unsafe/union_struct_dual_use.rs +++ b/tests/unit/out/unsafe/union_struct_dual_use.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Inner { pub a: i32, @@ -26,16 +18,7 @@ pub unsafe fn sum_inner_0(mut i: *mut Inner) -> i32 { return (((*i).a) + ((*i).b)); } #[repr(C)] -#[derive( - Copy, - Clone, - FnPtrArg, - VaArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub union anon_1 { pub inner: Inner, pub raw_: [libc::c_char; 16], @@ -47,15 +30,7 @@ impl Default for anon_1 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Outer { pub u: anon_1, diff --git a/tests/unit/out/unsafe/union_tagged_many_arms.rs b/tests/unit/out/unsafe/union_tagged_many_arms.rs index b18c1a3971..28a1e52f33 100644 --- a/tests/unit/out/unsafe/union_tagged_many_arms.rs +++ b/tests/unit/out/unsafe/union_tagged_many_arms.rs @@ -13,16 +13,7 @@ pub const Tag_enum_T_TEXT: Tag_enum = 2; pub const Tag_enum_T_FLOAT: Tag_enum = 3; pub const Tag_enum_T_REF: Tag_enum = 4; #[repr(C)] -#[derive( - Copy, - Clone, - FnPtrArg, - VaArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub union anon_0 { pub text: *const libc::c_char, pub handle: *mut ::libc::c_void, @@ -37,15 +28,7 @@ impl Default for anon_0 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Slot { pub tag: Tag_enum, diff --git a/tests/unit/out/unsafe/union_tagged_simple.rs b/tests/unit/out/unsafe/union_tagged_simple.rs index e11bcc8d75..852e094d49 100644 --- a/tests/unit/out/unsafe/union_tagged_simple.rs +++ b/tests/unit/out/unsafe/union_tagged_simple.rs @@ -10,16 +10,7 @@ pub type Kind_enum = u32; pub const Kind_enum_KIND_NONE: Kind_enum = 0; pub const Kind_enum_KIND_DONE: Kind_enum = 1; #[repr(C)] -#[derive( - Copy, - Clone, - FnPtrArg, - VaArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub union anon_0 { pub obj: *mut ::libc::c_void, pub code: i32, @@ -31,15 +22,7 @@ impl Default for anon_0 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Event { pub kind: Kind_enum, diff --git a/tests/unit/out/unsafe/union_tagged_struct_arms.rs b/tests/unit/out/unsafe/union_tagged_struct_arms.rs index 898814120d..f55e0018a5 100644 --- a/tests/unit/out/unsafe/union_tagged_struct_arms.rs +++ b/tests/unit/out/unsafe/union_tagged_struct_arms.rs @@ -12,15 +12,7 @@ pub const Choice_enum_C_LETTERS: Choice_enum = 2; pub const Choice_enum_C_INTEGERS: Choice_enum = 3; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct anon_1 { pub items: *mut *mut libc::c_char, @@ -29,15 +21,7 @@ pub struct anon_1 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct anon_2 { pub lo: i32, @@ -47,15 +31,7 @@ pub struct anon_2 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct anon_3 { pub lo: i64, @@ -65,16 +41,7 @@ pub struct anon_3 { pub width: i32, } #[repr(C)] -#[derive( - Copy, - Clone, - FnPtrArg, - VaArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub union anon_0 { pub list: anon_1, pub letters: anon_2, @@ -87,15 +54,7 @@ impl Default for anon_0 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Branch { pub choice: Choice_enum, diff --git a/tests/unit/out/unsafe/union_void_ptr_sized_deref.rs b/tests/unit/out/unsafe/union_void_ptr_sized_deref.rs index 958a89adb0..4ab15acce4 100644 --- a/tests/unit/out/unsafe/union_void_ptr_sized_deref.rs +++ b/tests/unit/out/unsafe/union_void_ptr_sized_deref.rs @@ -11,16 +11,7 @@ pub const Width_enum_W_64: Width_enum = 0; pub const Width_enum_W_32: Width_enum = 1; pub const Width_enum_W_16: Width_enum = 2; #[repr(C)] -#[derive( - Copy, - Clone, - FnPtrArg, - VaArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub union anon_0 { pub text: *const libc::c_char, pub handle: *mut ::libc::c_void, @@ -34,15 +25,7 @@ impl Default for anon_0 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Sink { pub width: Width_enum, diff --git a/tests/unit/out/unsafe/unique_ptr.rs b/tests/unit/out/unsafe/unique_ptr.rs index 805b55a29e..c149f5685f 100644 --- a/tests/unit/out/unsafe/unique_ptr.rs +++ b/tests/unit/out/unsafe/unique_ptr.rs @@ -30,15 +30,7 @@ impl SafePointer { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Pair { pub x: i32, diff --git a/tests/unit/out/unsafe/unique_ptr_field_reset.rs b/tests/unit/out/unsafe/unique_ptr_field_reset.rs index aa3776cefb..af0389c13b 100644 --- a/tests/unit/out/unsafe/unique_ptr_field_reset.rs +++ b/tests/unit/out/unsafe/unique_ptr_field_reset.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Data { pub v: i32, diff --git a/tests/unit/out/unsafe/unique_ptr_nested.rs b/tests/unit/out/unsafe/unique_ptr_nested.rs index e1cde20315..1e46c6f7f9 100644 --- a/tests/unit/out/unsafe/unique_ptr_nested.rs +++ b/tests/unit/out/unsafe/unique_ptr_nested.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Inner { pub x: i32, diff --git a/tests/unit/out/unsafe/unique_ptr_struct.rs b/tests/unit/out/unsafe/unique_ptr_struct.rs index 63507db816..a19bcfabac 100644 --- a/tests/unit/out/unsafe/unique_ptr_struct.rs +++ b/tests/unit/out/unsafe/unique_ptr_struct.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Point { pub x: i32, diff --git a/tests/unit/out/unsafe/va_arg_mixed_types.rs b/tests/unit/out/unsafe/va_arg_mixed_types.rs index c8740b7932..bfbaf84296 100644 --- a/tests/unit/out/unsafe/va_arg_mixed_types.rs +++ b/tests/unit/out/unsafe/va_arg_mixed_types.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct pair { pub a: i32, diff --git a/tests/unit/out/unsafe/va_arg_non_primitive_ptrs.rs b/tests/unit/out/unsafe/va_arg_non_primitive_ptrs.rs index 2b287f3ca0..203e407a40 100644 --- a/tests/unit/out/unsafe/va_arg_non_primitive_ptrs.rs +++ b/tests/unit/out/unsafe/va_arg_non_primitive_ptrs.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct node { pub data: i32, diff --git a/tests/unit/out/unsafe/va_arg_struct_ctx.rs b/tests/unit/out/unsafe/va_arg_struct_ctx.rs index 385895e4f4..f8beb11294 100644 --- a/tests/unit/out/unsafe/va_arg_struct_ctx.rs +++ b/tests/unit/out/unsafe/va_arg_struct_ctx.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct context { pub verbose: i32, @@ -34,16 +26,7 @@ pub unsafe fn set_error_0( } } #[repr(C)] -#[derive( - Copy, - Clone, - FnPtrArg, - VaArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, -)] +#[derive(Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub union value { pub i: i32, pub l: i64, diff --git a/tests/unit/out/unsafe/va_arg_void_ptr.rs b/tests/unit/out/unsafe/va_arg_void_ptr.rs index 6b30b24124..134c4d2127 100644 --- a/tests/unit/out/unsafe/va_arg_void_ptr.rs +++ b/tests/unit/out/unsafe/va_arg_void_ptr.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct registry { pub slot: *mut ::libc::c_void, diff --git a/tests/unit/out/unsafe/va_list_field.rs b/tests/unit/out/unsafe/va_list_field.rs index 63b15ae462..dfa3571717 100644 --- a/tests/unit/out/unsafe/va_list_field.rs +++ b/tests/unit/out/unsafe/va_list_field.rs @@ -66,15 +66,7 @@ pub unsafe fn sum_ptr_2(mut n: i32, __args: Box<[VaArg]>) -> i32 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Cursor_3 { pub ap: *mut *const VaArg, diff --git a/tests/unit/out/unsafe/vector.rs b/tests/unit/out/unsafe/vector.rs index d79ccce253..79535b6d5f 100644 --- a/tests/unit/out/unsafe/vector.rs +++ b/tests/unit/out/unsafe/vector.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct S { pub x: i32, @@ -48,9 +40,7 @@ pub struct Foo { FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, - DestructibleUnsafe, TriviallyCopyableUnsafe, - CopyableUnsafe, Default, )] #[cpp_from(i32, construct, value)] diff --git a/tests/unit/out/unsafe/vector_iter_range_ctor.rs b/tests/unit/out/unsafe/vector_iter_range_ctor.rs index 03a79ab4d6..c01dfed5bc 100644 --- a/tests/unit/out/unsafe/vector_iter_range_ctor.rs +++ b/tests/unit/out/unsafe/vector_iter_range_ctor.rs @@ -14,9 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, - DestructibleUnsafe, TriviallyCopyableUnsafe, - CopyableUnsafe, Default, )] #[cpp_from(i32, construct, value)] @@ -36,9 +34,7 @@ impl Degrees { FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, - DestructibleUnsafe, TriviallyCopyableUnsafe, - CopyableUnsafe, Default, )] #[cpp_into(i64, to_i64)] diff --git a/tests/unit/out/unsafe/vector_subscript_direct.rs b/tests/unit/out/unsafe/vector_subscript_direct.rs index 5d170068c2..0061870b81 100644 --- a/tests/unit/out/unsafe/vector_subscript_direct.rs +++ b/tests/unit/out/unsafe/vector_subscript_direct.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Point { pub x: i32, diff --git a/tests/unit/out/unsafe/vector_with_allocator.rs b/tests/unit/out/unsafe/vector_with_allocator.rs index d3933d88b0..6ea2e26239 100644 --- a/tests/unit/out/unsafe/vector_with_allocator.rs +++ b/tests/unit/out/unsafe/vector_with_allocator.rs @@ -8,15 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct TestAllocator_int_ {} impl TestAllocator_int_ { @@ -38,15 +30,7 @@ impl TestAllocator_int_ { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct TestAllocator_double_ {} impl TestAllocator_double_ { diff --git a/tests/unit/out/unsafe/void_cast.rs b/tests/unit/out/unsafe/void_cast.rs index e2730ce1aa..b03fefe8a2 100644 --- a/tests/unit/out/unsafe/void_cast.rs +++ b/tests/unit/out/unsafe/void_cast.rs @@ -34,15 +34,7 @@ pub unsafe fn bump_and_return_4() -> i32 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - TriviallyCopyableUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Holder { pub field: i32, From 9e8bf4eff6846743e7dd8ffa8c33eef4f8ea0cfb Mon Sep 17 00:00:00 2001 From: Lucian Popescu Date: Tue, 1 Dec 2026 16:20:43 +0000 Subject: [PATCH 7/7] Call copy constructor isntead of trivially copying in cpp_form --- libcc2rs-macros/src/cpp_from.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcc2rs-macros/src/cpp_from.rs b/libcc2rs-macros/src/cpp_from.rs index f9dd76d5d0..0ad9cc8b70 100644 --- a/libcc2rs-macros/src/cpp_from.rs +++ b/libcc2rs-macros/src/cpp_from.rs @@ -76,7 +76,7 @@ fn ctor_call( let method = &conversion.method; let arg = match (conversion.kind, is_unsafe) { (Kind::Value, true) => quote!((*src).clone()), - (Kind::Value, false) => quote!(src.read()), + (Kind::Value, false) => quote!(::libcc2rs::copy_constructed(src)), (Kind::MutPtr, true) if !is_move => quote!(src.cast_mut()), (Kind::Ptr | Kind::MutPtr, _) => quote!(src), };