diff --git a/cpp2rust/converter/converter.cpp b/cpp2rust/converter/converter.cpp index fded87dcca..2964f4dc09 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) { @@ -5145,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; } @@ -5175,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"); } @@ -5703,42 +5712,62 @@ 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)); } const RecordTrait *copy[] = {&kCopyConstructible, &kCopyAssignable}; const RecordTrait *move[] = {&kMoveConstructible, &kMoveAssignable}; + 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)) { - 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}); } } +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/converter_lib.cpp b/cpp2rust/converter/converter_lib.cpp index ae3a76f481..f50407ae8e 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) { @@ -974,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 80ff63fd0e..e55b975074 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 fb8a121898..939397c9ef 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( @@ -2342,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; } @@ -2371,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 a8b6d1505e..4b58297dca 100644 --- a/libcc2rs-macros/src/constructor.rs +++ b/libcc2rs-macros/src/constructor.rs @@ -115,32 +115,86 @@ 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 { + 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 + } + } + } + } +} + +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::#copy for #name #ty_generics #where_clause { + fn trivial_copy(src: &Self) -> Self { src.clone() } } - } else { - quote! { - const BY_VALUE: bool = true; - fn copied_value(src: &Self) -> Self { + impl #impl_generics ::libcc2rs::#mov for #name #ty_generics #where_clause { + fn trivial_move(src: &mut Self) -> Self { src.clone() } } - }; + } + }; + 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::#trait_name for #name #ty_generics #where_clause { - fn #method(this: &::libcc2rs::Ptr, src: ::libcc2rs::Ptr) #ret { - this.write(src.read()); - #tail - } - #by_value + 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 {})* } + .into() } // The C++ defaulted copy and move members of a struct that its memberwise @@ -190,7 +244,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 +283,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/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), }; 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..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/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..f3e3e62975 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,14 @@ impl Ptr { #[cfg(test)] mod tests { - use crate::{AsPointer, ByteRepr, Decay, Place, Ptr, Record, Value}; + use crate::{ + AsPointer, ByteRepr, Decay, Place, Ptr, Record, TriviallyCopyable, Value, + ZeroInitialization, + }; use std::cell::RefCell; use std::rc::Rc; - #[derive(Clone, Default, Record, ByteRepr)] + #[derive(Clone, Default, Record, ByteRepr, ZeroInitialization, TriviallyCopyable)] #[byte_size(8)] struct Inner { #[offset(0)] diff --git a/libcc2rs/src/lib.rs b/libcc2rs/src/lib.rs index 67c6073588..165c836eae 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; @@ -61,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 { @@ -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..5a73a257f4 100644 --- a/libcc2rs/src/swap.rs +++ b/libcc2rs/src/swap.rs @@ -14,11 +14,11 @@ use std::rc::Rc; use crate::capture::{Destructible, DestructibleUnsafe}; use crate::constructor::{ - MoveAssignable, MoveAssignableUnsafe, MoveConstructible, MoveConstructibleUnsafe, + 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 { @@ -54,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 { @@ -82,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()) } } @@ -114,9 +128,9 @@ impl ConstructMoveUnsafe for &&&ConstructUnsafe ConstructCopyUnsafe for &&ConstructUnsafe { +impl ConstructCopyUnsafe for &&ConstructUnsafe { unsafe fn construct(self) -> T { - unsafe { (*self.0).clone() } + unsafe { copy_constructed_unsafe(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..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/dirent/shim.rs b/rules/dirent/shim.rs index 7c444620db..02c56e203b 100644 --- a/rules/dirent/shim.rs +++ b/rules/dirent/shim.rs @@ -1,11 +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, 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)] +#[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 ed8e17bcd4..72bb389b4d 100644 --- a/rules/ifaddrs/shim.rs +++ b/rules/ifaddrs/shim.rs @@ -2,12 +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, 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)] +#[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 65eb7d9fe7..0ddbf861b2 100644 --- a/rules/ip/shim.rs +++ b/rules/ip/shim.rs @@ -1,16 +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, ZeroInitialization}; +use crate::{ByteRepr, Ptr, Record, TriviallyCopyable, ZeroInitialization}; -#[derive(Clone, Default, Record, ByteRepr, ZeroInitialization, Copyable, Destructible)] +#[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)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, TriviallyCopyable)] #[byte_size(16)] pub struct In6Addr { #[offset(0)] diff --git a/rules/map/shim.rs b/rules/map/shim.rs index 7bdfb4edfb..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, - 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: Clone + 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 c635a5d0bf..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/netdb/shim.rs b/rules/netdb/shim.rs index e83e2d8b49..9759114ae9 100644 --- a/rules/netdb/shim.rs +++ b/rules/netdb/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, Ptr, Record, Sockaddr, ZeroInitialization}; +use crate::{ByteRepr, 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, 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..e3fd49fee5 100644 --- a/rules/poll/shim.rs +++ b/rules/poll/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, Record, TriviallyCopyable, ZeroInitialization}; use std::mem::{offset_of, size_of}; -#[derive(Clone, Default, Record, ByteRepr, ZeroInitialization, Copyable, Destructible)] +#[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 7d5ee08abf..ce42470db6 100644 --- a/rules/pwd/shim.rs +++ b/rules/pwd/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, Ptr, Record, ZeroInitialization}; +use crate::{ByteRepr, 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, 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..0d84bd0045 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::TriviallyCopyable; -#[derive(Clone, Default, Copyable, Destructible)] +#[derive(Clone, Default, TriviallyCopyable)] pub struct CFdSet { fds: BTreeSet, } diff --git a/rules/socket/shim.rs b/rules/socket/shim.rs index baf2cc1242..d88e067aa7 100644 --- a/rules/socket/shim.rs +++ b/rules/socket/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, CChar, Copyable, Destructible, In6Addr, InAddr, Ptr, Record, 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)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, TriviallyCopyable)] #[byte_size(16)] pub struct Sockaddr { #[offset(0)] @@ -17,7 +15,7 @@ pub struct Sockaddr { pub sa_data: Box<[i8]>, } -#[derive(Clone, Record, ByteRepr, ZeroInitialization, Copyable, Destructible)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, TriviallyCopyable)] #[byte_size(16)] pub struct SockaddrIn { #[offset(0)] @@ -32,7 +30,7 @@ pub struct SockaddrIn { pub sin_zero: Box<[u8]>, } -#[derive(Clone, Default, Record, ByteRepr, ZeroInitialization, Copyable, Destructible)] +#[derive(Clone, Default, Record, ByteRepr, ZeroInitialization, TriviallyCopyable)] #[byte_size(28)] pub struct SockaddrIn6 { #[offset(0)] @@ -47,7 +45,7 @@ pub struct SockaddrIn6 { pub sin6_scope_id: u32, } -#[derive(Clone, Record, ByteRepr, ZeroInitialization, Copyable, Destructible)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, TriviallyCopyable)] #[byte_size(110)] pub struct SockaddrUn { #[offset(0)] @@ -58,7 +56,7 @@ pub struct SockaddrUn { pub sun_path: Box<[i8]>, } -#[derive(Clone, Record, ByteRepr, ZeroInitialization, Copyable, Destructible)] +#[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 84e5e1ba09..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, ZeroInitialization}; +use crate::{ByteRepr, Record, TriviallyCopyable, ZeroInitialization}; use std::mem::{offset_of, size_of}; -#[derive(Clone, Default, Record, ZeroInitialization, Copyable, Destructible)] +#[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 94d6b0bcea..e6d0c1bb5c 100644 --- a/rules/termios/shim.rs +++ b/rules/termios/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, Record, TriviallyCopyable, ZeroInitialization}; use std::mem::{offset_of, size_of}; -#[derive(Clone, Record, ByteRepr, ZeroInitialization, Copyable, Destructible)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, TriviallyCopyable)] #[byte_size(size_of::<::libc::termios>())] pub struct Termios { #[offset(offset_of!(::libc::termios, c_iflag))] @@ -105,7 +105,7 @@ impl Termios { } } -#[derive(Clone, Default, Record, ByteRepr, ZeroInitialization, Copyable, Destructible)] +#[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 848c6f33e0..b0093f7db8 100644 --- a/rules/time/shim.rs +++ b/rules/time/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, Ptr, Record, ZeroInitialization}; +use crate::{ByteRepr, 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, TriviallyCopyable)] #[byte_size(size_of::<::libc::tm>())] pub struct Tm { #[offset(offset_of!(::libc::tm, tm_sec))] @@ -65,7 +65,7 @@ impl Tm { } } -#[derive(Clone, Default, Record, ByteRepr, ZeroInitialization, Copyable, Destructible)] +#[derive(Clone, Default, Record, ByteRepr, ZeroInitialization, TriviallyCopyable)] #[byte_size(size_of::<::libc::timeval>())] pub struct Timeval { #[offset(offset_of!(::libc::timeval, tv_sec))] @@ -74,7 +74,7 @@ pub struct Timeval { pub tv_usec: i64, } -#[derive(Clone, Default, Record, ByteRepr, ZeroInitialization, Copyable, Destructible)] +#[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/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/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..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,16 +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, - 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 5433370a74..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,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 5fea9b06fb..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,16 +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, - 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 a200a83083..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,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 9fe6482f96..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,7 +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, 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 c7a550cfd7..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,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 7c047c4f92..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,16 +39,7 @@ pub struct Derived { pub factor: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - 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 fd2af93f04..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,14 +42,7 @@ pub struct Derived { impl Derived {} #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 9124bb3a3f..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,9 +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, 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 492d0f2a0b..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,9 +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, 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 ef83a8227c..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,16 +112,7 @@ thread_local!( }; ); #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - 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 6949546a0a..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,14 +105,7 @@ pub static mut shared_5: std::cell::LazyCell = }); #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 ef4bdaac4b..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,16 +92,7 @@ thread_local!( }; ); #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct HasStaticMember_int_ {} @@ -119,16 +110,7 @@ thread_local!( }; ); #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - 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 58b801c5b0..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,14 +85,7 @@ pub static mut member_4: std::cell::LazyCell = }); #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct HasStaticMember_int_ {} pub static mut member_5: std::cell::LazyCell = @@ -111,14 +104,7 @@ pub static mut member_5: std::cell::LazyCell = }); #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 d9c8e65b23..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,16 +174,7 @@ fn main_0() -> i32 { return 0; } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct S_14 {} @@ -216,16 +207,7 @@ pub fn b_count_local_15() -> i32 { return ({ count_18() }); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - 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 2e0c0a4356..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,14 +162,7 @@ unsafe fn main_0() -> i32 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct S_14 {} pub unsafe fn count_18() -> i32 { @@ -200,14 +193,7 @@ pub unsafe fn b_count_local_15() -> i32 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 e2112a32a9..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,16 +90,7 @@ impl Destructible for AssertsDtorCountAtExit { } } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - 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 4665caa9f5..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,14 +81,7 @@ impl DestructibleUnsafe for AssertsDtorCountAtExit { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 1dae912268..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,7 +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, Copyable, ByteRepr, Clone, ZeroInitialization)] +#[derive(VaArg, FnPtrArg, TriviallyCopyable, ByteRepr, Clone, ZeroInitialization)] #[byte_size(4)] pub struct anon_13 { #[offset(0)] @@ -67,9 +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, Copyable, -)] +#[derive(Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(4)] pub struct Record_19 { #[offset(0)] @@ -106,16 +104,7 @@ pub fn test_29() { assert!((({ raise_30(1,) }) == 11)); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct Tally_31 {} @@ -129,16 +118,7 @@ pub fn test_33() { assert!((total_32.with(|rc| *rc.borrow()) == 11)); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct p5_members_of_class_with_external_linkage_Ledger {} @@ -207,9 +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, Copyable, -)] +#[derive(Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(4)] pub struct Entry_52 { #[offset(0)] @@ -220,9 +198,7 @@ impl Default for Entry_52 { { Entry_52 { key: 1 } } } } -#[derive( - Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, -)] +#[derive(Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(8)] pub struct Entry_54 { #[offset(0)] @@ -294,7 +270,7 @@ 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, TriviallyCopyable, ByteRepr, Clone, ZeroInitialization)] #[byte_size(4)] pub struct anon_62 { #[offset(0)] @@ -332,9 +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, Copyable, -)] +#[derive(Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(16)] pub struct Record_65 { #[offset(0)] @@ -379,16 +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, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct Tally_67 {} @@ -431,9 +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, 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 4109990271..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,9 +37,7 @@ pub unsafe fn test_11() { ); } #[repr(C)] -#[derive( - Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, -)] +#[derive(Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub union anon_13 { pub whole: i32, pub fraction: f32, @@ -62,9 +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, CopyableUnsafe, -)] +#[derive(Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct Record_19 { pub id: i32, } @@ -98,14 +94,7 @@ pub unsafe fn test_29() { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Tally_31 {} impl Tally_31 { @@ -123,14 +112,7 @@ pub unsafe fn test_33() { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p5_members_of_class_with_external_linkage_Ledger {} pub unsafe fn test_36() { @@ -193,9 +175,7 @@ pub unsafe fn test_55() { assert!(((unsafe { key_in_b_56() }) == (400))); } #[repr(C)] -#[derive( - Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, -)] +#[derive(Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct Entry_52 { pub key: i32, } @@ -205,9 +185,7 @@ impl Default for Entry_52 { } } #[repr(C)] -#[derive( - Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, -)] +#[derive(Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct Entry_54 { pub key: i32, pub value: i32, @@ -269,9 +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, CopyableUnsafe, -)] +#[derive(Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub union anon_62 { pub whole: i32, pub fraction: f32, @@ -294,9 +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, CopyableUnsafe, -)] +#[derive(Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct Record_65 { pub id: i64, pub extra: i32, @@ -334,14 +308,7 @@ pub unsafe fn raise_30(mut by: i32) -> i32 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Tally_67 {} impl Tally_67 { @@ -380,9 +347,7 @@ pub unsafe fn key_in_b_56() -> i32 { return (entry.key as i32); } #[repr(C)] -#[derive( - Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, 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 737c83c38b..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,9 +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, Copyable, -)] +#[derive(Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(4)] pub struct p1_member_hides_namespace_variable_HasBalance { #[offset(0)] @@ -47,9 +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, 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 3f1bddfcd1..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,8 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, CppFrom, - Destructible, - Copyable, + TriviallyCopyable, 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 4410e21194..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,7 +19,7 @@ pub fn test_0() { assert!((level == 5)); } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(16)] pub struct p1_own_address_in_initializer_SelfLinked { @@ -75,7 +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, 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 fe2c5213a7..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,16 +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, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct p2_11_unscoped_enumerator_in_both_scopes_HasUnscopedEnum {} @@ -84,16 +75,7 @@ thread_local!( pub static count_6: Value = Rc::new(RefCell::new(0)); ); #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct p2_12_class_name_in_own_scope_HasStaticCounter {} @@ -110,7 +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, Copyable, ByteRepr, Clone, ZeroInitialization)] +#[derive(VaArg, FnPtrArg, TriviallyCopyable, ByteRepr, Clone, ZeroInitialization)] #[byte_size(8)] pub struct anon_8 { #[offset(0)] @@ -136,7 +118,7 @@ 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, TriviallyCopyable, ByteRepr, Clone, ZeroInitialization)] #[byte_size(8)] pub struct anon_9 { #[offset(0)] @@ -160,7 +142,7 @@ impl Default for anon_9 { } } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(16)] pub struct p2_13_anonymous_union_members_in_parent_scope_HasAnonymousUnion { @@ -197,7 +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, Copyable, ByteRepr, Clone, ZeroInitialization)] +#[derive(VaArg, FnPtrArg, TriviallyCopyable, ByteRepr, Clone, ZeroInitialization)] #[byte_size(8)] pub struct anon_11 { #[offset(0)] @@ -220,9 +202,7 @@ impl Default for anon_11 { } } } -#[derive( - Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, 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)] @@ -266,9 +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, 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)] @@ -311,16 +289,7 @@ thread_local!( pub static rvalue_calls_17: Value = Rc::new(RefCell::new(0)); ); #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct p3_2_ref_qualified_members_are_distinct_HasRefQualifiedOverloads {} @@ -359,9 +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, 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)] @@ -409,16 +376,7 @@ thread_local!( pub static rvalue_calls_21: Value = Rc::new(RefCell::new(0)); ); #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - 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 {} @@ -450,16 +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, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct p4_friend_definition_defines_earlier_friend_declaration_DeclaresFriend {} @@ -468,16 +417,7 @@ pub fn shared_friend_24() -> i32 { return 7; } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct p4_friend_definition_defines_earlier_friend_declaration_DefinesFriend {} @@ -511,16 +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, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct p4_2_class_and_function_share_name_Reading { @@ -540,16 +471,7 @@ pub fn test_33() { assert!((function_calls_31.with(|rc| *rc.borrow()) == 1)); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - 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 cd37496ec4..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,9 +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, CopyableUnsafe, -)] +#[derive(Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct p1_member_hides_namespace_variable_HasBalance { pub balance: i32, } @@ -48,9 +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, 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 0fc55732c1..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,8 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, - DestructibleUnsafe, - CopyableUnsafe, + TriviallyCopyableUnsafe, 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 b7f9f43662..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,14 +20,7 @@ pub unsafe fn test_0() { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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, @@ -81,9 +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, 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 c149f64d3d..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,14 +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, - 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 { @@ -79,14 +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, - 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 { @@ -103,9 +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, CopyableUnsafe, -)] +#[derive(Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub union anon_8 { pub namespace_count: i32, pub namespace_ratio: f64, @@ -118,9 +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, CopyableUnsafe, -)] +#[derive(Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub union anon_9 { pub member_count: i32, pub member_ratio: f64, @@ -132,14 +114,7 @@ impl Default for anon_9 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p2_13_anonymous_union_members_in_parent_scope_HasAnonymousUnion { pub tag: i32, @@ -177,9 +152,7 @@ pub unsafe fn test_10() { assert!(((anon_11.block_ratio) == (0.75_f64))); } #[repr(C)] -#[derive( - Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, -)] +#[derive(Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub union anon_11 { pub block_count: i32, pub block_ratio: f64, @@ -190,9 +163,7 @@ impl Default for anon_11 { } } #[repr(C)] -#[derive( - Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, 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, @@ -240,9 +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, CopyableUnsafe, -)] +#[derive(Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct p3_2_explicit_object_and_rvalue_members_are_distinct_HasExplicitObjectOverload { pub base: i32, } @@ -295,14 +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, - 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 { @@ -343,9 +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, 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, @@ -402,14 +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, - 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 { @@ -450,14 +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, - 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 { @@ -466,14 +412,7 @@ pub unsafe fn shared_friend_24() -> i32 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p4_friend_definition_defines_earlier_friend_declaration_DefinesFriend {} pub unsafe fn test_25() { @@ -504,14 +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, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p4_2_class_and_function_share_name_Reading { pub value: i32, @@ -530,14 +462,7 @@ pub unsafe fn test_33() { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 3cc313e68c..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,16 +28,7 @@ pub struct HoldsTracker { pub member: Tracker, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct TriviallyDestructible { @@ -127,16 +118,7 @@ thread_local!( Rc::new(RefCell::new(TriviallyDestructible { value: 6 })); ); #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - 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 b83dfbcfef..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,14 +35,7 @@ pub struct HoldsTracker { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct TriviallyDestructible { pub value: i32, @@ -134,14 +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, - 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 a3dc69da99..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,16 +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, - 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 { @@ -81,16 +72,7 @@ pub fn test_0() { assert!(({ ((*null_pm.borrow()) == -1_isize) })); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - 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 db0fc740f3..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,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p2_pointer_to_data_member_bytes_round_trip_HasTwoInts { pub first: i32, @@ -86,14 +79,7 @@ pub unsafe fn test_0() { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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/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/std/class/class.init/out/refcount/class.base.init.rs b/tests/std/class/class.init/out/refcount/class.base.init.rs index 4d521ec95c..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,8 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, CppFrom, - Destructible, - Copyable, + TriviallyCopyable, 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 d16a447fcb..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,8 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, - DestructibleUnsafe, - CopyableUnsafe, + TriviallyCopyableUnsafe, 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 00a8221b95..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,8 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, CppFrom, - Destructible, - Copyable, + TriviallyCopyable, 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 e8f37be34b..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,8 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, CppFrom, - Destructible, - Copyable, + TriviallyCopyable, 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 82e36b9568..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,8 +19,7 @@ impl p1_template_constructor_from_own_type_Probe { FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, - DestructibleUnsafe, - CopyableUnsafe, + TriviallyCopyableUnsafe, 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 4bf4ef98d9..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,8 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, - DestructibleUnsafe, - CopyableUnsafe, + TriviallyCopyableUnsafe, 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 2463097288..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,16 +10,7 @@ thread_local!( pub static allocations_0: Value = Rc::new(RefCell::new(0)); ); #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct p1_allocation_function_is_static_Allocates {} @@ -58,16 +49,7 @@ thread_local!( pub static deallocations_2: Value = Rc::new(RefCell::new(0)); ); #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - 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 658334d06e..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,9 +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, 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)] @@ -45,9 +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, 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 38ed565fcf..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,14 +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, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p1_allocation_function_is_static_Allocates {} impl p1_allocation_function_is_static_Allocates { @@ -52,14 +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, - 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 1c483add84..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,9 +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, CopyableUnsafe, -)] +#[derive(Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct p7_1_function_body_names_later_member_HasLaterMembers { pub stock: i32, } @@ -48,9 +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, 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 429b3a97c5..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,16 +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, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct p6_2_zero_initialized_padding_Padded { @@ -26,16 +17,7 @@ pub struct p6_2_zero_initialized_padding_Padded { pub number: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct p6_2_zero_initialized_padding_TailPadded { @@ -45,16 +27,7 @@ pub struct p6_2_zero_initialized_padding_TailPadded { pub letter: i8, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - 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 0e9a6a96bb..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,16 +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, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct p6_1_zero_initialized_pointer_to_member_HasTwoInts { @@ -25,9 +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, 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)] @@ -125,7 +114,7 @@ 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, TriviallyCopyable, Default, )] #[byte_size(24)] pub struct p6_2_zero_initialized_class_Inner { @@ -137,7 +126,7 @@ 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, TriviallyCopyable)] #[byte_size(96)] pub struct p6_2_zero_initialized_class_Outer { #[offset(0)] @@ -208,7 +197,7 @@ pub fn test_15() { ({ check_14((heap_outer).clone()) }); heap_outer.delete(); } -#[derive(VaArg, FnPtrArg, Destructible, Copyable, ByteRepr, Clone, ZeroInitialization)] +#[derive(VaArg, FnPtrArg, TriviallyCopyable, ByteRepr, Clone, ZeroInitialization)] #[byte_size(8)] pub struct p6_3_zero_initialized_union_Number { #[offset(0)] @@ -246,16 +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, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct p6_4_zero_initialized_array_Pair { @@ -360,9 +340,7 @@ pub fn test_21() { } heap_numbers.delete(); } -#[derive( - Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, 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)] @@ -380,9 +358,7 @@ impl Default for p9_1_2_zero_then_default_initialized_WithDefaultMember { } } } -#[derive( - Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, 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)] @@ -405,16 +381,7 @@ impl Default for p9_1_2_zero_then_default_initialized_LeavesMemberAlone { } } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - 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 36f49890f4..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,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p6_2_zero_initialized_padding_Padded { pub letter: libc::c_char, @@ -23,14 +16,7 @@ pub struct p6_2_zero_initialized_padding_Padded { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p6_2_zero_initialized_padding_TailPadded { pub number: i32, @@ -38,14 +24,7 @@ pub struct p6_2_zero_initialized_padding_TailPadded { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 1245573adc..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,23 +8,14 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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, CopyableUnsafe, -)] +#[derive(Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct p6_1_zero_initialized_pointer_to_member_HoldsSelector { pub selector: isize, } @@ -119,14 +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, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p6_2_zero_initialized_class_Inner { pub number: i32, @@ -135,14 +119,7 @@ pub struct p6_2_zero_initialized_class_Inner { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p6_2_zero_initialized_class_Outer { pub letter: libc::c_char, @@ -195,9 +172,7 @@ pub unsafe fn test_15() { }; } #[repr(C)] -#[derive( - Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, DestructibleUnsafe, 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], @@ -217,14 +192,7 @@ pub unsafe fn test_17() { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p6_4_zero_initialized_array_Pair { pub first: i32, @@ -315,9 +283,7 @@ pub unsafe fn test_21() { }; } #[repr(C)] -#[derive( - Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, -)] +#[derive(Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct p9_1_2_zero_then_default_initialized_WithDefaultMember { pub zeroed: i32, pub five: i32, @@ -333,9 +299,7 @@ impl Default for p9_1_2_zero_then_default_initialized_WithDefaultMember { } } #[repr(C)] -#[derive( - Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, -)] +#[derive(Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct p9_1_2_zero_then_default_initialized_LeavesMemberAlone { pub untouched: i32, } @@ -358,14 +322,7 @@ impl Default for p9_1_2_zero_then_default_initialized_LeavesMemberAlone { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 f62ffefefc..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,16 +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, - 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 053aacea1b..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,9 +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, Copyable, -)] +#[derive(Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(4)] pub struct p9_static_member_hides_namespace_variable_HasStaticStep { #[offset(0)] @@ -108,16 +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, - Copyable, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, CppFrom, TriviallyCopyable, )] #[cpp_from(i32, construct, value)] #[byte_size(4)] @@ -145,9 +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, Copyable, -)] +#[derive(Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(4)] pub struct p9_evaluated_each_time_called_Account { #[offset(0)] @@ -228,16 +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, - 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 b55a188bb1..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,7 +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, Copyable)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(16)] pub struct p2_pointer_to_array_member_HasIntArray { #[offset(0)] @@ -41,16 +41,7 @@ pub fn test_0() { assert!(({ (*obj.borrow()).before } == 1)); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct p2_pointer_to_data_member_HasTwoInts { @@ -80,16 +71,7 @@ thread_local!( pub static pm_2: Value = Rc::new(RefCell::new(-1_isize)); ); #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct p2_pointer_to_member_of_incomplete_class_CompletedLater { @@ -120,16 +102,7 @@ pub fn test_3() { ); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - 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 { @@ -138,9 +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, 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 fb656d70fc..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,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 eea1694c84..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,9 +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, CopyableUnsafe, -)] +#[derive(Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct p9_static_member_hides_namespace_variable_HasStaticStep { pub total: i32, } @@ -108,14 +106,7 @@ pub unsafe fn combine_14(mut first: i32, mut second: i32) -> i32 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - CppFromUnsafe, - DestructibleUnsafe, - CopyableUnsafe, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, TriviallyCopyableUnsafe, )] #[cpp_from(i32, construct, value)] pub struct p9_evaluated_each_time_called_Widget { @@ -144,9 +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, CopyableUnsafe, -)] +#[derive(Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct p9_evaluated_each_time_called_Account { pub balance: i32, } @@ -228,14 +217,7 @@ pub unsafe fn add_18(mut a: i32, mut b: i32) -> i32 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 323a5e53dd..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,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p2_pointer_to_array_member_HasIntArray { pub before: i32, @@ -48,14 +41,7 @@ pub unsafe fn test_0() { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p2_pointer_to_data_member_HasTwoInts { pub first: i32, @@ -95,14 +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, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p2_pointer_to_member_of_incomplete_class_CompletedLater { pub first: i32, @@ -128,23 +107,14 @@ pub unsafe fn test_3() { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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, 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 e4244a961a..202d47048e 100644 --- a/tests/std/expr/conv/out/refcount/conv.mem.rs +++ b/tests/std/expr/conv/out/refcount/conv.mem.rs @@ -7,16 +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, - 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 203929dd10..d3311733de 100644 --- a/tests/std/expr/conv/out/unsafe/conv.mem.rs +++ b/tests/std/expr/conv/out/unsafe/conv.mem.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 dc1677da4e..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,16 +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, - 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 904ef402d2..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,16 +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, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct HasTwoInts { @@ -26,16 +17,7 @@ pub struct HasTwoInts { pub second: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - 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 9d03378a52..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,16 +17,7 @@ pub fn test_0() { assert!((((converted.read()).read()) == 7)); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct p10_null_converts_to_null_HasTwoInts { @@ -36,16 +27,7 @@ pub struct p10_null_converts_to_null_HasTwoInts { pub second: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct p10_null_converts_to_null_HasChar { @@ -58,16 +40,7 @@ pub fn test_1() { assert!(((converted) == -1_isize)); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct p10_2_data_member_round_trip_HasTwoInts { @@ -77,16 +50,7 @@ pub struct p10_2_data_member_round_trip_HasTwoInts { pub second: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - 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 1df476df5c..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,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 ce31f7bc5f..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,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct HasTwoInts { pub first: i32, @@ -23,14 +16,7 @@ pub struct HasTwoInts { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 343354726f..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,14 +18,7 @@ pub unsafe fn test_0() { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p10_null_converts_to_null_HasTwoInts { pub first: i32, @@ -33,14 +26,7 @@ pub struct p10_null_converts_to_null_HasTwoInts { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p10_null_converts_to_null_HasChar { pub character: libc::c_char, @@ -52,14 +38,7 @@ pub unsafe fn test_1() { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p10_2_data_member_round_trip_HasTwoInts { pub first: i32, @@ -67,14 +46,7 @@ pub struct p10_2_data_member_round_trip_HasTwoInts { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 84324b3a78..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,16 +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, - 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 e74703caa0..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,16 +13,7 @@ thread_local!( pub static calls_1: Value = Rc::new(RefCell::new(0)); ); #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct p3_2_static_member_is_ordinary_pointer_HasStaticMembers {} @@ -42,16 +33,7 @@ pub fn test_2() { assert!((calls_1.with(|rc| *rc.borrow()) == 1)); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - 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 { @@ -69,16 +51,7 @@ pub fn test_3() { assert!((({ function_pointer.call(object.as_pointer(), 1,) }) == 6)); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - 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 7d9a6d05ed..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,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 fb74001edb..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,14 +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, - 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 { @@ -38,14 +31,7 @@ pub unsafe fn test_2() { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p3_2_explicit_object_member_is_ordinary_pointer_HasExplicitObjectMember { pub base: i32, @@ -73,14 +59,7 @@ pub unsafe fn test_3() { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 306f13b18e..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,16 +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, - 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 ee222e9dcf..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,16 +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, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct p4_1_both_null_HasTwoInts { @@ -32,16 +23,7 @@ pub fn test_0() { assert!(!(first_null != second_null)); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct p4_2_one_null_HasTwoInts { @@ -58,7 +40,7 @@ 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, TriviallyCopyable, ByteRepr, Clone, ZeroInitialization)] #[byte_size(4)] pub struct p4_5_members_of_same_union_HasTwoIntMembers { #[offset(0)] @@ -88,16 +70,7 @@ pub fn test_2() { assert!(!(first_pm != second_pm)); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - 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 f44da5d369..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,16 +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, - 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 57d6b2e7e4..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,16 +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, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct p3_arrow_star_HasTwoInts { @@ -39,16 +30,7 @@ pub fn test_0() { assert!((((p).member::(pm)) == ((p).member::(pm)))); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct p4_object_expression_sequenced_first_HasValue { @@ -92,16 +74,7 @@ pub fn test_7() { assert!((member_stamp_3.with(|rc| *rc.borrow()) == 2)); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - 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 c75bd283b4..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,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 dc14f74efd..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,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p4_1_both_null_HasTwoInts { pub first: i32, @@ -29,14 +22,7 @@ pub unsafe fn test_0() { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p4_2_one_null_HasTwoInts { pub first: i32, @@ -51,9 +37,7 @@ pub unsafe fn test_1() { assert!(!((null_pm) == (first_pm))); } #[repr(C)] -#[derive( - Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, -)] +#[derive(Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub union p4_5_members_of_same_union_HasTwoIntMembers { pub first: i32, pub second: i32, @@ -71,14 +55,7 @@ pub unsafe fn test_2() { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 c52cd320d1..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,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 56a0abb755..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,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p3_arrow_star_HasTwoInts { pub first: i32, @@ -41,14 +34,7 @@ pub unsafe fn test_0() { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p4_object_expression_sequenced_first_HasValue { pub value: i32, @@ -84,14 +70,7 @@ pub unsafe fn test_7() { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 2464ac6df8..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,7 +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, Copyable, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, CppFrom, TriviallyCopyable, )] #[cpp_from(i32, construct, value)] #[byte_size(16)] @@ -38,8 +38,7 @@ pub fn test_0() { VaArg, FnPtrArg, CppFrom, - Destructible, - Copyable, + TriviallyCopyable, 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 eaa2d42686..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,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - CppFromUnsafe, - DestructibleUnsafe, - CopyableUnsafe, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, TriviallyCopyableUnsafe, )] #[cpp_from(i32, construct, value)] pub struct p1_default_member_initializer_names_object_Holder { @@ -50,8 +43,7 @@ pub unsafe fn test_0() { FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, - DestructibleUnsafe, - CopyableUnsafe, + TriviallyCopyableUnsafe, 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 1dec3736c0..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,22 +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, - 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, 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)] @@ -57,16 +46,7 @@ pub fn test_0() { assert!(({ ((*n.borrow()).len() == 1_usize) })); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - 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 c85344c589..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,20 +8,11 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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, CopyableUnsafe, -)] +#[derive(Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct p16_rebind_member_Alloc_std_pair_const_int__int__ { pub id: i32, } @@ -56,14 +47,7 @@ pub unsafe fn test_0() { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 a8738251f0..c79f313bee 100644 --- a/tests/std/temp/out/refcount/temp.type.rs +++ b/tests/std/temp/out/refcount/temp.type.rs @@ -7,16 +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, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct p2_6_pointer_to_member_argument_HasTwoInts { @@ -29,16 +20,7 @@ thread_local!( pub static count_0: Value = Rc::new(RefCell::new(0)); ); #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - 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_ @@ -47,16 +29,7 @@ thread_local!( pub static count_1: Value = Rc::new(RefCell::new(0)); ); #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - 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_ @@ -65,16 +38,7 @@ thread_local!( pub static count_2: Value = Rc::new(RefCell::new(0)); ); #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - 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 49a9571e4a..bea9cdbfc9 100644 --- a/tests/std/temp/out/unsafe/temp.type.rs +++ b/tests/std/temp/out/unsafe/temp.type.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct p2_6_pointer_to_member_argument_HasTwoInts { pub first: i32, @@ -24,42 +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, - 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, - 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, - 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 e7b54eace1..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,9 +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, 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 9541de48e7..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,9 +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, 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 9fae59df13..7f4e4d2d44 100644 --- a/tests/std/utilities/utility/out/refcount/forward.rs +++ b/tests/std/utilities/utility/out/refcount/forward.rs @@ -13,16 +13,7 @@ pub fn test_0() { assert!((source == 1)); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - 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 0574c8d526..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,16 +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, - 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 a81584f74e..77931edff5 100644 --- a/tests/std/utilities/utility/out/unsafe/forward.rs +++ b/tests/std/utilities/utility/out/unsafe/forward.rs @@ -14,14 +14,7 @@ pub unsafe fn test_0() { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 f200448202..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,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 3ea9464a52..1c7a1b5590 100644 --- a/tests/ub/out/refcount/ctor_ref_member.rs +++ b/tests/ub/out/refcount/ctor_ref_member.rs @@ -14,8 +14,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, CppFrom, - Destructible, - Copyable, + TriviallyCopyable, 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 b0edecb22b..13bfba46d5 100644 --- a/tests/ub/out/refcount/self_referencing_initializer.rs +++ b/tests/ub/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( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - 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 1a84b35490..56fd4f0be5 100644 --- a/tests/ub/out/refcount/ub6.rs +++ b/tests/ub/out/refcount/ub6.rs @@ -7,7 +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, 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 c856d98849..0e0e52e6f6 100644 --- a/tests/ub/out/unsafe/ctor_ref_member.rs +++ b/tests/ub/out/unsafe/ctor_ref_member.rs @@ -14,8 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, - DestructibleUnsafe, - CopyableUnsafe, + TriviallyCopyableUnsafe, 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 137783f696..3a8b2f231e 100644 --- a/tests/ub/out/unsafe/self_referencing_initializer.rs +++ b/tests/ub/out/unsafe/self_referencing_initializer.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 0c250640dc..f06685299d 100644 --- a/tests/ub/out/unsafe/ub6.rs +++ b/tests/ub/out/unsafe/ub6.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 793b504939..924b7edc4d 100644 --- a/tests/unit/out/refcount/05_new.rs +++ b/tests/unit/out/refcount/05_new.rs @@ -7,30 +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, - 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, - 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 b0f7e8846a..f51b0bce8c 100644 --- a/tests/unit/out/refcount/10_struct.rs +++ b/tests/unit/out/refcount/10_struct.rs @@ -7,7 +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, Copyable, Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(16)] pub struct GraphNode { @@ -18,7 +18,7 @@ pub struct GraphNode { pub next: Ptr, } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(16)] pub struct Graph { @@ -28,7 +28,7 @@ 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, TriviallyCopyable)] #[byte_size(8)] pub struct Partial { #[offset(0)] @@ -45,21 +45,12 @@ impl Default for Partial { } } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - 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, 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 9f9960c025..5b4397813b 100644 --- a/tests/unit/out/refcount/addr_of_global.rs +++ b/tests/unit/out/refcount/addr_of_global.rs @@ -7,16 +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, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Inner { @@ -24,7 +15,7 @@ pub struct Inner { pub value: i32, } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, 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 5a0a49c95e..8ace8a102f 100644 --- a/tests/unit/out/refcount/anonymous-struct.rs +++ b/tests/unit/out/refcount/anonymous-struct.rs @@ -7,16 +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, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Outer_Named { @@ -26,16 +17,7 @@ pub struct Outer_Named { pub b: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct anon_0 { @@ -45,16 +27,7 @@ pub struct anon_0 { pub d: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct anon_1 { @@ -64,16 +37,7 @@ pub struct anon_1 { pub h: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct anon_2 { @@ -83,16 +47,7 @@ pub struct anon_2 { pub f: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct anon_4 { @@ -100,16 +55,7 @@ pub struct anon_4 { pub j: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct anon_5 { @@ -117,16 +63,7 @@ pub struct anon_5 { pub k: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(12)] pub struct anon_3 { @@ -140,16 +77,7 @@ pub struct anon_3 { pub anon_5: anon_5, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(44)] pub struct Outer { @@ -215,16 +143,7 @@ fn main_0() -> i32 { return 0; } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - 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 921e980c12..9d1ab67c4b 100644 --- a/tests/unit/out/refcount/anonymous-struct_c.rs +++ b/tests/unit/out/refcount/anonymous-struct_c.rs @@ -7,16 +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, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Named { @@ -26,16 +17,7 @@ pub struct Named { pub b: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct anon_0 { @@ -45,16 +27,7 @@ pub struct anon_0 { pub d: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct anon_1 { @@ -64,16 +37,7 @@ pub struct anon_1 { pub h: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct anon_2 { @@ -83,16 +47,7 @@ pub struct anon_2 { pub f: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct anon_4 { @@ -100,16 +55,7 @@ pub struct anon_4 { pub j: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct anon_5 { @@ -117,16 +63,7 @@ pub struct anon_5 { pub k: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(12)] pub struct anon_3 { @@ -140,16 +77,7 @@ pub struct anon_3 { pub anon_5: anon_5, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(44)] pub struct Outer { @@ -221,16 +149,7 @@ fn main_0() -> i32 { return 0; } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - 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 ef1717ec58..26ed8c8e5e 100644 --- a/tests/unit/out/refcount/anonymous_enum.rs +++ b/tests/unit/out/refcount/anonymous_enum.rs @@ -13,16 +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, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct S { @@ -36,16 +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, - 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 d1186dbcf0..dafdff28c1 100644 --- a/tests/unit/out/refcount/anonymous_enum_c.rs +++ b/tests/unit/out/refcount/anonymous_enum_c.rs @@ -13,16 +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, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct S { @@ -36,16 +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, - 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 a2df3aa89f..5270704b76 100644 --- a/tests/unit/out/refcount/any.rs +++ b/tests/unit/out/refcount/any.rs @@ -7,16 +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, - 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 a560c3fc15..2422bc4a53 100644 --- a/tests/unit/out/refcount/array_const_init.rs +++ b/tests/unit/out/refcount/array_const_init.rs @@ -6,7 +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, Copyable)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(20)] pub struct S { #[offset(0)] @@ -39,16 +39,7 @@ thread_local!( })); ); #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - 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 6b227c8f37..4786cf7a8d 100644 --- a/tests/unit/out/refcount/array_field_addr.rs +++ b/tests/unit/out/refcount/array_field_addr.rs @@ -6,7 +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, 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 4dce815b9a..722a013a49 100644 --- a/tests/unit/out/refcount/array_reference.rs +++ b/tests/unit/out/refcount/array_reference.rs @@ -60,16 +60,7 @@ pub fn pick_10(s: Ptr) -> Ptr { return (s).clone(); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - 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 38ecf0399f..a8fdec8e55 100644 --- a/tests/unit/out/refcount/as_const.rs +++ b/tests/unit/out/refcount/as_const.rs @@ -10,16 +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, - 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 8fa7ae2c2d..c332364203 100644 --- a/tests/unit/out/refcount/assign_rhs_first.rs +++ b/tests/unit/out/refcount/assign_rhs_first.rs @@ -16,7 +16,7 @@ pub fn advance_1() -> i32 { return 10; } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, 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 570bc5a4e4..48a44912bd 100644 --- a/tests/unit/out/refcount/assignment_single_eval.rs +++ b/tests/unit/out/refcount/assignment_single_eval.rs @@ -811,7 +811,7 @@ pub fn test_reference_members_9() { ); } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Slot_6 { @@ -820,7 +820,7 @@ pub struct Slot_6 { pub value: Ptr, } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Slot_8 { @@ -829,7 +829,7 @@ pub struct Slot_8 { pub value: Ptr, } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Slot_10 { @@ -896,7 +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, Copyable, Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Holder_12 { @@ -932,7 +932,7 @@ pub fn test_reference_pointer_13() { ); } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Node_14 { @@ -1031,16 +1031,7 @@ pub fn test_reference_subfields_18() { ); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Index_16 { @@ -1048,7 +1039,7 @@ pub struct Index_16 { pub value: u32, } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Slot_17 { @@ -1057,16 +1048,7 @@ pub struct Slot_17 { pub ref_: Ptr, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(2)] pub struct Index_19 { @@ -1074,7 +1056,7 @@ pub struct Index_19 { pub value: i16, } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Slot_20 { @@ -1118,16 +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, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct GlobalRecord_Inner { @@ -1135,16 +1108,7 @@ pub struct GlobalRecord_Inner { pub value: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct GlobalRecord { @@ -1387,16 +1351,7 @@ thread_local!( static flag_31: Value = Rc::new(RefCell::new(false)); ); #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Record_32 { @@ -1404,7 +1359,7 @@ pub struct Record_32 { pub value: i32, } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Link_33 { @@ -1417,16 +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, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct IndexedBinding {} @@ -1663,16 +1609,7 @@ thread_local!( ]))); ); #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(12)] pub struct IndexedMember { @@ -2035,7 +1972,7 @@ thread_local!( ]))); ); #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct PointerSelector { @@ -2259,16 +2196,7 @@ pub struct Counts_59 { pub counts: Vec, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Pair_60 { @@ -2581,23 +2509,14 @@ fn main_0() -> i32 { return 0; } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - 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, 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 13d8b24e3a..3de5649ccc 100644 --- a/tests/unit/out/refcount/bounded_struct_ptr.rs +++ b/tests/unit/out/refcount/bounded_struct_ptr.rs @@ -7,16 +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, - 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 3706c10845..8095021ce7 100644 --- a/tests/unit/out/refcount/bst.rs +++ b/tests/unit/out/refcount/bst.rs @@ -7,7 +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, 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 5eaa76cdbe..1101707966 100644 --- a/tests/unit/out/refcount/c_struct.rs +++ b/tests/unit/out/refcount/c_struct.rs @@ -7,16 +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, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Point { @@ -26,16 +17,7 @@ pub struct Point { pub y: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(16)] pub struct Line { @@ -47,7 +29,7 @@ pub struct Line { pub end: Point, } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(16)] pub struct Node { @@ -62,16 +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, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Inner { @@ -81,16 +54,7 @@ pub struct Inner { pub b: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - 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 78d63149bc..f753b4b78c 100644 --- a/tests/unit/out/refcount/cast.rs +++ b/tests/unit/out/refcount/cast.rs @@ -11,16 +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, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Pair { @@ -30,16 +21,7 @@ pub struct Pair { pub y: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(64)] #[byte_align(64)] @@ -47,7 +29,7 @@ pub struct Wide { #[offset(0)] pub c: i8, } -#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, 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 cd4f406bc9..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,7 +16,7 @@ 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, 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 e948e0bf4e..c0017c288d 100644 --- a/tests/unit/out/refcount/class.rs +++ b/tests/unit/out/refcount/class.rs @@ -7,16 +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, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Pair { @@ -26,16 +17,7 @@ pub struct Pair { pub second: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(16)] pub struct Route { @@ -46,16 +28,7 @@ pub struct Route { pub cost: f64, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Counter { @@ -70,16 +43,7 @@ impl CppEq for Counter { } } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - 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 60b36ae596..e5730e47cf 100644 --- a/tests/unit/out/refcount/class_template_lazy_member.rs +++ b/tests/unit/out/refcount/class_template_lazy_member.rs @@ -7,16 +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, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Point { @@ -24,16 +15,7 @@ pub struct Point { pub x: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Box_int_ { @@ -41,16 +23,7 @@ pub struct Box_int_ { pub val: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Box_Point_ { @@ -59,16 +32,7 @@ pub struct Box_Point_ { pub val: Point, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Deduced_int_ { @@ -76,16 +40,7 @@ pub struct Deduced_int_ { pub val: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - 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 de657fab55..1338a5d044 100644 --- a/tests/unit/out/refcount/class_templates.rs +++ b/tests/unit/out/refcount/class_templates.rs @@ -70,16 +70,7 @@ pub struct MyContainer_float_ { vec_: Vec, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(2)] pub struct Boxed_short_ { @@ -92,16 +83,7 @@ impl Boxed_short_ { } } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Boxed_int_ { @@ -114,16 +96,7 @@ impl Boxed_int_ { } } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Boxed_long_ { @@ -136,16 +109,7 @@ impl Boxed_long_ { } } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Outer_int__Inner_int_ { @@ -155,16 +119,7 @@ pub struct Outer_int__Inner_int_ { pub u: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Outer_int_ { @@ -172,16 +127,7 @@ pub struct Outer_int_ { pub v: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(16)] pub struct Outer_long__Inner_int_ { @@ -191,16 +137,7 @@ pub struct Outer_long__Inner_int_ { pub u: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(16)] pub struct Outer_long__Inner_char_ { @@ -210,16 +147,7 @@ pub struct Outer_long__Inner_char_ { pub u: i8, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Outer_long_ { @@ -227,16 +155,7 @@ pub struct Outer_long_ { pub v: i64, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - 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 aeb644242d..8ff26fa496 100644 --- a/tests/unit/out/refcount/clone_vs_move.rs +++ b/tests/unit/out/refcount/clone_vs_move.rs @@ -7,23 +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, - 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, Copyable)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(40)] pub struct Foo { #[offset(0)] @@ -56,7 +47,7 @@ impl Default for Foo { } } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, 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 ee89c19b30..01cfc91200 100644 --- a/tests/unit/out/refcount/comma_operator.rs +++ b/tests/unit/out/refcount/comma_operator.rs @@ -7,16 +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, - 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 dd96d702c7..17ef61eafd 100644 --- a/tests/unit/out/refcount/complex_function.rs +++ b/tests/unit/out/refcount/complex_function.rs @@ -16,16 +16,7 @@ pub fn bar_2(x: Ptr) -> Ptr { return (x).clone(); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct X1 { @@ -33,7 +24,7 @@ pub struct X1 { pub v: i32, } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct X2 { @@ -42,7 +33,7 @@ pub struct X2 { pub v: Ptr, } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct X3 { @@ -51,7 +42,7 @@ pub struct X3 { pub v: Ptr, } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, 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 8654df7d11..b044d3da66 100644 --- a/tests/unit/out/refcount/compound_assign_paren.rs +++ b/tests/unit/out/refcount/compound_assign_paren.rs @@ -7,16 +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, - 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 46439f3a75..3791914faf 100644 --- a/tests/unit/out/refcount/concepts.rs +++ b/tests/unit/out/refcount/concepts.rs @@ -12,16 +12,7 @@ const _: () = assert!( "sizeof(int) == 4" ); #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - 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 baebd31e6c..abcf1d334c 100644 --- a/tests/unit/out/refcount/constexpr_function.rs +++ b/tests/unit/out/refcount/constexpr_function.rs @@ -22,16 +22,7 @@ pub fn half_3(mut x: f64) -> f64 { return (x / 2_f64); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Flag { @@ -56,16 +47,7 @@ pub fn imm_7(mut b: bool) -> bool { return b; } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - 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 ee68f1df5d..e50d70586c 100644 --- a/tests/unit/out/refcount/constructor.rs +++ b/tests/unit/out/refcount/constructor.rs @@ -26,16 +26,7 @@ impl Destructible for S { } } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - CppFrom, - Destructible, - 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 78690ac1f7..d066554edb 100644 --- a/tests/unit/out/refcount/conversion_operator_same_translation.rs +++ b/tests/unit/out/refcount/conversion_operator_same_translation.rs @@ -15,8 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, CppFrom, - Destructible, - Copyable, + TriviallyCopyable, Default, )] #[cpp_into(i8, to_i8)] @@ -35,8 +34,7 @@ pub struct S { VaArg, FnPtrArg, CppFrom, - Destructible, - Copyable, + TriviallyCopyable, 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 164c191e2c..6c6dc58b73 100644 --- a/tests/unit/out/refcount/copy_move_defaulted.rs +++ b/tests/unit/out/refcount/copy_move_defaulted.rs @@ -7,16 +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, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Inner { @@ -45,7 +36,7 @@ impl Default for Explicit { { ::zero_init() } } } -#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, 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 10ee070fdd..9e96eabb62 100644 --- a/tests/unit/out/refcount/default.rs +++ b/tests/unit/out/refcount/default.rs @@ -6,7 +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, Copyable)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(144)] pub struct Pointers { #[offset(0)] @@ -43,7 +43,7 @@ impl Default for Pointers { } } } -#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(440)] pub struct SmallArrays { #[offset(0)] @@ -78,7 +78,7 @@ impl Default for SmallArrays { } } } -#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, 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 cff3390341..0f7ac66438 100644 --- a/tests/unit/out/refcount/default_function_arguments.rs +++ b/tests/unit/out/refcount/default_function_arguments.rs @@ -13,16 +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, - Copyable, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, CppFrom, TriviallyCopyable, )] #[cpp_from(i32, construct, value)] #[byte_size(4)] @@ -70,16 +61,7 @@ pub fn first_9(r: Ptr) -> i32 { return (elem!(r, 0).read()); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - 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 0c8459ddbd..abf994b3ed 100644 --- a/tests/unit/out/refcount/default_in_statics.rs +++ b/tests/unit/out/refcount/default_in_statics.rs @@ -7,7 +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, Copyable, Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(16)] pub struct Inner { @@ -17,7 +17,7 @@ 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, TriviallyCopyable)] #[byte_size(88)] pub struct Outer { #[offset(0)] @@ -64,7 +64,7 @@ impl Default for Outer { } } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, 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 b169f02173..50277ed6b3 100644 --- a/tests/unit/out/refcount/destructor_params.rs +++ b/tests/unit/out/refcount/destructor_params.rs @@ -34,16 +34,7 @@ pub fn with_default_3(s: S) -> i32 { return { (*s.borrow()).v }; } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - 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 2f8d9f12dc..63273e8129 100644 --- a/tests/unit/out/refcount/doubly_linked_list.rs +++ b/tests/unit/out/refcount/doubly_linked_list.rs @@ -7,7 +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, 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 0c83cd09dc..86f5e7d381 100644 --- a/tests/unit/out/refcount/enum_default_in_static.rs +++ b/tests/unit/out/refcount/enum_default_in_static.rs @@ -11,16 +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, - 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 65ea7203a7..829a40e61e 100644 --- a/tests/unit/out/refcount/enum_int_interop.rs +++ b/tests/unit/out/refcount/enum_int_interop.rs @@ -20,7 +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, 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 88326b8ab0..42305144b2 100644 --- a/tests/unit/out/refcount/enum_int_interop_c.rs +++ b/tests/unit/out/refcount/enum_int_interop_c.rs @@ -20,7 +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, 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 289812f810..44956ab035 100644 --- a/tests/unit/out/refcount/enum_underlying_type.rs +++ b/tests/unit/out/refcount/enum_underlying_type.rs @@ -25,9 +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, 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 fbd6ae2577..d032496993 100644 --- a/tests/unit/out/refcount/exprs.rs +++ b/tests/unit/out/refcount/exprs.rs @@ -7,16 +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, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct X { @@ -24,7 +15,7 @@ pub struct X { pub x: i32, } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, 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 d2b9250904..0c940fbdac 100644 --- a/tests/unit/out/refcount/fft.rs +++ b/tests/unit/out/refcount/fft.rs @@ -7,16 +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, - 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 76304864d6..f4137d0e56 100644 --- a/tests/unit/out/refcount/field_aliasing.rs +++ b/tests/unit/out/refcount/field_aliasing.rs @@ -7,16 +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, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct In { @@ -25,7 +16,7 @@ pub struct In { #[offset(4)] pub y: i32, } -#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(32)] pub struct S { #[offset(0)] @@ -53,7 +44,7 @@ impl Default for S { } } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, 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 ce1212d113..9127c29598 100644 --- a/tests/unit/out/refcount/field_array_elem_ptr.rs +++ b/tests/unit/out/refcount/field_array_elem_ptr.rs @@ -7,16 +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, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Point { @@ -25,7 +16,7 @@ pub struct Point { #[offset(4)] pub y: i32, } -#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, 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 b5ae071ba7..0a731aa1f2 100644 --- a/tests/unit/out/refcount/field_method_receiver.rs +++ b/tests/unit/out/refcount/field_method_receiver.rs @@ -7,16 +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, - 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 b4bc0a1afb..e028ee78ca 100644 --- a/tests/unit/out/refcount/field_pointers.rs +++ b/tests/unit/out/refcount/field_pointers.rs @@ -6,7 +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, Copyable)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(12)] pub struct Inner { #[offset(0)] @@ -27,16 +27,7 @@ impl Default for Inner { } } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - 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 7841b69904..4116a4be0d 100644 --- a/tests/unit/out/refcount/field_pointers_malloced_struct.rs +++ b/tests/unit/out/refcount/field_pointers_malloced_struct.rs @@ -7,16 +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, - 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 5118789f6b..63f42705c9 100644 --- a/tests/unit/out/refcount/field_reinterpret_write_through.rs +++ b/tests/unit/out/refcount/field_reinterpret_write_through.rs @@ -7,16 +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, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct In { @@ -25,7 +16,7 @@ pub struct In { #[offset(4)] pub b: i32, } -#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, 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 9ffe9bbeb8..6127f973e3 100644 --- a/tests/unit/out/refcount/find.rs +++ b/tests/unit/out/refcount/find.rs @@ -7,16 +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, - 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 856f139bd7..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,16 +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, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct In { @@ -26,16 +17,7 @@ pub struct In { pub b: i16, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - 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 195568f94f..5a666356f0 100644 --- a/tests/unit/out/refcount/first_member_downcast.rs +++ b/tests/unit/out/refcount/first_member_downcast.rs @@ -7,16 +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, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct base { @@ -24,16 +15,7 @@ pub struct base { pub kind: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - 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 f1cd55656c..ddbc62be30 100644 --- a/tests/unit/out/refcount/flex_array_member_incomplete.rs +++ b/tests/unit/out/refcount/flex_array_member_incomplete.rs @@ -6,7 +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, 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 fb2308cf26..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,7 +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, Copyable)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(8)] pub struct S { #[offset(0)] @@ -27,16 +27,7 @@ impl Default for S { } } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct E { @@ -45,7 +36,7 @@ pub struct E { #[offset(4)] pub w: i32, } -#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, 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 6d6f611ac4..701d0c6524 100644 --- a/tests/unit/out/refcount/fn_ptr.rs +++ b/tests/unit/out/refcount/fn_ptr.rs @@ -36,8 +36,7 @@ pub fn identity_hash_6(mut v: bool) -> usize { VaArg, FnPtrArg, CppFrom, - Destructible, - Copyable, + TriviallyCopyable, 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 4795535e3a..4dc050e5b3 100644 --- a/tests/unit/out/refcount/fn_ptr_cast.rs +++ b/tests/unit/out/refcount/fn_ptr_cast.rs @@ -25,7 +25,7 @@ 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, 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 fd8cbc9470..37e1c2b3b5 100644 --- a/tests/unit/out/refcount/fn_ptr_stable_sort.rs +++ b/tests/unit/out/refcount/fn_ptr_stable_sort.rs @@ -7,16 +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, - 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 5b5a84f3c8..a191b748ff 100644 --- a/tests/unit/out/refcount/fn_ptr_struct.rs +++ b/tests/unit/out/refcount/fn_ptr_struct.rs @@ -7,7 +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, Copyable, Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(16)] pub struct Handler { @@ -24,16 +24,7 @@ pub fn negate_1(mut x: i32) -> i32 { return -x; } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - 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 b8085c2601..c65724388e 100644 --- a/tests/unit/out/refcount/fn_ptr_typedef_cast.rs +++ b/tests/unit/out/refcount/fn_ptr_typedef_cast.rs @@ -19,16 +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, - 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 1e96ee5819..191b4b8b12 100644 --- a/tests/unit/out/refcount/fn_ptr_vtable.rs +++ b/tests/unit/out/refcount/fn_ptr_vtable.rs @@ -7,7 +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, 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 bc8234aaf6..cf5f330954 100644 --- a/tests/unit/out/refcount/fn_ref.rs +++ b/tests/unit/out/refcount/fn_ref.rs @@ -22,7 +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, 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 f7d2a25091..815a0be998 100644 --- a/tests/unit/out/refcount/friend.rs +++ b/tests/unit/out/refcount/friend.rs @@ -19,16 +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, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct V { @@ -44,16 +35,7 @@ pub fn get_4(w: Ptr) -> i32 { return w.with(|__s| __s.x); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct W_int_ { @@ -64,16 +46,7 @@ pub fn get_5(w: Ptr) -> i64 { return w.with(|__s| __s.x); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct W_long_ { @@ -81,16 +54,7 @@ pub struct W_long_ { pub x: i64, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - 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 b1ab134eb2..6cc0887eb8 100644 --- a/tests/unit/out/refcount/function_overloading.rs +++ b/tests/unit/out/refcount/function_overloading.rs @@ -22,16 +22,7 @@ pub fn bar_4(x: Ptr) -> i32 { return (x.read()); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - 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 3b8182691d..8a0fd53eb7 100644 --- a/tests/unit/out/refcount/global_call_temporaries.rs +++ b/tests/unit/out/refcount/global_call_temporaries.rs @@ -95,16 +95,7 @@ thread_local!( })); ); #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - 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 04c40e3b04..e93ba19d93 100644 --- a/tests/unit/out/refcount/global_init_side_effect.rs +++ b/tests/unit/out/refcount/global_init_side_effect.rs @@ -18,8 +18,7 @@ thread_local!( VaArg, FnPtrArg, CppFrom, - Destructible, - Copyable, + TriviallyCopyable, 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 5fcb3f2525..b9ca793e92 100644 --- a/tests/unit/out/refcount/global_non_const_init.rs +++ b/tests/unit/out/refcount/global_non_const_init.rs @@ -32,9 +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, Copyable, -)] +#[derive(Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(4)] pub struct Ctor { #[offset(0)] @@ -80,16 +78,7 @@ thread_local!( })); ); #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct Holder {} @@ -109,9 +98,7 @@ thread_local!( Rc::try_unwrap(__v).ok().unwrap().into_inner() })); ); -#[derive( - Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, 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 e6e5d870c6..7a522bc748 100644 --- a/tests/unit/out/refcount/global_pointers.rs +++ b/tests/unit/out/refcount/global_pointers.rs @@ -7,7 +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, 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 3a0b902f95..b2b979c7da 100644 --- a/tests/unit/out/refcount/global_without_initializer.rs +++ b/tests/unit/out/refcount/global_without_initializer.rs @@ -7,16 +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, - 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 1bd3ed041f..b8386b1071 100644 --- a/tests/unit/out/refcount/goto_aggregate_default.rs +++ b/tests/unit/out/refcount/goto_aggregate_default.rs @@ -7,16 +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, - 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 6c7b2e00f7..e367f14245 100644 --- a/tests/unit/out/refcount/goto_cleanup.rs +++ b/tests/unit/out/refcount/goto_cleanup.rs @@ -77,7 +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, 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 9e1598bcfd..3331ded53d 100644 --- a/tests/unit/out/refcount/huffman.rs +++ b/tests/unit/out/refcount/huffman.rs @@ -7,7 +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, 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 60f2c6aa0d..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,16 +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, - 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 9c871e8b49..a37982771b 100644 --- a/tests/unit/out/refcount/in_class_field_initializer.rs +++ b/tests/unit/out/refcount/in_class_field_initializer.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( - Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, -)] +#[derive(Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(8)] pub struct Inner { #[offset(0)] @@ -21,9 +19,7 @@ impl Default for Inner { { Inner { x: 3, y: 4 } } } } -#[derive( - Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, -)] +#[derive(Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(24)] pub struct S { #[offset(0)] @@ -49,9 +45,7 @@ impl Default for S { } } } -#[derive( - Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, 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 35e6480e8f..e0b31f7990 100644 --- a/tests/unit/out/refcount/init.rs +++ b/tests/unit/out/refcount/init.rs @@ -7,16 +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, - 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 97cc998466..10c1f8308c 100644 --- a/tests/unit/out/refcount/init_list.rs +++ b/tests/unit/out/refcount/init_list.rs @@ -10,16 +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, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Pair { @@ -28,9 +19,7 @@ pub struct Pair { #[offset(4)] pub b: i32, } -#[derive( - Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, -)] +#[derive(Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(8)] pub struct Holder { #[offset(0)] @@ -49,9 +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, 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/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/kruskal.rs b/tests/unit/out/refcount/kruskal.rs index 0ca288b4f0..abccf8af04 100644 --- a/tests/unit/out/refcount/kruskal.rs +++ b/tests/unit/out/refcount/kruskal.rs @@ -7,16 +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, - 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 498186efc2..b8e444244c 100644 --- a/tests/unit/out/refcount/lambda_as_field.rs +++ b/tests/unit/out/refcount/lambda_as_field.rs @@ -41,7 +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, 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)] @@ -65,7 +65,7 @@ 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, 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 708c81ee8f..03a59eddea 100644 --- a/tests/unit/out/refcount/lambda_capture_ref.rs +++ b/tests/unit/out/refcount/lambda_capture_ref.rs @@ -7,16 +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, - 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 5ac4e1d755..e17b5a6ada 100644 --- a/tests/unit/out/refcount/lambda_capture_star_this.rs +++ b/tests/unit/out/refcount/lambda_capture_star_this.rs @@ -7,16 +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, - 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 6dcc0d3a5d..70ec2ff7c7 100644 --- a/tests/unit/out/refcount/lambda_capture_this.rs +++ b/tests/unit/out/refcount/lambda_capture_this.rs @@ -7,16 +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, - 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 dd7ba0095a..ace3ed41d7 100644 --- a/tests/unit/out/refcount/lambda_capture_value.rs +++ b/tests/unit/out/refcount/lambda_capture_value.rs @@ -7,16 +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, - 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 caf6c587fe..d3eaefb6e1 100644 --- a/tests/unit/out/refcount/lambda_decltype_type.rs +++ b/tests/unit/out/refcount/lambda_decltype_type.rs @@ -6,7 +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, 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)] @@ -34,7 +34,7 @@ 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, 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 4bab369ba4..25f78269c9 100644 --- a/tests/unit/out/refcount/lambda_generic_explicit_args.rs +++ b/tests/unit/out/refcount/lambda_generic_explicit_args.rs @@ -7,16 +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, - 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 ddbfd8875f..37c42aa45d 100644 --- a/tests/unit/out/refcount/lambda_immediate_init.rs +++ b/tests/unit/out/refcount/lambda_immediate_init.rs @@ -9,9 +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, 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 86099a1d5d..c53b4e3e1d 100644 --- a/tests/unit/out/refcount/lambda_nested.rs +++ b/tests/unit/out/refcount/lambda_nested.rs @@ -7,16 +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, - 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 19e5be804d..b790203e59 100644 --- a/tests/unit/out/refcount/lambda_static_local.rs +++ b/tests/unit/out/refcount/lambda_static_local.rs @@ -79,16 +79,7 @@ thread_local!( static calls_3: Value = Rc::new(RefCell::new(0)); ); #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - 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 bc3a83536c..3023a29ddb 100644 --- a/tests/unit/out/refcount/libc_struct_without_default.rs +++ b/tests/unit/out/refcount/libc_struct_without_default.rs @@ -40,7 +40,7 @@ impl Default for UserDefined { } } } -#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, 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 ff42063ca8..aa9f18a58f 100644 --- a/tests/unit/out/refcount/linked_list.rs +++ b/tests/unit/out/refcount/linked_list.rs @@ -7,7 +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, 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 160a144651..227c717c4b 100644 --- a/tests/unit/out/refcount/local_anon_struct_collision.rs +++ b/tests/unit/out/refcount/local_anon_struct_collision.rs @@ -13,16 +13,7 @@ pub fn first_0() -> i32 { return (p.x + p.y); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct anon_1 { @@ -38,16 +29,7 @@ pub fn second_2() -> i32 { return ((q.a + q.b) as i32); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - 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 74cf1465ee..acee33e9c7 100644 --- a/tests/unit/out/refcount/local_record_template.rs +++ b/tests/unit/out/refcount/local_record_template.rs @@ -30,16 +30,7 @@ pub fn wrap_10(mut v: i64) -> i32 { return ({ get_6(l) }); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Local_5 { @@ -47,16 +38,7 @@ pub struct Local_5 { pub x: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Local_7 { @@ -68,16 +50,7 @@ pub fn other_11() -> i32 { return (({ get_0(l) }) + (l.y as i32)); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(16)] pub struct Local_1 { @@ -100,16 +73,7 @@ fn main_0() -> i32 { return 0; } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - 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 8e97472adc..ef7e401489 100644 --- a/tests/unit/out/refcount/map.rs +++ b/tests/unit/out/refcount/map.rs @@ -15,9 +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, Copyable, -)] +#[derive(Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(8)] pub struct Point { #[offset(0)] @@ -678,7 +676,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 +703,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 +730,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_key_identity.rs b/tests/unit/out/refcount/map_key_identity.rs index 0ec9a86cb1..b717fbb0ae 100644 --- a/tests/unit/out/refcount/map_key_identity.rs +++ b/tests/unit/out/refcount/map_key_identity.rs @@ -10,16 +10,7 @@ thread_local!( pub static default_constructions_0: Value = Rc::new(RefCell::new(0)); ); #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Key { @@ -44,9 +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, 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 91b4c07264..57cef67ecb 100644 --- a/tests/unit/out/refcount/map_try_emplace.rs +++ b/tests/unit/out/refcount/map_try_emplace.rs @@ -74,9 +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, Copyable, -)] +#[derive(Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(4)] pub struct RefItem { #[offset(0)] @@ -136,7 +134,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()))), ) }, @@ -233,7 +233,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()) ))) }, ); ( @@ -259,7 +259,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()) ))) }, ); ( @@ -354,7 +354,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 }); @@ -389,7 +389,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(), { @@ -430,7 +430,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(), { @@ -470,7 +470,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(), { @@ -512,7 +512,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(), { @@ -551,7 +551,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 }); @@ -573,7 +573,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() }, { @@ -606,7 +606,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() }, { @@ -670,7 +670,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(), { @@ -716,7 +716,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 8b0d8eb496..5b5b80cc68 100644 --- a/tests/unit/out/refcount/map_try_emplace_lvalues.rs +++ b/tests/unit/out/refcount/map_try_emplace_lvalues.rs @@ -12,9 +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, Copyable, -)] +#[derive(Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(4)] pub struct Item { #[offset(0)] @@ -44,7 +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, Copyable)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(12)] pub struct Temporary { #[offset(0)] @@ -66,7 +64,7 @@ impl Default for Temporary { } } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(12)] pub struct Nested { @@ -119,7 +117,7 @@ impl Default for Noncopy { } } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, CppFrom, Destructible, Copyable, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, CppFrom, TriviallyCopyable, )] #[cpp_from(i32, construct_1, ptr)] #[byte_size(8)] @@ -180,7 +178,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()))), ) }, @@ -222,9 +222,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()))), ) }, @@ -262,7 +262,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()))), ) }, @@ -337,7 +339,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 }); @@ -365,7 +367,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 }); @@ -403,7 +405,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 }); @@ -438,7 +440,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 }); @@ -474,7 +476,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 }); @@ -519,7 +521,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 }); @@ -550,7 +552,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 }); @@ -581,7 +583,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 }); @@ -620,7 +622,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 }); @@ -661,7 +663,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 }); @@ -688,7 +690,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 }); @@ -720,7 +722,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()))), ) }); @@ -760,7 +762,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))), ) }); @@ -804,7 +806,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()))), ) }); @@ -847,7 +849,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()))), ) }); @@ -887,7 +889,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()))), ) }); @@ -948,7 +950,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()))), ) }); @@ -975,7 +979,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()))), ) }); @@ -1002,7 +1008,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()))), ) }); @@ -1029,7 +1037,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()))), ) }); @@ -1055,7 +1065,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()))), ) }); @@ -1081,7 +1093,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()))), ) }); @@ -1189,9 +1203,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()), @@ -1242,9 +1256,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()), @@ -1295,9 +1309,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()), @@ -1442,7 +1456,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()))), ) }); @@ -1469,7 +1485,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()))), ) }); @@ -1497,7 +1515,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()))), ) }); @@ -1554,7 +1574,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())); @@ -1603,9 +1625,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()), @@ -1659,7 +1681,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())); @@ -1709,9 +1733,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()), @@ -1798,7 +1822,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()))), ) }); @@ -1835,7 +1861,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()))), ) }); @@ -1870,7 +1898,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()))), ) }); @@ -1904,7 +1934,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()))), ) }); @@ -1938,7 +1970,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()))), ) }); @@ -1975,7 +2009,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()))), ) }); @@ -2027,7 +2063,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())); @@ -2091,9 +2129,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()), @@ -2159,9 +2197,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()), @@ -2231,7 +2269,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 @@ -2269,7 +2307,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 @@ -2320,7 +2358,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); @@ -2346,7 +2384,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])), )), @@ -2381,7 +2419,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/memcpy_struct_bytes.rs b/tests/unit/out/refcount/memcpy_struct_bytes.rs index 91d682ee59..e473748993 100644 --- a/tests/unit/out/refcount/memcpy_struct_bytes.rs +++ b/tests/unit/out/refcount/memcpy_struct_bytes.rs @@ -7,16 +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, - 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 7775a6e873..847ea58c9a 100644 --- a/tests/unit/out/refcount/memcpy_struct_layouts.rs +++ b/tests/unit/out/refcount/memcpy_struct_layouts.rs @@ -7,16 +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, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct packed { @@ -30,16 +21,7 @@ pub struct packed { pub d: i16, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(12)] pub struct reordered { @@ -51,16 +33,7 @@ pub struct reordered { pub c: i8, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(16)] pub struct tail { @@ -70,16 +43,7 @@ pub struct tail { pub b: f64, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(24)] pub struct nested { @@ -89,7 +53,7 @@ pub struct nested { #[offset(16)] pub c: i8, } -#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, 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 830e7b3bbb..d85880c2b9 100644 --- a/tests/unit/out/refcount/memcpy_struct_struct.rs +++ b/tests/unit/out/refcount/memcpy_struct_struct.rs @@ -7,16 +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, - 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 f153f64372..f035b8b1dc 100644 --- a/tests/unit/out/refcount/memset_struct_tail.rs +++ b/tests/unit/out/refcount/memset_struct_tail.rs @@ -6,7 +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, 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 0a458a2036..9be477ba18 100644 --- a/tests/unit/out/refcount/nested_structs.rs +++ b/tests/unit/out/refcount/nested_structs.rs @@ -7,16 +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, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Level0_Level1_1_Level2_1_Level3_1 { @@ -24,16 +15,7 @@ pub struct Level0_Level1_1_Level2_1_Level3_1 { pub x1: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Level0_Level1_1_Level2_1_Level3_2 { @@ -43,16 +25,7 @@ pub struct Level0_Level1_1_Level2_1_Level3_2 { pub x2: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Level0_Level1_1_Level2_1 { @@ -60,16 +33,7 @@ pub struct Level0_Level1_1_Level2_1 { pub x1: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Level0_Level1_1 { @@ -77,16 +41,7 @@ pub struct Level0_Level1_1 { pub x1: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Level0_Level1_2 { @@ -96,16 +51,7 @@ pub struct Level0_Level1_2 { pub x2: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - 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 221cae51ee..9565136037 100644 --- a/tests/unit/out/refcount/new.rs +++ b/tests/unit/out/refcount/new.rs @@ -7,16 +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, - 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 858cab58f3..6ceb595ab8 100644 --- a/tests/unit/out/refcount/new_bst.rs +++ b/tests/unit/out/refcount/new_bst.rs @@ -7,7 +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, 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 4cc30a0eb4..ff32f5d11a 100644 --- a/tests/unit/out/refcount/new_struct.rs +++ b/tests/unit/out/refcount/new_struct.rs @@ -7,16 +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, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Pair { @@ -26,16 +17,7 @@ pub struct Pair { pub y: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - 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 b5dc29044c..4534577fd0 100644 --- a/tests/unit/out/refcount/nttp_distinct_specializations.rs +++ b/tests/unit/out/refcount/nttp_distinct_specializations.rs @@ -7,16 +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, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct S_2_ { @@ -26,16 +17,7 @@ pub struct S_2_ { pub w: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct S_1_ { @@ -43,16 +25,7 @@ pub struct S_1_ { pub v: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - 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 36994ff6b2..c5ef2ed022 100644 --- a/tests/unit/out/refcount/offsetof.rs +++ b/tests/unit/out/refcount/offsetof.rs @@ -7,16 +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, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(12)] pub struct Layout { @@ -27,7 +18,7 @@ pub struct Layout { #[offset(8)] pub c: u16, } -#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, 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 8cf372314e..69f6fbb662 100644 --- a/tests/unit/out/refcount/opaque_forward_decl.rs +++ b/tests/unit/out/refcount/opaque_forward_decl.rs @@ -7,7 +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, 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 895fb5a3d3..51bc05f6ab 100644 --- a/tests/unit/out/refcount/opaque_record_copy.rs +++ b/tests/unit/out/refcount/opaque_record_copy.rs @@ -7,30 +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, - 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, - 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 2431b3fa76..663c006b0b 100644 --- a/tests/unit/out/refcount/opaque_then_defined.rs +++ b/tests/unit/out/refcount/opaque_then_defined.rs @@ -7,7 +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, Copyable, Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(16)] pub struct list { @@ -18,7 +18,7 @@ pub struct list { pub size: i32, } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, 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 0e6fc29041..54150ce7d4 100644 --- a/tests/unit/out/refcount/operator_arithmetic_free.rs +++ b/tests/unit/out/refcount/operator_arithmetic_free.rs @@ -7,16 +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, - 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 e6cfbe1295..7b57426f42 100644 --- a/tests/unit/out/refcount/operator_arithmetic_member.rs +++ b/tests/unit/out/refcount/operator_arithmetic_member.rs @@ -7,16 +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, - 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 6e924fec5e..25087efa40 100644 --- a/tests/unit/out/refcount/operator_bitwise_free.rs +++ b/tests/unit/out/refcount/operator_bitwise_free.rs @@ -7,16 +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, - 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 87bf27bf14..f4b723a73e 100644 --- a/tests/unit/out/refcount/operator_bitwise_member.rs +++ b/tests/unit/out/refcount/operator_bitwise_member.rs @@ -7,16 +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, - 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 24c07de6a9..1d684c95c8 100644 --- a/tests/unit/out/refcount/operator_comparison_defaulted.rs +++ b/tests/unit/out/refcount/operator_comparison_defaulted.rs @@ -7,16 +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, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Eq { @@ -31,16 +22,7 @@ impl CppEq for Eq { } } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Cmp { @@ -60,16 +42,7 @@ impl CppEq for Cmp { } } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Both { @@ -87,16 +60,7 @@ impl CppEq for Both { } } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct OrdOnly { @@ -114,16 +78,7 @@ impl CppEq for OrdOnly { } } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Inner { @@ -141,16 +96,7 @@ impl CppEq for Inner { } } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Outer { @@ -171,16 +117,7 @@ impl CppEq for Outer { } } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Secondary { @@ -198,7 +135,7 @@ impl CppEq for Secondary { } } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, 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 f71a6e8aee..8fc0a8ac09 100644 --- a/tests/unit/out/refcount/operator_comparison_free.rs +++ b/tests/unit/out/refcount/operator_comparison_free.rs @@ -7,16 +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, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct S { @@ -58,16 +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, - 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 05666dc49e..f9742e1b8d 100644 --- a/tests/unit/out/refcount/operator_comparison_member.rs +++ b/tests/unit/out/refcount/operator_comparison_member.rs @@ -7,16 +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, - 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 471115e727..4ef2c1a398 100644 --- a/tests/unit/out/refcount/operator_comparison_mixed.rs +++ b/tests/unit/out/refcount/operator_comparison_mixed.rs @@ -7,16 +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, - 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 3ce340e94a..0327803602 100644 --- a/tests/unit/out/refcount/operator_comparison_nonbool.rs +++ b/tests/unit/out/refcount/operator_comparison_nonbool.rs @@ -7,16 +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, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct X { @@ -52,16 +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, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Result { @@ -69,16 +51,7 @@ pub struct Result { pub r: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Custom { @@ -86,16 +59,7 @@ pub struct Custom { pub v: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Mixed { @@ -121,8 +85,7 @@ impl CppEq for Mixed { VaArg, FnPtrArg, CppFrom, - Destructible, - Copyable, + TriviallyCopyable, Default, )] #[cpp_into(bool, to_bool)] @@ -132,16 +95,7 @@ pub struct MyBool { pub value: bool, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Boolish { @@ -193,16 +147,7 @@ thread_local!( })); ); #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - 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 56b85f7015..34d5b53645 100644 --- a/tests/unit/out/refcount/operator_compound_assignment_free.rs +++ b/tests/unit/out/refcount/operator_compound_assignment_free.rs @@ -7,16 +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, - 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 2617630e38..030449d785 100644 --- a/tests/unit/out/refcount/operator_compound_assignment_member.rs +++ b/tests/unit/out/refcount/operator_compound_assignment_member.rs @@ -7,16 +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, - 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 c39d0b434a..1d05674604 100644 --- a/tests/unit/out/refcount/operator_friend.rs +++ b/tests/unit/out/refcount/operator_friend.rs @@ -11,16 +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, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Defaulted { @@ -50,16 +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, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct DefaultedOrd { @@ -88,16 +70,7 @@ pub fn operator_add_5(x: Ptr, y: Ptr) -> Inline { }; } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Inline { @@ -115,16 +88,7 @@ impl CppEq for Inline { } } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct OutOfLine { @@ -152,16 +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, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Tmpl_int_ { @@ -179,16 +134,7 @@ impl CppEq for Tmpl_int_ { } } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Tmpl_long_ { @@ -199,16 +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, - 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 5eeef3d0d0..6ed2c5b32a 100644 --- a/tests/unit/out/refcount/operator_less_than.rs +++ b/tests/unit/out/refcount/operator_less_than.rs @@ -7,16 +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, - 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 48c1b5c6bc..86afec9078 100644 --- a/tests/unit/out/refcount/operator_logical_free.rs +++ b/tests/unit/out/refcount/operator_logical_free.rs @@ -7,16 +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, - 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 5345dbd5f5..e14b6cdbeb 100644 --- a/tests/unit/out/refcount/operator_logical_member.rs +++ b/tests/unit/out/refcount/operator_logical_member.rs @@ -7,16 +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, - 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 2c66cb5afb..e99e28946e 100644 --- a/tests/unit/out/refcount/operator_member_pointer_free.rs +++ b/tests/unit/out/refcount/operator_member_pointer_free.rs @@ -7,23 +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, - 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, 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 86d4510d24..74ac91c329 100644 --- a/tests/unit/out/refcount/operator_member_pointer_member.rs +++ b/tests/unit/out/refcount/operator_member_pointer_member.rs @@ -7,16 +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, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Inner { @@ -24,16 +15,7 @@ pub struct Inner { pub x: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct Table {} @@ -45,7 +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, 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 409ab783e2..dc4a505226 100644 --- a/tests/unit/out/refcount/operator_other_free.rs +++ b/tests/unit/out/refcount/operator_other_free.rs @@ -7,16 +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, - 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 6fcd805ee8..8622fd65b6 100644 --- a/tests/unit/out/refcount/operator_other_member.rs +++ b/tests/unit/out/refcount/operator_other_member.rs @@ -7,16 +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, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct Static {} @@ -34,8 +25,7 @@ impl Static { VaArg, FnPtrArg, CppFrom, - Destructible, - Copyable, + TriviallyCopyable, 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 8846356ec0..7e97765d20 100644 --- a/tests/unit/out/refcount/operator_overloads.rs +++ b/tests/unit/out/refcount/operator_overloads.rs @@ -7,16 +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, - 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 1f63235bb0..25080aa83f 100644 --- a/tests/unit/out/refcount/operator_qualifiers.rs +++ b/tests/unit/out/refcount/operator_qualifiers.rs @@ -7,16 +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, - 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 1483c52297..53c88f7262 100644 --- a/tests/unit/out/refcount/operator_three_way.rs +++ b/tests/unit/out/refcount/operator_three_way.rs @@ -7,16 +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, - 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 6ad9644827..61480deea5 100644 --- a/tests/unit/out/refcount/operator_traits.rs +++ b/tests/unit/out/refcount/operator_traits.rs @@ -7,16 +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, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Lt { @@ -34,16 +25,7 @@ impl CppEq for Lt { } } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Eq { @@ -56,16 +38,7 @@ impl CppEq for Eq { } } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Cmp { @@ -83,16 +56,7 @@ impl CppEq for Cmp { } } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Free { @@ -116,16 +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, - 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 8d5fc58c8d..f4c4bca522 100644 --- a/tests/unit/out/refcount/overload_mangling.rs +++ b/tests/unit/out/refcount/overload_mangling.rs @@ -20,30 +20,12 @@ pub fn twice_2(mut n: i32) -> i32 { return (n * 2); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - 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, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct S { @@ -51,16 +33,7 @@ pub struct S { pub base: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - 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 2024ff7b28..d9be805f1e 100644 --- a/tests/unit/out/refcount/pair_converting_construction.rs +++ b/tests/unit/out/refcount/pair_converting_construction.rs @@ -15,8 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, CppFrom, - Destructible, - Copyable, + TriviallyCopyable, Default, )] #[cpp_from(i32, construct, value)] @@ -34,8 +33,7 @@ pub struct Celsius { VaArg, FnPtrArg, CppFrom, - Destructible, - Copyable, + TriviallyCopyable, Default, )] #[cpp_into(i32, to_i32)] @@ -53,8 +51,7 @@ pub struct Meters { VaArg, FnPtrArg, CppFrom, - Destructible, - Copyable, + TriviallyCopyable, Default, )] #[cpp_from(Celsius, construct, ptr)] @@ -72,8 +69,7 @@ pub struct Label { VaArg, FnPtrArg, CppFrom, - Destructible, - Copyable, + TriviallyCopyable, Default, )] #[cpp_from(Celsius, construct_1, ptr)] @@ -94,8 +90,7 @@ pub struct Owner { VaArg, FnPtrArg, CppFrom, - Destructible, - Copyable, + TriviallyCopyable, Default, )] #[cpp_from(Celsius, construct, value)] @@ -105,16 +100,7 @@ pub struct Holder { pub value: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - CppFrom, - Destructible, - Copyable, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, CppFrom, TriviallyCopyable, )] #[cpp_from(i32, construct, value)] #[byte_size(4)] @@ -134,16 +120,7 @@ impl Default for Fallback { } } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Counter { @@ -159,8 +136,7 @@ pub struct Counter { VaArg, FnPtrArg, CppFrom, - Destructible, - Copyable, + TriviallyCopyable, Default, )] #[cpp_from(Counter, construct, mut_ptr)] @@ -178,8 +154,7 @@ pub struct Observer { VaArg, FnPtrArg, CppFrom, - Destructible, - Copyable, + TriviallyCopyable, Default, )] #[cpp_from(Celsius, construct, ptr)] @@ -197,8 +172,7 @@ pub struct Tag { VaArg, FnPtrArg, CppFrom, - Destructible, - Copyable, + TriviallyCopyable, Default, )] #[cpp_from(Ptr< i8 > , construct, value)] diff --git a/tests/unit/out/refcount/pod.rs b/tests/unit/out/refcount/pod.rs index 93604057df..63da4a0c34 100644 --- a/tests/unit/out/refcount/pod.rs +++ b/tests/unit/out/refcount/pod.rs @@ -7,16 +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, - 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 5a6f756a60..ece5f0abce 100644 --- a/tests/unit/out/refcount/pointer_array.rs +++ b/tests/unit/out/refcount/pointer_array.rs @@ -6,7 +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, 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 00b9e937ac..88962e5de8 100644 --- a/tests/unit/out/refcount/pointers.rs +++ b/tests/unit/out/refcount/pointers.rs @@ -7,16 +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, - 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 73cfebcf5f..efd5f6ae43 100644 --- a/tests/unit/out/refcount/ptr_cast_init.rs +++ b/tests/unit/out/refcount/ptr_cast_init.rs @@ -7,16 +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, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct header { @@ -26,16 +17,7 @@ pub struct header { pub size: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - 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 0c7f4806cd..39dad18550 100644 --- a/tests/unit/out/refcount/push_emplace_back.rs +++ b/tests/unit/out/refcount/push_emplace_back.rs @@ -7,16 +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, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Chunk { @@ -24,7 +15,7 @@ pub struct Chunk { pub data: i32, } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(16)] pub struct Writer { @@ -134,16 +125,7 @@ pub fn self_ref_push_6(mut comps: Ptr>) { }; } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - CppFrom, - Destructible, - Copyable, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, CppFrom, TriviallyCopyable, )] #[cpp_from(i32, construct_1, value)] #[byte_size(8)] @@ -365,7 +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, Copyable)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(24)] pub struct Plain { #[offset(0)] @@ -399,16 +381,7 @@ thread_local!( Rc::new(RefCell::new(Ptr::>::null())); ); #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - 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 2ffcd7de94..93ae6f283a 100644 --- a/tests/unit/out/refcount/random.rs +++ b/tests/unit/out/refcount/random.rs @@ -6,7 +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, Copyable)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(72)] pub struct Pair { #[offset(0)] @@ -52,16 +52,7 @@ pub fn zero_0() -> i32 { return 0; } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - 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 a04c1d154d..65381cce47 100644 --- a/tests/unit/out/refcount/reference_wrapper.rs +++ b/tests/unit/out/refcount/reference_wrapper.rs @@ -7,16 +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, - 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 6ff278f0e7..c51ad1dbe1 100644 --- a/tests/unit/out/refcount/references.rs +++ b/tests/unit/out/refcount/references.rs @@ -6,7 +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, Copyable)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(16)] pub struct Pair { #[offset(0)] @@ -30,7 +30,7 @@ impl Default for Pair { } } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, 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 b2dfbc5d6a..8f7383be46 100644 --- a/tests/unit/out/refcount/refs_as_args.rs +++ b/tests/unit/out/refcount/refs_as_args.rs @@ -31,16 +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, - 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 efe2391dbf..e777777307 100644 --- a/tests/unit/out/refcount/reinterpret_cast_ptr_cmp.rs +++ b/tests/unit/out/refcount/reinterpret_cast_ptr_cmp.rs @@ -7,16 +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, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct S { @@ -25,7 +16,7 @@ pub struct S { #[offset(4)] pub y: i32, } -#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(28)] pub struct W { #[offset(0)] @@ -45,7 +36,7 @@ impl Default for W { } } } -#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, 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 9d25cc866c..a0c237aba6 100644 --- a/tests/unit/out/refcount/reinterpret_cast_struct.rs +++ b/tests/unit/out/refcount/reinterpret_cast_struct.rs @@ -7,16 +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, - 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 2e5f87afc4..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,16 +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, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Point { @@ -26,16 +17,7 @@ pub struct Point { pub y: u32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - 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 fcc83ace8d..61a59e4e1f 100644 --- a/tests/unit/out/refcount/reserved_keywords.rs +++ b/tests/unit/out/refcount/reserved_keywords.rs @@ -7,16 +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, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(152)] pub struct S { @@ -98,16 +89,7 @@ pub struct S { pub vec_: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct type_ { @@ -115,16 +97,7 @@ pub struct type_ { pub v: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - 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 6efac38e6b..c1b76be829 100644 --- a/tests/unit/out/refcount/return_move.rs +++ b/tests/unit/out/refcount/return_move.rs @@ -7,7 +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, Copyable, Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(16)] pub struct node { @@ -18,7 +18,7 @@ pub struct node { pub next: Ptr, } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, 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 411b2fa2f9..7815aa553a 100644 --- a/tests/unit/out/refcount/rvalue_struct.rs +++ b/tests/unit/out/refcount/rvalue_struct.rs @@ -7,16 +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, - 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 ed4aea1f54..67b99a300a 100644 --- a/tests/unit/out/refcount/scalar_builtin_construct_destruct.rs +++ b/tests/unit/out/refcount/scalar_builtin_construct_destruct.rs @@ -7,16 +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, - 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 1d66d96e9a..cc26e02cc3 100644 --- a/tests/unit/out/refcount/self_referencing_initializer.rs +++ b/tests/unit/out/refcount/self_referencing_initializer.rs @@ -7,7 +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, Copyable, Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct list_head { @@ -16,7 +16,7 @@ pub struct list_head { pub next: Ptr, } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(16)] pub struct node { @@ -26,7 +26,7 @@ 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, TriviallyCopyable)] #[byte_size(16)] pub struct node_with_defaults { #[offset(0)] 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/size_t_static_member.rs b/tests/unit/out/refcount/size_t_static_member.rs index 770ab41197..38685d971b 100644 --- a/tests/unit/out/refcount/size_t_static_member.rs +++ b/tests/unit/out/refcount/size_t_static_member.rs @@ -10,16 +10,7 @@ thread_local!( pub static c_0: Value = Rc::new(RefCell::new(5_usize)); ); #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct S {} @@ -27,16 +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, - 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 a4ba0a95ed..44017a11ce 100644 --- a/tests/unit/out/refcount/size_t_template_param.rs +++ b/tests/unit/out/refcount/size_t_template_param.rs @@ -19,8 +19,7 @@ pub fn array_ref_0(a: Ptr) -> u64 { VaArg, FnPtrArg, CppFrom, - Destructible, - Copyable, + TriviallyCopyable, Default, )] #[cpp_from(Ptr< u64 > , construct, value)] @@ -38,8 +37,7 @@ pub struct PtrCtor_unsigned_long_ { VaArg, FnPtrArg, CppFrom, - Destructible, - Copyable, + TriviallyCopyable, 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 3ed175144e..24ae2dfc21 100644 --- a/tests/unit/out/refcount/static_local.rs +++ b/tests/unit/out/refcount/static_local.rs @@ -34,16 +34,7 @@ thread_local!( static x_7: Value = Rc::new(RefCell::new(3)); ); #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - 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 8d391a6b1b..35e90123f8 100644 --- a/tests/unit/out/refcount/static_var_in_class.rs +++ b/tests/unit/out/refcount/static_var_in_class.rs @@ -10,16 +10,7 @@ thread_local!( static inner_const_0: Value = Rc::new(RefCell::new(1)); ); #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct C {} @@ -29,16 +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, - 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 6d528d4b26..b432be3106 100644 --- a/tests/unit/out/refcount/stdcopy.rs +++ b/tests/unit/out/refcount/stdcopy.rs @@ -15,8 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, CppFrom, - Destructible, - Copyable, + TriviallyCopyable, Default, )] #[cpp_from(i32, construct, value)] diff --git a/tests/unit/out/refcount/strdup.rs b/tests/unit/out/refcount/strdup.rs index 9b7f36ba1c..8e26d342dc 100644 --- a/tests/unit/out/refcount/strdup.rs +++ b/tests/unit/out/refcount/strdup.rs @@ -7,7 +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, 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 a9db369bff..207c5f0207 100644 --- a/tests/unit/out/refcount/string_literal_ptr_init.rs +++ b/tests/unit/out/refcount/string_literal_ptr_init.rs @@ -7,7 +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, 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 9654157b5f..fd214114c0 100644 --- a/tests/unit/out/refcount/string_substr.rs +++ b/tests/unit/out/refcount/string_substr.rs @@ -7,7 +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, 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 8d55fa4e4c..006d428772 100644 --- a/tests/unit/out/refcount/struct_2d_array_field.rs +++ b/tests/unit/out/refcount/struct_2d_array_field.rs @@ -6,7 +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, 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 5c43658f37..3d98fc2e88 100644 --- a/tests/unit/out/refcount/struct_ctor.rs +++ b/tests/unit/out/refcount/struct_ctor.rs @@ -7,16 +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, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct StructWithCtor { @@ -37,8 +28,7 @@ pub fn foo_0(x: Ptr) -> Ptr { VaArg, FnPtrArg, CppFrom, - Destructible, - Copyable, + TriviallyCopyable, Default, )] #[cpp_from(i32, construct, value)] @@ -47,9 +37,7 @@ pub struct Value_ { #[offset(0)] pub v: i32, } -#[derive( - Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, 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 86fbc7a211..4f8707f78a 100644 --- a/tests/unit/out/refcount/struct_default_ctor.rs +++ b/tests/unit/out/refcount/struct_default_ctor.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( - Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, -)] +#[derive(Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(8)] pub struct S { #[offset(0)] @@ -28,23 +26,14 @@ impl Default for S { } } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - 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, Copyable)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(16)] pub struct Holder { #[offset(0)] @@ -64,9 +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, 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 0f42dbdec4..51904107ec 100644 --- a/tests/unit/out/refcount/struct_member_array_adjacency.rs +++ b/tests/unit/out/refcount/struct_member_array_adjacency.rs @@ -6,7 +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, 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 645a01d1e2..720a2e9fc5 100644 --- a/tests/unit/out/refcount/struct_ptr.rs +++ b/tests/unit/out/refcount/struct_ptr.rs @@ -7,16 +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, - 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 7569d20585..acd97c4bfe 100644 --- a/tests/unit/out/refcount/structured_binding_range_for.rs +++ b/tests/unit/out/refcount/structured_binding_range_for.rs @@ -7,16 +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, - 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 6e61003ae0..9f79ef66d1 100644 --- a/tests/unit/out/refcount/structured_binding_ref.rs +++ b/tests/unit/out/refcount/structured_binding_ref.rs @@ -7,16 +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, - 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 49f6ed7177..7214c5278d 100644 --- a/tests/unit/out/refcount/structured_binding_trivial.rs +++ b/tests/unit/out/refcount/structured_binding_trivial.rs @@ -7,16 +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, - 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 626a554da7..2db918945d 100644 --- a/tests/unit/out/refcount/tag_vs_identifier_collision.rs +++ b/tests/unit/out/refcount/tag_vs_identifier_collision.rs @@ -11,16 +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, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct widget { @@ -30,16 +21,7 @@ pub struct widget { pub mode: widget_enum, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct point_struct { @@ -48,7 +30,7 @@ pub struct point_struct { #[offset(4)] pub y: i32, } -#[derive(VaArg, FnPtrArg, Destructible, Copyable, ByteRepr, Clone, ZeroInitialization)] +#[derive(VaArg, FnPtrArg, TriviallyCopyable, ByteRepr, Clone, ZeroInitialization)] #[byte_size(4)] pub struct point { #[offset(0)] @@ -71,7 +53,7 @@ impl Default for point { } } } -#[derive(VaArg, FnPtrArg, Destructible, Copyable, ByteRepr, Clone, ZeroInitialization)] +#[derive(VaArg, FnPtrArg, TriviallyCopyable, ByteRepr, Clone, ZeroInitialization)] #[byte_size(4)] pub struct slot_union { #[offset(0)] @@ -98,16 +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, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Inner { @@ -115,16 +88,7 @@ pub struct Inner { pub tag_field: i32, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct Outer { @@ -133,16 +97,7 @@ pub struct Outer { pub field: Inner, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - 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 30b1ab8560..9f7312a0c9 100644 --- a/tests/unit/out/refcount/template_default_arg.rs +++ b/tests/unit/out/refcount/template_default_arg.rs @@ -7,16 +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, - Copyable, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, CppFrom, TriviallyCopyable, )] #[cpp_from(i32, construct_1, value)] #[byte_size(4)] @@ -35,9 +26,7 @@ impl Default for A { } } } -#[derive( - Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, -)] +#[derive(Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(4)] pub struct B { #[offset(0)] @@ -63,8 +52,7 @@ impl Default for B { VaArg, FnPtrArg, CppFrom, - Destructible, - Copyable, + TriviallyCopyable, Default, )] #[cpp_from(i32, construct, value)] @@ -94,8 +82,7 @@ pub fn always_given_3(mut x: NoDefault) -> i32 { VaArg, FnPtrArg, CppFrom, - Destructible, - Copyable, + TriviallyCopyable, 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 94e9f890ae..b97e23a677 100644 --- a/tests/unit/out/refcount/template_static_member.rs +++ b/tests/unit/out/refcount/template_static_member.rs @@ -10,16 +10,7 @@ thread_local!( pub static s_0: Value = Rc::new(RefCell::new(55)); ); #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct Static_int_ {} @@ -27,16 +18,7 @@ thread_local!( pub static s_1: Value = Rc::new(RefCell::new(55_i8)); ); #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct Static_char_ {} @@ -44,16 +26,7 @@ thread_local!( pub static s_2: Value = Rc::new(RefCell::new(55_i64)); ); #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct Static_long_ {} @@ -64,16 +37,7 @@ thread_local!( pub static hi_4: Value = Rc::new(RefCell::new(1)); ); #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(1)] pub struct Range_int_ {} @@ -84,16 +48,7 @@ thread_local!( pub static hi_6: Value = Rc::new(RefCell::new(2_i64)); ); #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - 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 fcc400eb16..7350b3db78 100644 --- a/tests/unit/out/refcount/temporary_field_ctor_arg.rs +++ b/tests/unit/out/refcount/temporary_field_ctor_arg.rs @@ -41,8 +41,7 @@ pub fn make_0() -> Outer { VaArg, FnPtrArg, CppFrom, - Destructible, - Copyable, + TriviallyCopyable, Default, )] #[cpp_from(Vec , construct, ptr)] diff --git a/tests/unit/out/refcount/this.rs b/tests/unit/out/refcount/this.rs index 6dab3b2ea8..991563832f 100644 --- a/tests/unit/out/refcount/this.rs +++ b/tests/unit/out/refcount/this.rs @@ -14,8 +14,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, CppFrom, - Destructible, - Copyable, + TriviallyCopyable, Default, )] #[cpp_from(i32, construct_1, value)] @@ -39,8 +38,7 @@ pub fn bump_0(mut p: Ptr) { VaArg, FnPtrArg, CppFrom, - Destructible, - Copyable, + TriviallyCopyable, 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 5510475574..ecf4510a25 100644 --- a/tests/unit/out/refcount/typedef-anon-struct.rs +++ b/tests/unit/out/refcount/typedef-anon-struct.rs @@ -7,16 +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, - 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 3b5fb0661b..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,16 +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, - 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 ff2b8f3c91..be0c5e2949 100644 --- a/tests/unit/out/refcount/unboxed_locals.rs +++ b/tests/unit/out/refcount/unboxed_locals.rs @@ -15,16 +15,7 @@ pub fn inc_1(r: Ptr) { }); } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - 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 ddb769339e..d39d30b2e3 100644 --- a/tests/unit/out/refcount/unboxed_records.rs +++ b/tests/unit/out/refcount/unboxed_records.rs @@ -7,16 +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, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Inner { @@ -25,7 +16,7 @@ pub struct Inner { #[offset(4)] pub b: i32, } -#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(48)] pub struct Cookie { #[offset(0)] @@ -57,9 +48,7 @@ impl Default for Cookie { } } } -#[derive( - Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, 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 ca4c741423..38db75558a 100644 --- a/tests/unit/out/refcount/union_addrof_external.rs +++ b/tests/unit/out/refcount/union_addrof_external.rs @@ -6,7 +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, Copyable)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(16)] pub struct record { #[offset(0)] @@ -32,7 +32,7 @@ impl Default for record { } } } -#[derive(VaArg, FnPtrArg, Destructible, Copyable, ByteRepr, Clone, ZeroInitialization)] +#[derive(VaArg, FnPtrArg, TriviallyCopyable, ByteRepr, Clone, ZeroInitialization)] #[byte_size(128)] pub struct anon_0 { #[offset(0)] @@ -56,7 +56,7 @@ impl Default for anon_0 { } } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, 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 f2c09a44d4..4c0b892186 100644 --- a/tests/unit/out/refcount/union_basic.rs +++ b/tests/unit/out/refcount/union_basic.rs @@ -6,7 +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, Copyable, ByteRepr, Clone, ZeroInitialization)] +#[derive(VaArg, FnPtrArg, TriviallyCopyable, ByteRepr, Clone, ZeroInitialization)] #[byte_size(4)] pub struct basic { #[offset(0)] @@ -29,7 +29,7 @@ impl Default for basic { } } } -#[derive(VaArg, FnPtrArg, Destructible, Copyable, ByteRepr, Clone, ZeroInitialization)] +#[derive(VaArg, FnPtrArg, TriviallyCopyable, ByteRepr, Clone, ZeroInitialization)] #[byte_size(1)] pub struct empty { #[offset(0)] @@ -45,7 +45,7 @@ impl Default for empty { } } } -#[derive(VaArg, FnPtrArg, Destructible, Copyable, ByteRepr, Clone, ZeroInitialization)] +#[derive(VaArg, FnPtrArg, TriviallyCopyable, ByteRepr, Clone, ZeroInitialization)] #[byte_size(8)] pub struct underscores { #[offset(0)] @@ -123,7 +123,7 @@ fn main_0() -> i32 { assert!(((__ + ___) == 3)); return 0; } -#[derive(VaArg, FnPtrArg, Destructible, 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 a6ff07790f..bc6e773407 100644 --- a/tests/unit/out/refcount/union_cross_arm_cast.rs +++ b/tests/unit/out/refcount/union_cross_arm_cast.rs @@ -6,7 +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, Copyable)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(16)] pub struct shape_a { #[offset(0)] @@ -26,7 +26,7 @@ impl Default for shape_a { } } } -#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(28)] pub struct shape_b { #[offset(0)] @@ -55,7 +55,7 @@ impl Default for shape_b { } } } -#[derive(VaArg, FnPtrArg, Destructible, Copyable, ByteRepr, Clone, ZeroInitialization)] +#[derive(VaArg, FnPtrArg, TriviallyCopyable, ByteRepr, Clone, ZeroInitialization)] #[byte_size(64)] pub struct anon_0 { #[offset(0)] @@ -82,7 +82,7 @@ impl Default for anon_0 { } } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, 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 e689bccc26..d91fb62317 100644 --- a/tests/unit/out/refcount/union_field_alignment.rs +++ b/tests/unit/out/refcount/union_field_alignment.rs @@ -6,7 +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, Copyable, ByteRepr, Clone, ZeroInitialization)] +#[derive(VaArg, FnPtrArg, TriviallyCopyable, ByteRepr, Clone, ZeroInitialization)] #[byte_size(8)] pub struct anon_0 { #[offset(0)] @@ -30,7 +30,7 @@ impl Default for anon_0 { } } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, 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 c7414be3fd..a69afd6de5 100644 --- a/tests/unit/out/refcount/union_flex_array_member.rs +++ b/tests/unit/out/refcount/union_flex_array_member.rs @@ -6,7 +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, Copyable, ByteRepr, Clone, ZeroInitialization)] +#[derive(VaArg, FnPtrArg, TriviallyCopyable, ByteRepr, Clone, ZeroInitialization)] #[byte_size(8)] pub struct anon_0 { #[offset(0)] @@ -30,7 +30,7 @@ impl Default for anon_0 { } } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, 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 514f11afab..e215d22c1b 100644 --- a/tests/unit/out/refcount/union_memset_memcpy.rs +++ b/tests/unit/out/refcount/union_memset_memcpy.rs @@ -6,7 +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, Copyable)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(16)] pub struct shape_a { #[offset(0)] @@ -26,7 +26,7 @@ impl Default for shape_a { } } } -#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(16)] pub struct shape_b { #[offset(0)] @@ -52,7 +52,7 @@ impl Default for shape_b { } } } -#[derive(VaArg, FnPtrArg, Destructible, Copyable, ByteRepr, Clone, ZeroInitialization)] +#[derive(VaArg, FnPtrArg, TriviallyCopyable, ByteRepr, Clone, ZeroInitialization)] #[byte_size(256)] pub struct anon_0 { #[offset(0)] @@ -79,7 +79,7 @@ impl Default for anon_0 { } } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, 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 807644bd3f..3acf138887 100644 --- a/tests/unit/out/refcount/union_nested.rs +++ b/tests/unit/out/refcount/union_nested.rs @@ -6,7 +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, Copyable)] +#[derive(Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable)] #[byte_size(16)] pub struct record { #[offset(0)] @@ -26,7 +26,7 @@ impl Default for record { } } } -#[derive(VaArg, FnPtrArg, Destructible, Copyable, ByteRepr, Clone, ZeroInitialization)] +#[derive(VaArg, FnPtrArg, TriviallyCopyable, ByteRepr, Clone, ZeroInitialization)] #[byte_size(128)] pub struct anon_0 { #[offset(0)] @@ -50,7 +50,7 @@ impl Default for anon_0 { } } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(128)] pub struct inner { @@ -58,7 +58,7 @@ pub struct inner { #[byte_size(128)] pub view: anon_0, } -#[derive(VaArg, FnPtrArg, Destructible, Copyable, ByteRepr, Clone, ZeroInitialization)] +#[derive(VaArg, FnPtrArg, TriviallyCopyable, ByteRepr, Clone, ZeroInitialization)] #[byte_size(128)] pub struct anon_1 { #[offset(0)] @@ -82,7 +82,7 @@ impl Default for anon_1 { } } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, 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 b1833bf0fd..687deafd25 100644 --- a/tests/unit/out/refcount/union_pointer_pun_address.rs +++ b/tests/unit/out/refcount/union_pointer_pun_address.rs @@ -7,16 +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, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct node_a { @@ -24,7 +15,7 @@ pub struct node_a { pub n: i32, } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, Copyable, Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(16)] pub struct node_b { @@ -47,7 +38,7 @@ 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, 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 8d229bf8d2..222fc22741 100644 --- a/tests/unit/out/refcount/union_pointer_pun_writethrough.rs +++ b/tests/unit/out/refcount/union_pointer_pun_writethrough.rs @@ -18,7 +18,7 @@ fn main_0() -> i32 { assert!(({ ((*x.borrow()) == 42_i64) })); return 0; } -#[derive(VaArg, FnPtrArg, Destructible, 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 d366f54ebc..202db6881e 100644 --- a/tests/unit/out/refcount/union_struct_dual_use.rs +++ b/tests/unit/out/refcount/union_struct_dual_use.rs @@ -7,16 +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, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct Inner { @@ -28,7 +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, Copyable, ByteRepr, Clone, ZeroInitialization)] +#[derive(VaArg, FnPtrArg, TriviallyCopyable, ByteRepr, Clone, ZeroInitialization)] #[byte_size(16)] pub struct anon_1 { #[offset(0)] @@ -52,7 +43,7 @@ impl Default for anon_1 { } } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, 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 1e70242f07..68a74d495f 100644 --- a/tests/unit/out/refcount/union_tagged_many_arms.rs +++ b/tests/unit/out/refcount/union_tagged_many_arms.rs @@ -12,7 +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, Copyable, ByteRepr, Clone, ZeroInitialization)] +#[derive(VaArg, FnPtrArg, TriviallyCopyable, ByteRepr, Clone, ZeroInitialization)] #[byte_size(8)] pub struct anon_0 { #[offset(0)] @@ -45,7 +45,7 @@ impl Default for anon_0 { } } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, 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 fe497f915f..9ac26454c1 100644 --- a/tests/unit/out/refcount/union_tagged_simple.rs +++ b/tests/unit/out/refcount/union_tagged_simple.rs @@ -9,7 +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, Copyable, ByteRepr, Clone, ZeroInitialization)] +#[derive(VaArg, FnPtrArg, TriviallyCopyable, ByteRepr, Clone, ZeroInitialization)] #[byte_size(8)] pub struct anon_0 { #[offset(0)] @@ -33,7 +33,7 @@ impl Default for anon_0 { } } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, 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 4003a5d6a0..761cc43908 100644 --- a/tests/unit/out/refcount/union_tagged_struct_arms.rs +++ b/tests/unit/out/refcount/union_tagged_struct_arms.rs @@ -11,7 +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, Copyable, Default, + Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(24)] pub struct anon_1 { @@ -24,16 +24,7 @@ pub struct anon_1 { pub cursor: i64, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(16)] pub struct anon_2 { @@ -47,16 +38,7 @@ pub struct anon_2 { pub step: u8, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(40)] pub struct anon_3 { @@ -71,7 +53,7 @@ pub struct anon_3 { #[offset(32)] pub width: i32, } -#[derive(VaArg, FnPtrArg, Destructible, Copyable, ByteRepr, Clone, ZeroInitialization)] +#[derive(VaArg, FnPtrArg, TriviallyCopyable, ByteRepr, Clone, ZeroInitialization)] #[byte_size(40)] pub struct anon_0 { #[offset(0)] @@ -98,7 +80,7 @@ impl Default for anon_0 { } } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, 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 93289f2704..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,7 +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, Copyable, ByteRepr, Clone, ZeroInitialization)] +#[derive(VaArg, FnPtrArg, TriviallyCopyable, ByteRepr, Clone, ZeroInitialization)] #[byte_size(8)] pub struct anon_0 { #[offset(0)] @@ -40,7 +40,7 @@ impl Default for anon_0 { } } #[derive( - Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, Destructible, 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 18e0086c33..cfe9c99961 100644 --- a/tests/unit/out/refcount/unique_ptr.rs +++ b/tests/unit/out/refcount/unique_ptr.rs @@ -17,16 +17,7 @@ pub struct SafePointer { pub ptr: Option>, } #[derive( - Copy, - Clone, - Record, - ByteRepr, - ZeroInitialization, - VaArg, - FnPtrArg, - Destructible, - 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 473c7af871..b2349d77b5 100644 --- a/tests/unit/out/refcount/unique_ptr_field_reset.rs +++ b/tests/unit/out/refcount/unique_ptr_field_reset.rs @@ -7,16 +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, - 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 6fe8251cf4..44621e9e33 100644 --- a/tests/unit/out/refcount/unique_ptr_nested.rs +++ b/tests/unit/out/refcount/unique_ptr_nested.rs @@ -7,16 +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, - 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 5a0ddaa844..f2bd49ae0b 100644 --- a/tests/unit/out/refcount/unique_ptr_struct.rs +++ b/tests/unit/out/refcount/unique_ptr_struct.rs @@ -7,16 +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, - 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 904f4e39b6..2a0b78aa51 100644 --- a/tests/unit/out/refcount/va_arg_mixed_types.rs +++ b/tests/unit/out/refcount/va_arg_mixed_types.rs @@ -7,16 +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, - 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 3a648b500c..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,7 +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, 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 22299d2d3c..b68607d5f1 100644 --- a/tests/unit/out/refcount/va_arg_struct_ctx.rs +++ b/tests/unit/out/refcount/va_arg_struct_ctx.rs @@ -7,16 +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, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(8)] pub struct context { @@ -34,7 +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, 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 77278d4a99..9a7b947b8f 100644 --- a/tests/unit/out/refcount/va_arg_void_ptr.rs +++ b/tests/unit/out/refcount/va_arg_void_ptr.rs @@ -7,7 +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, 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 ae44147db9..274f49b328 100644 --- a/tests/unit/out/refcount/va_list_field.rs +++ b/tests/unit/out/refcount/va_list_field.rs @@ -66,7 +66,7 @@ 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, 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 d0934c9fb4..2339640e96 100644 --- a/tests/unit/out/refcount/vector.rs +++ b/tests/unit/out/refcount/vector.rs @@ -7,16 +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, - Copyable, - Default, + Copy, Clone, Record, ByteRepr, ZeroInitialization, VaArg, FnPtrArg, TriviallyCopyable, Default, )] #[byte_size(4)] pub struct S { @@ -57,8 +48,7 @@ pub struct Foo { VaArg, FnPtrArg, CppFrom, - Destructible, - Copyable, + TriviallyCopyable, 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 9e5de040b9..6b64a33821 100644 --- a/tests/unit/out/refcount/vector_iter_range_ctor.rs +++ b/tests/unit/out/refcount/vector_iter_range_ctor.rs @@ -15,8 +15,7 @@ use std::rc::{Rc, Weak}; VaArg, FnPtrArg, CppFrom, - Destructible, - Copyable, + TriviallyCopyable, Default, )] #[cpp_from(i32, construct, value)] @@ -34,8 +33,7 @@ pub struct Degrees { VaArg, FnPtrArg, CppFrom, - Destructible, - Copyable, + TriviallyCopyable, 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 f1f86648d1..b7ffae56bc 100644 --- a/tests/unit/out/refcount/vector_subscript_direct.rs +++ b/tests/unit/out/refcount/vector_subscript_direct.rs @@ -7,16 +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, - 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 95579428e4..bf2a2a2fae 100644 --- a/tests/unit/out/refcount/vector_with_allocator.rs +++ b/tests/unit/out/refcount/vector_with_allocator.rs @@ -7,30 +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, - 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, - 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 f22c65815f..6d4cfd5995 100644 --- a/tests/unit/out/refcount/void_cast.rs +++ b/tests/unit/out/refcount/void_cast.rs @@ -38,16 +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, - 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 e184846aad..ebd9cebebf 100644 --- a/tests/unit/out/unsafe/05_new.rs +++ b/tests/unit/out/unsafe/05_new.rs @@ -8,26 +8,12 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct A {} #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 230b88f19f..613fd301d0 100644 --- a/tests/unit/out/unsafe/10_struct.rs +++ b/tests/unit/out/unsafe/10_struct.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct GraphNode { pub dst: u32, @@ -23,14 +16,7 @@ pub struct GraphNode { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Graph { pub V: u32, @@ -49,9 +35,7 @@ impl Graph { } } #[repr(C)] -#[derive( - Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, -)] +#[derive(Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct Partial { pub p: *mut i32, } @@ -71,27 +55,13 @@ impl Default for Partial { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Declared {} impl Declared {} #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 6bf331e8f7..5e47f92c63 100644 --- a/tests/unit/out/unsafe/addr_of_global.rs +++ b/tests/unit/out/unsafe/addr_of_global.rs @@ -8,28 +8,14 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Inner { pub value: i32, } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 fce183f9a2..fc1e8b5c3a 100644 --- a/tests/unit/out/unsafe/anonymous-struct.rs +++ b/tests/unit/out/unsafe/anonymous-struct.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Outer_Named { pub a: i32, @@ -23,14 +16,7 @@ pub struct Outer_Named { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct anon_0 { pub c: i32, @@ -38,14 +24,7 @@ pub struct anon_0 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct anon_1 { pub g: i32, @@ -53,14 +32,7 @@ pub struct anon_1 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct anon_2 { pub e: i32, @@ -68,42 +40,21 @@ pub struct anon_2 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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, - 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, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct anon_3 { pub i: i32, @@ -112,14 +63,7 @@ pub struct anon_3 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Outer { pub named: Outer_Named, @@ -177,14 +121,7 @@ unsafe fn main_0() -> i32 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 509da3b233..405a2cac0b 100644 --- a/tests/unit/out/unsafe/anonymous-struct_c.rs +++ b/tests/unit/out/unsafe/anonymous-struct_c.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Named { pub a: i32, @@ -23,14 +16,7 @@ pub struct Named { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct anon_0 { pub c: i32, @@ -38,14 +24,7 @@ pub struct anon_0 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct anon_1 { pub g: i32, @@ -53,14 +32,7 @@ pub struct anon_1 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct anon_2 { pub e: i32, @@ -68,42 +40,21 @@ pub struct anon_2 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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, - 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, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct anon_3 { pub i: i32, @@ -112,14 +63,7 @@ pub struct anon_3 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Outer { pub named: Named, @@ -183,14 +127,7 @@ unsafe fn main_0() -> i32 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 066af2d3ed..f8e6e55e5f 100644 --- a/tests/unit/out/unsafe/anonymous_enum.rs +++ b/tests/unit/out/unsafe/anonymous_enum.rs @@ -14,14 +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, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct S { pub a: i32, @@ -34,14 +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, - 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 f8ddc173e8..05055b8ed6 100644 --- a/tests/unit/out/unsafe/anonymous_enum_c.rs +++ b/tests/unit/out/unsafe/anonymous_enum_c.rs @@ -14,14 +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, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct S { pub a: i32, @@ -34,14 +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, - 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 48c87082b1..855caed29d 100644 --- a/tests/unit/out/unsafe/any.rs +++ b/tests/unit/out/unsafe/any.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 fc0bfe4233..2f76988087 100644 --- a/tests/unit/out/unsafe/array_const_init.rs +++ b/tests/unit/out/unsafe/array_const_init.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct S { pub head: i32, @@ -31,14 +24,7 @@ pub static mut s_0: std::cell::LazyCell = std::cell::LazyCell::new(|| unsafe }); #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 ab89391816..2625480bd5 100644 --- a/tests/unit/out/unsafe/array_field_addr.rs +++ b/tests/unit/out/unsafe/array_field_addr.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 c0873c5a6e..77bec757c9 100644 --- a/tests/unit/out/unsafe/array_reference.rs +++ b/tests/unit/out/unsafe/array_reference.rs @@ -58,14 +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, - 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 33d7afa5ea..268e0a0336 100644 --- a/tests/unit/out/unsafe/as_const.rs +++ b/tests/unit/out/unsafe/as_const.rs @@ -11,14 +11,7 @@ pub const Overload_kMutableOverload: Overload = 1; pub const Overload_kConstOverload: Overload = 2; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 44907d339d..65997d2d5d 100644 --- a/tests/unit/out/unsafe/assign_rhs_first.rs +++ b/tests/unit/out/unsafe/assign_rhs_first.rs @@ -14,14 +14,7 @@ pub unsafe fn advance_1() -> i32 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 cf86ead1b9..128874e05c 100644 --- a/tests/unit/out/unsafe/assignment_single_eval.rs +++ b/tests/unit/out/unsafe/assignment_single_eval.rs @@ -837,42 +837,21 @@ pub unsafe fn test_reference_members_9() { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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, - 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, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Slot_10 { pub value: *mut i32, @@ -923,14 +902,7 @@ pub unsafe fn test_pointer_elements_11() { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Holder_12 { pub p: *mut i32, @@ -958,14 +930,7 @@ pub unsafe fn test_reference_pointer_13() { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Node_14 { pub link: *mut *mut Node_14, @@ -1040,56 +1005,28 @@ pub unsafe fn test_reference_subfields_18() { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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, - 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, - 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, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Slot_20 { pub ref_: *mut Index_19, @@ -1131,28 +1068,14 @@ pub unsafe fn observe_24(mut assigned: i32, mut stored: *const i32) -> i32 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct GlobalRecord { pub inner: GlobalRecord_Inner, @@ -1420,28 +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, - 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, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Link_33 { pub next: *mut Link_33, @@ -1450,14 +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, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct IndexedBinding {} impl IndexedBinding { @@ -1678,14 +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, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct IndexedMember { pub key: i32, @@ -1946,14 +1841,7 @@ pub static mut scoped_pointers_53: std::cell::LazyCell<[*mut u32; 1]> = }); #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct PointerSelector { pub ptr: *mut u32, @@ -2128,14 +2016,7 @@ pub struct Counts_59 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Pair_60 { pub u: u32, @@ -2439,28 +2320,14 @@ unsafe fn main_0() -> i32 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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, - 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 a56c5e762a..16f0402ee3 100644 --- a/tests/unit/out/unsafe/bounded_struct_ptr.rs +++ b/tests/unit/out/unsafe/bounded_struct_ptr.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 dd9688cb32..0058a5ad73 100644 --- a/tests/unit/out/unsafe/bst.rs +++ b/tests/unit/out/unsafe/bst.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 3e10ddfb2d..ff68b685b8 100644 --- a/tests/unit/out/unsafe/c_struct.rs +++ b/tests/unit/out/unsafe/c_struct.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Point { pub x: i32, @@ -23,14 +16,7 @@ pub struct Point { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Line { pub start: Point, @@ -38,14 +24,7 @@ pub struct Line { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Node { pub value: i32, @@ -57,14 +36,7 @@ pub const Color_GREEN: Color = 1; pub const Color_BLUE: Color = 2; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Inner { pub a: i32, @@ -72,14 +44,7 @@ pub struct Inner { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 32ec6cbd23..3d531690a9 100644 --- a/tests/unit/out/unsafe/cast.rs +++ b/tests/unit/out/unsafe/cast.rs @@ -12,14 +12,7 @@ pub const E_B: E = 1; pub const E_C: E = 2; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Pair { pub x: i32, @@ -27,28 +20,14 @@ pub struct Pair { } #[repr(C, align(64))] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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, - 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 d8caf25784..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,14 +18,7 @@ pub unsafe fn strlen_1(mut s: *mut libc::c_char) -> i32 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 95d24f2b3d..750d263682 100644 --- a/tests/unit/out/unsafe/class.rs +++ b/tests/unit/out/unsafe/class.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Pair { pub first: i32, @@ -52,14 +45,7 @@ impl Pair { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Route { pub path: Pair, @@ -74,14 +60,7 @@ impl Route { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Counter { pub v: i32, @@ -105,14 +84,7 @@ impl std::cmp::PartialEq for Counter { impl std::cmp::Eq for Counter {} #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 66317dfa2f..94e7837f31 100644 --- a/tests/unit/out/unsafe/class_template_lazy_member.rs +++ b/tests/unit/out/unsafe/class_template_lazy_member.rs @@ -8,28 +8,14 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Point { pub x: i32, } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Box_int_ { pub val: i32, @@ -41,14 +27,7 @@ impl Box_int_ { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Box_Point_ { pub val: Point, @@ -60,14 +39,7 @@ impl Box_Point_ { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Deduced_int_ { pub val: i32, @@ -79,14 +51,7 @@ impl Deduced_int_ { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 09e1e3c799..22557ec64c 100644 --- a/tests/unit/out/unsafe/class_templates.rs +++ b/tests/unit/out/unsafe/class_templates.rs @@ -131,14 +131,7 @@ impl MyContainer_float_ { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Boxed_short_ { pub value: i16, @@ -153,14 +146,7 @@ impl Boxed_short_ { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Boxed_int_ { pub value: i32, @@ -175,14 +161,7 @@ impl Boxed_int_ { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Boxed_long_ { pub value: i64, @@ -197,14 +176,7 @@ impl Boxed_long_ { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Outer_int__Inner_int_ { pub t: i32, @@ -217,14 +189,7 @@ impl Outer_int__Inner_int_ { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Outer_int_ { pub v: i32, @@ -236,14 +201,7 @@ impl Outer_int_ { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Outer_long__Inner_int_ { pub t: i64, @@ -256,14 +214,7 @@ impl Outer_long__Inner_int_ { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Outer_long__Inner_char_ { pub t: i64, @@ -276,14 +227,7 @@ impl Outer_long__Inner_char_ { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Outer_long_ { pub v: i64, @@ -295,14 +239,7 @@ impl Outer_long_ { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 ed780956b4..1bb270b340 100644 --- a/tests/unit/out/unsafe/clone_vs_move.rs +++ b/tests/unit/out/unsafe/clone_vs_move.rs @@ -8,28 +8,14 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Bar { pub w: i32, } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Foo { pub x: i32, @@ -40,14 +26,7 @@ pub struct Foo { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 b13c468668..2d4598027a 100644 --- a/tests/unit/out/unsafe/comma_operator.rs +++ b/tests/unit/out/unsafe/comma_operator.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 affaad74ec..0e2b7bebfb 100644 --- a/tests/unit/out/unsafe/complex_function.rs +++ b/tests/unit/out/unsafe/complex_function.rs @@ -17,28 +17,14 @@ pub unsafe fn bar_2(x: *mut i32) -> *mut i32 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct X1 { pub v: i32, } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct X2 { pub v: *mut X1, @@ -50,14 +36,7 @@ impl X2 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct X3 { pub v: *mut X2, @@ -69,14 +48,7 @@ impl X3 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 be193150cb..d04fd5c815 100644 --- a/tests/unit/out/unsafe/compound_assign_paren.rs +++ b/tests/unit/out/unsafe/compound_assign_paren.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 c8a2276495..480c879e74 100644 --- a/tests/unit/out/unsafe/concepts.rs +++ b/tests/unit/out/unsafe/concepts.rs @@ -13,14 +13,7 @@ const _: () = assert!( ); #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 af01c711a5..0ab56af31f 100644 --- a/tests/unit/out/unsafe/constexpr_function.rs +++ b/tests/unit/out/unsafe/constexpr_function.rs @@ -23,14 +23,7 @@ pub unsafe fn half_3(mut x: f64) -> f64 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Flag { pub v: i32, @@ -58,14 +51,7 @@ pub unsafe fn imm_7(mut b: bool) -> bool { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 9c9fb88285..61f6b2f371 100644 --- a/tests/unit/out/unsafe/constructor.rs +++ b/tests/unit/out/unsafe/constructor.rs @@ -38,14 +38,7 @@ impl DestructibleUnsafe for S { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - CppFromUnsafe, - DestructibleUnsafe, - 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 69fdad1457..a80b02ea99 100644 --- a/tests/unit/out/unsafe/conversion_operator_same_translation.rs +++ b/tests/unit/out/unsafe/conversion_operator_same_translation.rs @@ -14,8 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, - DestructibleUnsafe, - CopyableUnsafe, + TriviallyCopyableUnsafe, Default, )] #[cpp_into(libc::c_char, to_libcc_char)] @@ -39,8 +38,7 @@ impl S { FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, - DestructibleUnsafe, - CopyableUnsafe, + TriviallyCopyableUnsafe, 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 a711326cad..3c6962454d 100644 --- a/tests/unit/out/unsafe/copy_move_defaulted.rs +++ b/tests/unit/out/unsafe/copy_move_defaulted.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Inner { pub x: i32, @@ -42,14 +35,7 @@ impl DestructibleUnsafe for Explicit { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 db86e237ca..7a7e47d5e3 100644 --- a/tests/unit/out/unsafe/default.rs +++ b/tests/unit/out/unsafe/default.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Pointers { pub x1: *mut i32, @@ -26,14 +19,7 @@ pub struct Pointers { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct SmallArrays { pub a: [i32; 32], @@ -42,9 +28,7 @@ pub struct SmallArrays { pub p: [Pointers; 2], } #[repr(C)] -#[derive( - Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, 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 4de0765623..a4f692e6c7 100644 --- a/tests/unit/out/unsafe/default_function_arguments.rs +++ b/tests/unit/out/unsafe/default_function_arguments.rs @@ -14,14 +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, - CopyableUnsafe, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, TriviallyCopyableUnsafe, )] #[cpp_from(i32, construct, value)] pub struct Bar { @@ -71,14 +64,7 @@ pub unsafe fn first_9(r: *mut [i32; 3]) -> i32 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 254bc6e763..34002d7223 100644 --- a/tests/unit/out/unsafe/default_in_statics.rs +++ b/tests/unit/out/unsafe/default_in_statics.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Inner { pub v: i32, @@ -23,14 +16,7 @@ pub struct Inner { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Outer { pub p1: *mut i32, @@ -44,14 +30,7 @@ pub struct Outer { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 5d35a8e9fc..59984412c7 100644 --- a/tests/unit/out/unsafe/destructor_params.rs +++ b/tests/unit/out/unsafe/destructor_params.rs @@ -28,14 +28,7 @@ pub unsafe fn with_default_3(mut s: S) -> i32 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 1cce38f8cb..49791e76f9 100644 --- a/tests/unit/out/unsafe/doubly_linked_list.rs +++ b/tests/unit/out/unsafe/doubly_linked_list.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 0bd954a6ce..5cad8e0ea3 100644 --- a/tests/unit/out/unsafe/enum_default_in_static.rs +++ b/tests/unit/out/unsafe/enum_default_in_static.rs @@ -12,14 +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, - 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 b079413208..465cf425c9 100644 --- a/tests/unit/out/unsafe/enum_int_interop.rs +++ b/tests/unit/out/unsafe/enum_int_interop.rs @@ -21,14 +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, - 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 c28d97772b..196efb71de 100644 --- a/tests/unit/out/unsafe/enum_int_interop_c.rs +++ b/tests/unit/out/unsafe/enum_int_interop_c.rs @@ -21,14 +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, - 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 d957cd98ed..df814b3919 100644 --- a/tests/unit/out/unsafe/enum_underlying_type.rs +++ b/tests/unit/out/unsafe/enum_underlying_type.rs @@ -26,9 +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, 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 61e152ca29..587c772493 100644 --- a/tests/unit/out/unsafe/exprs.rs +++ b/tests/unit/out/unsafe/exprs.rs @@ -8,28 +8,14 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct X { pub x: i32, } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 788a6c6834..4b58094771 100644 --- a/tests/unit/out/unsafe/fft.rs +++ b/tests/unit/out/unsafe/fft.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 6f02452a3b..ae45a46254 100644 --- a/tests/unit/out/unsafe/field_aliasing.rs +++ b/tests/unit/out/unsafe/field_aliasing.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct In { pub x: i32, @@ -23,14 +16,7 @@ pub struct In { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct S { pub in_: In, @@ -40,14 +26,7 @@ pub struct S { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 a9674c8fee..9d94aafcd0 100644 --- a/tests/unit/out/unsafe/field_array_elem_ptr.rs +++ b/tests/unit/out/unsafe/field_array_elem_ptr.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Point { pub x: i32, @@ -23,14 +16,7 @@ pub struct Point { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 daeb0af970..16651f982b 100644 --- a/tests/unit/out/unsafe/field_method_receiver.rs +++ b/tests/unit/out/unsafe/field_method_receiver.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 4dd1e1449c..996ddddf87 100644 --- a/tests/unit/out/unsafe/field_pointers.rs +++ b/tests/unit/out/unsafe/field_pointers.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Inner { pub a: i32, @@ -23,14 +16,7 @@ pub struct Inner { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 8b21831780..599048e691 100644 --- a/tests/unit/out/unsafe/field_pointers_malloced_struct.rs +++ b/tests/unit/out/unsafe/field_pointers_malloced_struct.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 70ebbf27a0..322d84a1ac 100644 --- a/tests/unit/out/unsafe/field_reinterpret_write_through.rs +++ b/tests/unit/out/unsafe/field_reinterpret_write_through.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct In { pub a: i16, @@ -23,14 +16,7 @@ pub struct In { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 679117177e..d6a9669f68 100644 --- a/tests/unit/out/unsafe/find.rs +++ b/tests/unit/out/unsafe/find.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 43a7044886..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,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct In { pub a: i16, @@ -23,14 +16,7 @@ pub struct In { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 66c8c06c7f..10998b103e 100644 --- a/tests/unit/out/unsafe/first_member_downcast.rs +++ b/tests/unit/out/unsafe/first_member_downcast.rs @@ -8,28 +8,14 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct base { pub kind: i32, } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 d6858e1859..bd098b41b0 100644 --- a/tests/unit/out/unsafe/flex_array_member_incomplete.rs +++ b/tests/unit/out/unsafe/flex_array_member_incomplete.rs @@ -7,9 +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, 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 47fc857aa4..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,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct S { pub n: i32, @@ -23,14 +16,7 @@ pub struct S { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct E { pub id: i32, @@ -38,14 +24,7 @@ pub struct E { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 fe93278c2a..edc159f955 100644 --- a/tests/unit/out/unsafe/fn_ptr.rs +++ b/tests/unit/out/unsafe/fn_ptr.rs @@ -39,8 +39,7 @@ pub unsafe fn identity_hash_6(mut v: bool) -> usize { FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, - DestructibleUnsafe, - CopyableUnsafe, + TriviallyCopyableUnsafe, 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 aa381b191f..825705351a 100644 --- a/tests/unit/out/unsafe/fn_ptr_cast.rs +++ b/tests/unit/out/unsafe/fn_ptr_cast.rs @@ -31,14 +31,7 @@ pub unsafe fn test_double_cast_2() { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 d32ebd39f3..df7044da69 100644 --- a/tests/unit/out/unsafe/fn_ptr_stable_sort.rs +++ b/tests/unit/out/unsafe/fn_ptr_stable_sort.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 db38c500b5..265f3850ea 100644 --- a/tests/unit/out/unsafe/fn_ptr_struct.rs +++ b/tests/unit/out/unsafe/fn_ptr_struct.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Handler { pub tag: i32, @@ -29,14 +22,7 @@ pub unsafe fn negate_1(mut x: i32) -> i32 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 4591740e50..1d944e9e7a 100644 --- a/tests/unit/out/unsafe/fn_ptr_typedef_cast.rs +++ b/tests/unit/out/unsafe/fn_ptr_typedef_cast.rs @@ -20,14 +20,7 @@ pub unsafe fn via_size_t_return_3(mut b: u64) -> usize { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 3d73178885..7cf2c23e14 100644 --- a/tests/unit/out/unsafe/fn_ptr_vtable.rs +++ b/tests/unit/out/unsafe/fn_ptr_vtable.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 cc3c0559cb..b4d5eef237 100644 --- a/tests/unit/out/unsafe/fn_ref.rs +++ b/tests/unit/out/unsafe/fn_ref.rs @@ -23,14 +23,7 @@ pub unsafe fn call_forwarded_4(f: Option i32>, mut x: i32) -> } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 2cf436a218..9640b96b2a 100644 --- a/tests/unit/out/unsafe/friend.rs +++ b/tests/unit/out/unsafe/friend.rs @@ -20,14 +20,7 @@ pub unsafe fn scaled_3(v: *const V, mut k: f64) -> f64 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct V { pub x: i32, @@ -43,14 +36,7 @@ pub unsafe fn get_4(w: *const W_int_) -> i32 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct W_int_ { pub x: i32, @@ -60,28 +46,14 @@ pub unsafe fn get_5(w: *const W_long_) -> i64 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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, - 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 c8b7a2de0a..f4a7056241 100644 --- a/tests/unit/out/unsafe/function_overloading.rs +++ b/tests/unit/out/unsafe/function_overloading.rs @@ -23,14 +23,7 @@ pub unsafe fn bar_4(x: *mut i32) -> i32 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 7dec1b2bac..b5136c2e10 100644 --- a/tests/unit/out/unsafe/global_call_temporaries.rs +++ b/tests/unit/out/unsafe/global_call_temporaries.rs @@ -78,14 +78,7 @@ pub static mut call_assigned_6: std::cell::LazyCell = std::cell::LazyCell:: }); #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 fcc5912e85..19ef3b0524 100644 --- a/tests/unit/out/unsafe/global_init_side_effect.rs +++ b/tests/unit/out/unsafe/global_init_side_effect.rs @@ -15,8 +15,7 @@ pub static mut total_0: std::cell::LazyCell = std::cell::LazyCell::new(|| u FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, - DestructibleUnsafe, - CopyableUnsafe, + TriviallyCopyableUnsafe, 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 beb3c2869a..7a1fc91ea3 100644 --- a/tests/unit/out/unsafe/global_non_const_init.rs +++ b/tests/unit/out/unsafe/global_non_const_init.rs @@ -28,9 +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, CopyableUnsafe, -)] +#[derive(Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct Ctor { pub v: i32, } @@ -84,14 +82,7 @@ pub static mut inline_member_11: std::cell::LazyCell = std::cell::LazyCell }); #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Holder {} pub static mut member_10: std::cell::LazyCell = @@ -110,9 +101,7 @@ static mut local_ctor_14: std::cell::LazyCell = std::cell::LazyCell::new(| } }); #[repr(C)] -#[derive( - Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, 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 c2a842b5a2..8eecf5ac09 100644 --- a/tests/unit/out/unsafe/global_pointers.rs +++ b/tests/unit/out/unsafe/global_pointers.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 b79958bf2d..074b02c2c8 100644 --- a/tests/unit/out/unsafe/global_without_initializer.rs +++ b/tests/unit/out/unsafe/global_without_initializer.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 9101602a1a..c098ed98ac 100644 --- a/tests/unit/out/unsafe/goto_aggregate_default.rs +++ b/tests/unit/out/unsafe/goto_aggregate_default.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 2712123684..b37692ba80 100644 --- a/tests/unit/out/unsafe/goto_cleanup.rs +++ b/tests/unit/out/unsafe/goto_cleanup.rs @@ -78,14 +78,7 @@ pub unsafe fn from_switch_2(mut n: i32) -> i32 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 459852d53a..aecc080728 100644 --- a/tests/unit/out/unsafe/huffman.rs +++ b/tests/unit/out/unsafe/huffman.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 a5a31f3f8c..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,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 b4bcd25826..4372b9097c 100644 --- a/tests/unit/out/unsafe/in_class_field_initializer.rs +++ b/tests/unit/out/unsafe/in_class_field_initializer.rs @@ -7,9 +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, CopyableUnsafe, -)] +#[derive(Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct Inner { pub x: i32, pub y: i32, @@ -20,9 +18,7 @@ impl Default for Inner { } } #[repr(C)] -#[derive( - Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, -)] +#[derive(Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct S { pub a: i32, pub b: libc::c_char, @@ -42,9 +38,7 @@ impl Default for S { } } #[repr(C)] -#[derive( - Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, 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 725246c345..dff1966872 100644 --- a/tests/unit/out/unsafe/init.rs +++ b/tests/unit/out/unsafe/init.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 72295a1bee..c77ac10955 100644 --- a/tests/unit/out/unsafe/init_list.rs +++ b/tests/unit/out/unsafe/init_list.rs @@ -9,23 +9,14 @@ use std::rc::Rc; pub unsafe fn f_0(mut list: Vec) {} #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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, CopyableUnsafe, -)] +#[derive(Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct Holder { pub p: Pair, } @@ -48,9 +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, 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 08c1614074..4b3e877125 100644 --- a/tests/unit/out/unsafe/kruskal.rs +++ b/tests/unit/out/unsafe/kruskal.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 d174d1b218..8ec874e2eb 100644 --- a/tests/unit/out/unsafe/lambda_as_field.rs +++ b/tests/unit/out/unsafe/lambda_as_field.rs @@ -38,7 +38,7 @@ 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, TriviallyCopyableUnsafe)] pub struct Holder__lambda_at_lambda_as_field_cpp_39_12__ { pub f: FnPtr i32>, pub calls: i32, @@ -64,9 +64,7 @@ impl Default for Holder__lambda_at_lambda_as_field_cpp_39_12__ { } } #[repr(C)] -#[derive( - Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, 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 1685860930..273bccdd6d 100644 --- a/tests/unit/out/unsafe/lambda_capture_ref.rs +++ b/tests/unit/out/unsafe/lambda_capture_ref.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 dae883e98c..be3bf1f6e9 100644 --- a/tests/unit/out/unsafe/lambda_capture_star_this.rs +++ b/tests/unit/out/unsafe/lambda_capture_star_this.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 5aa1013497..ee019462ca 100644 --- a/tests/unit/out/unsafe/lambda_capture_this.rs +++ b/tests/unit/out/unsafe/lambda_capture_this.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 b6083ad486..1d721ec289 100644 --- a/tests/unit/out/unsafe/lambda_capture_value.rs +++ b/tests/unit/out/unsafe/lambda_capture_value.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 9ea037c436..16f90a62a7 100644 --- a/tests/unit/out/unsafe/lambda_decltype_type.rs +++ b/tests/unit/out/unsafe/lambda_decltype_type.rs @@ -7,7 +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, 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, @@ -45,7 +45,7 @@ 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, 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 76d3641c9a..887fadc14d 100644 --- a/tests/unit/out/unsafe/lambda_generic_explicit_args.rs +++ b/tests/unit/out/unsafe/lambda_generic_explicit_args.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 5b07f0316b..63e8e560ae 100644 --- a/tests/unit/out/unsafe/lambda_immediate_init.rs +++ b/tests/unit/out/unsafe/lambda_immediate_init.rs @@ -10,9 +10,7 @@ pub unsafe fn pick_0(mut x: i32) -> i32 { return x; } #[repr(C)] -#[derive( - Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, 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 2a114684a1..1afcc23943 100644 --- a/tests/unit/out/unsafe/lambda_nested.rs +++ b/tests/unit/out/unsafe/lambda_nested.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 3509967e9d..8c46892420 100644 --- a/tests/unit/out/unsafe/lambda_static_local.rs +++ b/tests/unit/out/unsafe/lambda_static_local.rs @@ -69,14 +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, - 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 81034583ab..739788ab15 100644 --- a/tests/unit/out/unsafe/libc_struct_without_default.rs +++ b/tests/unit/out/unsafe/libc_struct_without_default.rs @@ -34,9 +34,7 @@ impl Default for UserDefined { } } #[repr(C)] -#[derive( - Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, 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 371dd6530f..17392bf6ab 100644 --- a/tests/unit/out/unsafe/linked_list.rs +++ b/tests/unit/out/unsafe/linked_list.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 b144e4e780..22a5a31b74 100644 --- a/tests/unit/out/unsafe/local_anon_struct_collision.rs +++ b/tests/unit/out/unsafe/local_anon_struct_collision.rs @@ -14,14 +14,7 @@ pub unsafe fn first_0() -> i32 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct anon_1 { pub x: i32, @@ -35,14 +28,7 @@ pub unsafe fn second_2() -> i32 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 79539375cd..6bfee633be 100644 --- a/tests/unit/out/unsafe/local_record_template.rs +++ b/tests/unit/out/unsafe/local_record_template.rs @@ -31,28 +31,14 @@ pub unsafe fn wrap_10(mut v: i64) -> i32 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Local_7 { pub x: i64, @@ -63,14 +49,7 @@ pub unsafe fn other_11() -> i32 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Local_1 { pub x: i64, @@ -93,14 +72,7 @@ unsafe fn main_0() -> i32 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 ddb014b6f1..2386426f67 100644 --- a/tests/unit/out/unsafe/map.rs +++ b/tests/unit/out/unsafe/map.rs @@ -16,9 +16,7 @@ pub unsafe fn inc_2(x: *mut i32) { (*x).postfix_inc(); } #[repr(C)] -#[derive( - Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, 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 824fd3e5e7..579d8cc551 100644 --- a/tests/unit/out/unsafe/map_key_identity.rs +++ b/tests/unit/out/unsafe/map_key_identity.rs @@ -10,14 +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, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Key { pub order: i32, @@ -54,9 +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, 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 0550465470..99592788fa 100644 --- a/tests/unit/out/unsafe/map_try_emplace.rs +++ b/tests/unit/out/unsafe/map_try_emplace.rs @@ -72,9 +72,7 @@ pub unsafe fn argument_4(item: *mut Item) -> *mut Item { return item; } #[repr(C)] -#[derive( - Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, 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 8c96802af2..7788a2d0f2 100644 --- a/tests/unit/out/unsafe/map_try_emplace_lvalues.rs +++ b/tests/unit/out/unsafe/map_try_emplace_lvalues.rs @@ -9,9 +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, CopyableUnsafe, -)] +#[derive(Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct Item { pub value: i32, } @@ -49,9 +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, CopyableUnsafe, -)] +#[derive(Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct Temporary { pub n: i32, pub data: [i32; 2], @@ -76,14 +72,7 @@ impl Default for Temporary { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Nested { pub inner: Temporary, @@ -153,14 +142,7 @@ impl Default for Noncopy { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - CppFromUnsafe, - DestructibleUnsafe, - 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 e8fd1940fd..52ed9a3a88 100644 --- a/tests/unit/out/unsafe/memcpy_struct_bytes.rs +++ b/tests/unit/out/unsafe/memcpy_struct_bytes.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 6ed39f84e4..b39f168db7 100644 --- a/tests/unit/out/unsafe/memcpy_struct_layouts.rs +++ b/tests/unit/out/unsafe/memcpy_struct_layouts.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct packed { pub a: i32, @@ -25,14 +18,7 @@ pub struct packed { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct reordered { pub a: libc::c_char, @@ -41,14 +27,7 @@ pub struct reordered { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct tail { pub a: libc::c_char, @@ -56,14 +35,7 @@ pub struct tail { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct nested { pub t: tail, @@ -71,14 +43,7 @@ pub struct nested { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 d58f77c503..0bc61206d3 100644 --- a/tests/unit/out/unsafe/memcpy_struct_struct.rs +++ b/tests/unit/out/unsafe/memcpy_struct_struct.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 84ea69f2e4..68364362d3 100644 --- a/tests/unit/out/unsafe/memset_struct_tail.rs +++ b/tests/unit/out/unsafe/memset_struct_tail.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 176d47dca7..44583fc00c 100644 --- a/tests/unit/out/unsafe/nested_structs.rs +++ b/tests/unit/out/unsafe/nested_structs.rs @@ -8,28 +8,14 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Level0_Level1_1_Level2_1_Level3_2 { pub x1: i32, @@ -37,42 +23,21 @@ pub struct Level0_Level1_1_Level2_1_Level3_2 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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, - 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, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Level0_Level1_2 { pub x1: i32, @@ -80,14 +45,7 @@ pub struct Level0_Level1_2 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 fffe780a13..e0d3015cbc 100644 --- a/tests/unit/out/unsafe/new.rs +++ b/tests/unit/out/unsafe/new.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 34e337a77f..97b631f9e3 100644 --- a/tests/unit/out/unsafe/new_bst.rs +++ b/tests/unit/out/unsafe/new_bst.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 1ef439b45e..a9f66e50da 100644 --- a/tests/unit/out/unsafe/new_struct.rs +++ b/tests/unit/out/unsafe/new_struct.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Pair { pub x: i32, @@ -23,14 +16,7 @@ pub struct Pair { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 3b054d4c42..7e4ddc2f00 100644 --- a/tests/unit/out/unsafe/nttp_distinct_specializations.rs +++ b/tests/unit/out/unsafe/nttp_distinct_specializations.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct S_2_ { pub v: i32, @@ -28,14 +21,7 @@ impl S_2_ { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct S_1_ { pub v: i32, @@ -47,14 +33,7 @@ impl S_1_ { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 733562f72d..c65bc82147 100644 --- a/tests/unit/out/unsafe/offsetof.rs +++ b/tests/unit/out/unsafe/offsetof.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Layout { pub a: u8, @@ -23,9 +16,7 @@ pub struct Layout { pub c: u16, } #[repr(C)] -#[derive( - Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, 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 e83c379a67..35a56e4387 100644 --- a/tests/unit/out/unsafe/opaque_forward_decl.rs +++ b/tests/unit/out/unsafe/opaque_forward_decl.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 339738a10d..935d03778c 100644 --- a/tests/unit/out/unsafe/opaque_record_copy.rs +++ b/tests/unit/out/unsafe/opaque_record_copy.rs @@ -8,26 +8,12 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Probe {} #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 6cbb61093d..b9fa7b8b1d 100644 --- a/tests/unit/out/unsafe/opaque_then_defined.rs +++ b/tests/unit/out/unsafe/opaque_then_defined.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct list { pub head: *mut node, @@ -23,14 +16,7 @@ pub struct list { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 897ff4c9a1..64109d8e9b 100644 --- a/tests/unit/out/unsafe/operator_arithmetic_free.rs +++ b/tests/unit/out/unsafe/operator_arithmetic_free.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 b05bb0adab..ee2d516935 100644 --- a/tests/unit/out/unsafe/operator_arithmetic_member.rs +++ b/tests/unit/out/unsafe/operator_arithmetic_member.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 97df16f7a3..3bb31d9b8e 100644 --- a/tests/unit/out/unsafe/operator_bitwise_free.rs +++ b/tests/unit/out/unsafe/operator_bitwise_free.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 a220c433db..87bf73b2ab 100644 --- a/tests/unit/out/unsafe/operator_bitwise_member.rs +++ b/tests/unit/out/unsafe/operator_bitwise_member.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 0eb9295006..88aa881c93 100644 --- a/tests/unit/out/unsafe/operator_comparison_defaulted.rs +++ b/tests/unit/out/unsafe/operator_comparison_defaulted.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Eq { pub a: i32, @@ -35,14 +28,7 @@ impl std::cmp::PartialEq for Eq { impl std::cmp::Eq for Eq {} #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Cmp { pub a: i32, @@ -89,14 +75,7 @@ impl std::cmp::PartialEq for Cmp { impl std::cmp::Eq for Cmp {} #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Both { pub a: i32, @@ -134,14 +113,7 @@ impl std::cmp::PartialEq for Both { impl std::cmp::Eq for Both {} #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct OrdOnly { pub a: i32, @@ -176,14 +148,7 @@ impl std::cmp::PartialEq for OrdOnly { impl std::cmp::Eq for OrdOnly {} #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Inner { pub x: i32, @@ -221,14 +186,7 @@ impl std::cmp::PartialEq for Inner { impl std::cmp::Eq for Inner {} #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Outer { pub i: Inner, @@ -279,14 +237,7 @@ impl std::cmp::PartialEq for Outer { impl std::cmp::Eq for Outer {} #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Secondary { pub a: i32, @@ -335,14 +286,7 @@ impl std::cmp::PartialEq for Secondary { impl std::cmp::Eq for Secondary {} #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 8ea736c45d..32cff29854 100644 --- a/tests/unit/out/unsafe/operator_comparison_free.rs +++ b/tests/unit/out/unsafe/operator_comparison_free.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct S { pub v: i32, @@ -70,14 +63,7 @@ pub unsafe fn operator_lt_7(mut a: i32, b: *const S) -> bool { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 ec6e818099..ea4b46c0a2 100644 --- a/tests/unit/out/unsafe/operator_comparison_member.rs +++ b/tests/unit/out/unsafe/operator_comparison_member.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 042b17fc02..ee981c88a3 100644 --- a/tests/unit/out/unsafe/operator_comparison_mixed.rs +++ b/tests/unit/out/unsafe/operator_comparison_mixed.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 f65487b612..2545422fb7 100644 --- a/tests/unit/out/unsafe/operator_comparison_nonbool.rs +++ b/tests/unit/out/unsafe/operator_comparison_nonbool.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct X { pub v: i32, @@ -64,28 +57,14 @@ pub unsafe fn operator_ge_5(mut a: X, mut b: X) -> i32 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Result { pub r: i32, } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Custom { pub v: i32, @@ -99,14 +78,7 @@ impl Custom { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Mixed { pub v: i32, @@ -156,8 +128,7 @@ impl std::cmp::Eq for Mixed {} FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, - DestructibleUnsafe, - CopyableUnsafe, + TriviallyCopyableUnsafe, Default, )] #[cpp_into(bool, to_bool)] @@ -174,14 +145,7 @@ impl MyBool { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Boolish { pub v: i32, @@ -258,14 +222,7 @@ pub static mut ref_true_8: std::cell::LazyCell = std::cell::LazyCell::n }); #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 483871891e..fb40f51dc6 100644 --- a/tests/unit/out/unsafe/operator_compound_assignment_free.rs +++ b/tests/unit/out/unsafe/operator_compound_assignment_free.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 91febb12b4..0808deae9b 100644 --- a/tests/unit/out/unsafe/operator_compound_assignment_member.rs +++ b/tests/unit/out/unsafe/operator_compound_assignment_member.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 7799dce798..a6df4497b0 100644 --- a/tests/unit/out/unsafe/operator_friend.rs +++ b/tests/unit/out/unsafe/operator_friend.rs @@ -11,14 +11,7 @@ pub unsafe fn operator_eq_0(_a0: *const Defaulted, _a1: *const Defaulted) -> boo } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Defaulted { pub a: i32, @@ -47,14 +40,7 @@ pub unsafe fn operator_eq_2(_a0: *const DefaultedOrd, _a1: *const DefaultedOrd) } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct DefaultedOrd { pub a: i32, @@ -88,14 +74,7 @@ pub unsafe fn operator_add_5(x: *const Inline, y: *const Inline) -> Inline { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Inline { pub a: i32, @@ -126,14 +105,7 @@ impl std::cmp::PartialEq for Inline { impl std::cmp::Eq for Inline {} #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct OutOfLine { pub a: i32, @@ -164,14 +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, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Tmpl_int_ { pub v: i32, @@ -202,14 +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, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Tmpl_long_ { pub v: i64, @@ -222,14 +180,7 @@ pub unsafe fn operator_eq_11( } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 ba57f1cc2f..f103a49839 100644 --- a/tests/unit/out/unsafe/operator_less_than.rs +++ b/tests/unit/out/unsafe/operator_less_than.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 0ae987db8a..db4b49c826 100644 --- a/tests/unit/out/unsafe/operator_logical_free.rs +++ b/tests/unit/out/unsafe/operator_logical_free.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 6657800073..a368075737 100644 --- a/tests/unit/out/unsafe/operator_logical_member.rs +++ b/tests/unit/out/unsafe/operator_logical_member.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 2d63c460e4..ee71b10103 100644 --- a/tests/unit/out/unsafe/operator_member_pointer_free.rs +++ b/tests/unit/out/unsafe/operator_member_pointer_free.rs @@ -8,28 +8,14 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Inner { pub x: i32, } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 2310c2c8a1..a8a73c8051 100644 --- a/tests/unit/out/unsafe/operator_member_pointer_member.rs +++ b/tests/unit/out/unsafe/operator_member_pointer_member.rs @@ -8,28 +8,14 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Inner { pub x: i32, } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Table {} impl Table { @@ -41,14 +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, - 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 ebcd624688..720986742f 100644 --- a/tests/unit/out/unsafe/operator_other_free.rs +++ b/tests/unit/out/unsafe/operator_other_free.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 1b6bd43fb8..a86f1392c8 100644 --- a/tests/unit/out/unsafe/operator_other_member.rs +++ b/tests/unit/out/unsafe/operator_other_member.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Static {} impl Static { @@ -31,8 +24,7 @@ impl Static { FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, - DestructibleUnsafe, - CopyableUnsafe, + TriviallyCopyableUnsafe, 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 363ea990d4..40733c02ca 100644 --- a/tests/unit/out/unsafe/operator_overloads.rs +++ b/tests/unit/out/unsafe/operator_overloads.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 8504bc5024..d8385e40b6 100644 --- a/tests/unit/out/unsafe/operator_qualifiers.rs +++ b/tests/unit/out/unsafe/operator_qualifiers.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 f2671b3d7e..6ee24d91b7 100644 --- a/tests/unit/out/unsafe/operator_three_way.rs +++ b/tests/unit/out/unsafe/operator_three_way.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 7f491294a9..00009f4690 100644 --- a/tests/unit/out/unsafe/operator_traits.rs +++ b/tests/unit/out/unsafe/operator_traits.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Lt { pub v: i32, @@ -54,14 +47,7 @@ impl std::cmp::PartialEq for Lt { impl std::cmp::Eq for Lt {} #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Eq { pub v: i32, @@ -79,14 +65,7 @@ impl std::cmp::PartialEq for Eq { impl std::cmp::Eq for Eq {} #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Cmp { pub v: i32, @@ -117,14 +96,7 @@ impl std::cmp::PartialEq for Cmp { impl std::cmp::Eq for Cmp {} #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Free { pub v: i32, @@ -161,14 +133,7 @@ pub unsafe fn operator_eq_1(a: *const Free, b: *const Free) -> bool { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 c9317a9a21..c03438486d 100644 --- a/tests/unit/out/unsafe/overload_mangling.rs +++ b/tests/unit/out/unsafe/overload_mangling.rs @@ -17,14 +17,7 @@ pub unsafe fn twice_2(mut n: i32) -> i32 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Access_S_ {} impl Access_S_ { @@ -43,14 +36,7 @@ impl Access_S_ { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct S { pub base: i32, @@ -126,14 +112,7 @@ impl S { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 1c1c0e130a..21764ba5f4 100644 --- a/tests/unit/out/unsafe/pair_converting_construction.rs +++ b/tests/unit/out/unsafe/pair_converting_construction.rs @@ -14,8 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, - DestructibleUnsafe, - CopyableUnsafe, + TriviallyCopyableUnsafe, Default, )] #[cpp_from(i32, construct, value)] @@ -35,8 +34,7 @@ impl Celsius { FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, - DestructibleUnsafe, - CopyableUnsafe, + TriviallyCopyableUnsafe, Default, )] #[cpp_into(i32, to_i32)] @@ -56,8 +54,7 @@ impl Meters { FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, - DestructibleUnsafe, - CopyableUnsafe, + TriviallyCopyableUnsafe, Default, )] #[cpp_from(Celsius, construct, ptr)] @@ -77,8 +74,7 @@ impl Label { FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, - DestructibleUnsafe, - CopyableUnsafe, + TriviallyCopyableUnsafe, Default, )] #[cpp_from(Celsius, construct_1, ptr)] @@ -105,8 +101,7 @@ impl Owner { FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, - DestructibleUnsafe, - CopyableUnsafe, + TriviallyCopyableUnsafe, Default, )] #[cpp_from(Celsius, construct, value)] @@ -120,14 +115,7 @@ impl Holder { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - CppFromUnsafe, - DestructibleUnsafe, - CopyableUnsafe, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, TriviallyCopyableUnsafe, )] #[cpp_from(i32, construct, value)] pub struct Fallback { @@ -151,14 +139,7 @@ impl Default for Fallback { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Counter { pub hits: i32, @@ -171,8 +152,7 @@ pub struct Counter { FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, - DestructibleUnsafe, - CopyableUnsafe, + TriviallyCopyableUnsafe, Default, )] #[cpp_from(Counter, construct, mut_ptr)] @@ -198,8 +178,7 @@ impl Tag { FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, - DestructibleUnsafe, - CopyableUnsafe, + TriviallyCopyableUnsafe, Default, )] #[cpp_from(Celsius, construct, ptr)] @@ -214,8 +193,7 @@ pub struct Tag { FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, - DestructibleUnsafe, - CopyableUnsafe, + TriviallyCopyableUnsafe, 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 9ee5ea9f79..426d5907a1 100644 --- a/tests/unit/out/unsafe/pod.rs +++ b/tests/unit/out/unsafe/pod.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 fa1f3cc073..ed7cea0ce1 100644 --- a/tests/unit/out/unsafe/pointer_array.rs +++ b/tests/unit/out/unsafe/pointer_array.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 be4c591924..befa1c43c2 100644 --- a/tests/unit/out/unsafe/pointers.rs +++ b/tests/unit/out/unsafe/pointers.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 b2e14fe6b1..b75e0c1aa8 100644 --- a/tests/unit/out/unsafe/ptr_cast_init.rs +++ b/tests/unit/out/unsafe/ptr_cast_init.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct header { pub tag: i32, @@ -23,14 +16,7 @@ pub struct header { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 3a871ff6ca..b84b317a8e 100644 --- a/tests/unit/out/unsafe/push_emplace_back.rs +++ b/tests/unit/out/unsafe/push_emplace_back.rs @@ -8,28 +8,14 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Chunk { pub data: i32, } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Writer { pub output: *mut Vec, @@ -120,14 +106,7 @@ pub unsafe fn self_ref_push_6(mut comps: *mut Vec) { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - CppFromUnsafe, - DestructibleUnsafe, - CopyableUnsafe, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, TriviallyCopyableUnsafe, )] #[cpp_from(i32, construct_1, value)] pub struct Pair { @@ -264,14 +243,7 @@ pub unsafe fn emplace_from_element_14(mut v: *mut Vec>) { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Plain { pub a: i32, @@ -288,14 +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, - 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 eab06ff22a..1d648ec428 100644 --- a/tests/unit/out/unsafe/random.rs +++ b/tests/unit/out/unsafe/random.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Pair { pub x: i32, @@ -51,14 +44,7 @@ pub unsafe fn zero_0() -> i32 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 9f3e3ed9fd..1b0bea1b7d 100644 --- a/tests/unit/out/unsafe/reference_wrapper.rs +++ b/tests/unit/out/unsafe/reference_wrapper.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 af6126c6a7..3aee6a8e84 100644 --- a/tests/unit/out/unsafe/references.rs +++ b/tests/unit/out/unsafe/references.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Pair { pub x: i32, @@ -24,14 +17,7 @@ pub struct Pair { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 2f7fd2c9dc..6787508651 100644 --- a/tests/unit/out/unsafe/refs_as_args.rs +++ b/tests/unit/out/unsafe/refs_as_args.rs @@ -19,14 +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, - 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 fa19cfabc8..4d4b50fbf5 100644 --- a/tests/unit/out/unsafe/reinterpret_cast_ptr_cmp.rs +++ b/tests/unit/out/unsafe/reinterpret_cast_ptr_cmp.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct S { pub x: i32, @@ -23,14 +16,7 @@ pub struct S { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct W { pub h: i32, @@ -38,14 +24,7 @@ pub struct W { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 795706815f..70c3f03d6a 100644 --- a/tests/unit/out/unsafe/reinterpret_cast_struct.rs +++ b/tests/unit/out/unsafe/reinterpret_cast_struct.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 98b5c7d4f7..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,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Point { pub x: u32, @@ -23,14 +16,7 @@ pub struct Point { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 2a022c5622..877a6e3bd7 100644 --- a/tests/unit/out/unsafe/reserved_keywords.rs +++ b/tests/unit/out/unsafe/reserved_keywords.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct S { pub as_: i32, @@ -59,28 +52,14 @@ pub struct S { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct type_ { pub v: i32, } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 1f16547898..55e500cd2f 100644 --- a/tests/unit/out/unsafe/return_move.rs +++ b/tests/unit/out/unsafe/return_move.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct node { pub value: i32, @@ -23,14 +16,7 @@ pub struct node { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 b6583fd5b2..d6ce18406c 100644 --- a/tests/unit/out/unsafe/rvalue_struct.rs +++ b/tests/unit/out/unsafe/rvalue_struct.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 757edd3664..a2269572cb 100644 --- a/tests/unit/out/unsafe/scalar_builtin_construct_destruct.rs +++ b/tests/unit/out/unsafe/scalar_builtin_construct_destruct.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 9b6fe56f36..2b3660c3e9 100644 --- a/tests/unit/out/unsafe/self_referencing_initializer.rs +++ b/tests/unit/out/unsafe/self_referencing_initializer.rs @@ -8,37 +8,21 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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, - 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, 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 0b70647185..769cdd00c5 100644 --- a/tests/unit/out/unsafe/size_t_static_member.rs +++ b/tests/unit/out/unsafe/size_t_static_member.rs @@ -9,28 +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, - 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, - 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 445087702b..2ae0627be2 100644 --- a/tests/unit/out/unsafe/size_t_template_param.rs +++ b/tests/unit/out/unsafe/size_t_template_param.rs @@ -18,8 +18,7 @@ pub unsafe fn array_ref_0(a: *mut [u64; 3]) -> u64 { FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, - DestructibleUnsafe, - CopyableUnsafe, + TriviallyCopyableUnsafe, Default, )] #[cpp_from(*const u64 , construct, value)] @@ -39,8 +38,7 @@ impl PtrCtor_unsigned_long_ { FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, - DestructibleUnsafe, - CopyableUnsafe, + TriviallyCopyableUnsafe, 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 b466c9f317..bb036d12a4 100644 --- a/tests/unit/out/unsafe/static_local.rs +++ b/tests/unit/out/unsafe/static_local.rs @@ -23,14 +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, - 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 de33e44eb5..47d463cbbe 100644 --- a/tests/unit/out/unsafe/static_var_in_class.rs +++ b/tests/unit/out/unsafe/static_var_in_class.rs @@ -9,14 +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, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct C {} impl C { @@ -29,14 +22,7 @@ pub type anon_3 = u32; pub const anon_3_kValue: anon_3 = 3; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 4a0b3d3449..166d2a7737 100644 --- a/tests/unit/out/unsafe/stdcopy.rs +++ b/tests/unit/out/unsafe/stdcopy.rs @@ -14,8 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, - DestructibleUnsafe, - CopyableUnsafe, + TriviallyCopyableUnsafe, Default, )] #[cpp_from(i32, construct, value)] diff --git a/tests/unit/out/unsafe/strdup.rs b/tests/unit/out/unsafe/strdup.rs index 3eb8a6b96e..f8f193d880 100644 --- a/tests/unit/out/unsafe/strdup.rs +++ b/tests/unit/out/unsafe/strdup.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 0c5d83689c..db1f57c658 100644 --- a/tests/unit/out/unsafe/string_literal_ptr_init.rs +++ b/tests/unit/out/unsafe/string_literal_ptr_init.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 932647e8a4..8a30096f81 100644 --- a/tests/unit/out/unsafe/string_substr.rs +++ b/tests/unit/out/unsafe/string_substr.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 2e5488765e..eede3d9f91 100644 --- a/tests/unit/out/unsafe/struct_2d_array_field.rs +++ b/tests/unit/out/unsafe/struct_2d_array_field.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 936b1a2049..0590ff9da9 100644 --- a/tests/unit/out/unsafe/struct_ctor.rs +++ b/tests/unit/out/unsafe/struct_ctor.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct StructWithCtor { x1_: i32, @@ -46,8 +39,7 @@ pub unsafe fn foo_0(x: *mut i32) -> *mut i32 { FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, - DestructibleUnsafe, - CopyableUnsafe, + TriviallyCopyableUnsafe, Default, )] #[cpp_from(i32, construct, value)] @@ -60,9 +52,7 @@ impl Value_ { } } #[repr(C)] -#[derive( - Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, 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 f1402b710a..639719e520 100644 --- a/tests/unit/out/unsafe/struct_default_ctor.rs +++ b/tests/unit/out/unsafe/struct_default_ctor.rs @@ -7,9 +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, CopyableUnsafe, -)] +#[derive(Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct S { pub a: i32, pub b: bool, @@ -33,14 +31,7 @@ impl Default for S { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Declared { pub v: i32, @@ -48,23 +39,14 @@ pub struct Declared { impl Declared {} #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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, 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 019d55c669..3e0de4505b 100644 --- a/tests/unit/out/unsafe/struct_member_array_adjacency.rs +++ b/tests/unit/out/unsafe/struct_member_array_adjacency.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 3cdf384bb2..16cebb0e9f 100644 --- a/tests/unit/out/unsafe/struct_ptr.rs +++ b/tests/unit/out/unsafe/struct_ptr.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 fc845b2d96..0e7b34de55 100644 --- a/tests/unit/out/unsafe/structured_binding_range_for.rs +++ b/tests/unit/out/unsafe/structured_binding_range_for.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 86de454fa1..22848283b9 100644 --- a/tests/unit/out/unsafe/structured_binding_ref.rs +++ b/tests/unit/out/unsafe/structured_binding_ref.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 e295e8c2fe..5c791ba031 100644 --- a/tests/unit/out/unsafe/structured_binding_trivial.rs +++ b/tests/unit/out/unsafe/structured_binding_trivial.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 0a102a8f47..b877ab1c96 100644 --- a/tests/unit/out/unsafe/tag_vs_identifier_collision.rs +++ b/tests/unit/out/unsafe/tag_vs_identifier_collision.rs @@ -12,14 +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, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct widget { pub id: i32, @@ -27,23 +20,14 @@ pub struct widget { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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, CopyableUnsafe, -)] +#[derive(Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub union point { pub whole: i32, pub half: i16, @@ -54,9 +38,7 @@ impl Default for point { } } #[repr(C)] -#[derive( - Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, -)] +#[derive(Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub union slot_union { pub i: i32, pub u: u32, @@ -71,42 +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, - 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, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Outer { pub field: Inner, } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 4f1ce78d44..e7439926b7 100644 --- a/tests/unit/out/unsafe/template_default_arg.rs +++ b/tests/unit/out/unsafe/template_default_arg.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - CppFromUnsafe, - DestructibleUnsafe, - CopyableUnsafe, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, TriviallyCopyableUnsafe, )] #[cpp_from(i32, construct_1, value)] pub struct A { @@ -41,9 +34,7 @@ impl Default for A { } } #[repr(C)] -#[derive( - Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, -)] +#[derive(Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub struct B { pub v: i32, } @@ -71,8 +62,7 @@ impl Default for B { FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, - DestructibleUnsafe, - CopyableUnsafe, + TriviallyCopyableUnsafe, Default, )] #[cpp_from(i32, construct, value)] @@ -104,8 +94,7 @@ pub unsafe fn always_given_3(mut x: NoDefault) -> i32 { FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, - DestructibleUnsafe, - CopyableUnsafe, + TriviallyCopyableUnsafe, 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 efa4c745bc..bc79dde79b 100644 --- a/tests/unit/out/unsafe/template_static_member.rs +++ b/tests/unit/out/unsafe/template_static_member.rs @@ -9,55 +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, - 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, - 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, - 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, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Range_int_ {} pub static mut lo_5: std::cell::LazyCell = @@ -65,14 +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, - 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 8f1208c5d7..064fce4538 100644 --- a/tests/unit/out/unsafe/temporary_field_ctor_arg.rs +++ b/tests/unit/out/unsafe/temporary_field_ctor_arg.rs @@ -36,8 +36,7 @@ pub unsafe fn make_0() -> Outer { FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, - DestructibleUnsafe, - CopyableUnsafe, + TriviallyCopyableUnsafe, Default, )] #[cpp_from(Vec , construct, ptr)] diff --git a/tests/unit/out/unsafe/this.rs b/tests/unit/out/unsafe/this.rs index b7ddd5bd62..cca0ba2b77 100644 --- a/tests/unit/out/unsafe/this.rs +++ b/tests/unit/out/unsafe/this.rs @@ -14,8 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, - DestructibleUnsafe, - CopyableUnsafe, + TriviallyCopyableUnsafe, Default, )] #[cpp_from(i32, construct_1, value)] @@ -118,8 +117,7 @@ pub unsafe fn bump_0(mut p: *mut S) { FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, - DestructibleUnsafe, - CopyableUnsafe, + TriviallyCopyableUnsafe, 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 63a62e6c25..4a65e1aa98 100644 --- a/tests/unit/out/unsafe/typedef-anon-struct.rs +++ b/tests/unit/out/unsafe/typedef-anon-struct.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 9e636e2ad0..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,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C, align(16))] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 bdaa13d7f4..ba618290d5 100644 --- a/tests/unit/out/unsafe/unboxed_locals.rs +++ b/tests/unit/out/unsafe/unboxed_locals.rs @@ -14,14 +14,7 @@ pub unsafe fn inc_1(r: *mut i32) { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 b2ff9a2a4a..e417e9742c 100644 --- a/tests/unit/out/unsafe/unboxed_records.rs +++ b/tests/unit/out/unsafe/unboxed_records.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Inner { pub a: i32, @@ -23,14 +16,7 @@ pub struct Inner { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Cookie { pub x: i32, @@ -40,9 +26,7 @@ pub struct Cookie { pub arr: [i32; 4], } #[repr(C)] -#[derive( - Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, DestructibleUnsafe, 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 583405c164..0f754c8ee8 100644 --- a/tests/unit/out/unsafe/union_addrof_external.rs +++ b/tests/unit/out/unsafe/union_addrof_external.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct record { pub code: u16, @@ -24,9 +17,7 @@ pub struct record { pub pad: [libc::c_char; 8], } #[repr(C)] -#[derive( - Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, -)] +#[derive(Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub union anon_0 { pub h: record, pub raw_: [libc::c_char; 128], @@ -38,14 +29,7 @@ impl Default for anon_0 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 5e3631b289..a7abc7ab17 100644 --- a/tests/unit/out/unsafe/union_basic.rs +++ b/tests/unit/out/unsafe/union_basic.rs @@ -7,9 +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, CopyableUnsafe, -)] +#[derive(Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub union basic { pub i: i32, pub f: f32, @@ -20,9 +18,7 @@ impl Default for basic { } } #[repr(C)] -#[derive( - Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, -)] +#[derive(Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub union empty { __empty: u8, } @@ -32,9 +28,7 @@ impl Default for empty { } } #[repr(C)] -#[derive( - Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, -)] +#[derive(Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub union underscores { pub __: i32, pub ___: f64, @@ -97,9 +91,7 @@ unsafe fn main_0() -> i32 { return 0; } #[repr(C)] -#[derive( - Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, DestructibleUnsafe, 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 95cbe7c41b..09ac989918 100644 --- a/tests/unit/out/unsafe/union_cross_arm_cast.rs +++ b/tests/unit/out/unsafe/union_cross_arm_cast.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct shape_a { pub code: u16, @@ -23,14 +16,7 @@ pub struct shape_a { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct shape_b { pub code: u16, @@ -40,9 +26,7 @@ pub struct shape_b { pub tail: u32, } #[repr(C)] -#[derive( - Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, -)] +#[derive(Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub union anon_0 { pub a: shape_a, pub b: shape_b, @@ -55,14 +39,7 @@ impl Default for anon_0 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 b5eabbc966..e8e05f86a0 100644 --- a/tests/unit/out/unsafe/union_field_alignment.rs +++ b/tests/unit/out/unsafe/union_field_alignment.rs @@ -7,9 +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, CopyableUnsafe, -)] +#[derive(Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub union anon_0 { pub bytes: [u8; 1], pub aligner: *mut ::libc::c_void, @@ -21,14 +19,7 @@ impl Default for anon_0 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 036b79f72e..db9fcda57c 100644 --- a/tests/unit/out/unsafe/union_flex_array_member.rs +++ b/tests/unit/out/unsafe/union_flex_array_member.rs @@ -7,9 +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, CopyableUnsafe, -)] +#[derive(Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub union anon_0 { pub bytes: [u8; 1], pub aligner: *mut ::libc::c_void, @@ -21,14 +19,7 @@ impl Default for anon_0 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 863410f1d5..55f7fccb24 100644 --- a/tests/unit/out/unsafe/union_memset_memcpy.rs +++ b/tests/unit/out/unsafe/union_memset_memcpy.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct shape_a { pub code: u16, @@ -23,14 +16,7 @@ pub struct shape_a { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct shape_b { pub code: u16, @@ -39,9 +25,7 @@ pub struct shape_b { pub fill: [libc::c_char; 8], } #[repr(C)] -#[derive( - Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, -)] +#[derive(Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub union anon_0 { pub a: shape_a, pub b: shape_b, @@ -54,14 +38,7 @@ impl Default for anon_0 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 da8865c764..8d3fcb317c 100644 --- a/tests/unit/out/unsafe/union_nested.rs +++ b/tests/unit/out/unsafe/union_nested.rs @@ -8,23 +8,14 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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, CopyableUnsafe, -)] +#[derive(Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub union anon_0 { pub h: record, pub raw_: [libc::c_char; 128], @@ -36,22 +27,13 @@ impl Default for anon_0 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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, CopyableUnsafe, -)] +#[derive(Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub union anon_1 { pub h: record, pub nested: inner, @@ -63,14 +45,7 @@ impl Default for anon_1 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 e5dc87af40..69afa6f4c5 100644 --- a/tests/unit/out/unsafe/union_pointer_pun_address.rs +++ b/tests/unit/out/unsafe/union_pointer_pun_address.rs @@ -8,28 +8,14 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct node_b { pub data: *mut ::libc::c_void, @@ -50,9 +36,7 @@ unsafe fn main_0() -> i32 { return 0; } #[repr(C)] -#[derive( - Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, DestructibleUnsafe, 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 55c72a4cf7..61886a058c 100644 --- a/tests/unit/out/unsafe/union_pointer_pun_writethrough.rs +++ b/tests/unit/out/unsafe/union_pointer_pun_writethrough.rs @@ -21,9 +21,7 @@ unsafe fn main_0() -> i32 { return 0; } #[repr(C)] -#[derive( - Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, DestructibleUnsafe, 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 f1e97f226b..002cfff370 100644 --- a/tests/unit/out/unsafe/union_struct_dual_use.rs +++ b/tests/unit/out/unsafe/union_struct_dual_use.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Inner { pub a: i32, @@ -25,9 +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, CopyableUnsafe, -)] +#[derive(Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub union anon_1 { pub inner: Inner, pub raw_: [libc::c_char; 16], @@ -39,14 +30,7 @@ impl Default for anon_1 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 680550d074..28a1e52f33 100644 --- a/tests/unit/out/unsafe/union_tagged_many_arms.rs +++ b/tests/unit/out/unsafe/union_tagged_many_arms.rs @@ -13,9 +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, CopyableUnsafe, -)] +#[derive(Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub union anon_0 { pub text: *const libc::c_char, pub handle: *mut ::libc::c_void, @@ -30,14 +28,7 @@ impl Default for anon_0 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 3bca5d919b..852e094d49 100644 --- a/tests/unit/out/unsafe/union_tagged_simple.rs +++ b/tests/unit/out/unsafe/union_tagged_simple.rs @@ -10,9 +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, CopyableUnsafe, -)] +#[derive(Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub union anon_0 { pub obj: *mut ::libc::c_void, pub code: i32, @@ -24,14 +22,7 @@ impl Default for anon_0 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 c361a1f66d..f55e0018a5 100644 --- a/tests/unit/out/unsafe/union_tagged_struct_arms.rs +++ b/tests/unit/out/unsafe/union_tagged_struct_arms.rs @@ -12,14 +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, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct anon_1 { pub items: *mut *mut libc::c_char, @@ -28,14 +21,7 @@ pub struct anon_1 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct anon_2 { pub lo: i32, @@ -45,14 +31,7 @@ pub struct anon_2 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct anon_3 { pub lo: i64, @@ -62,9 +41,7 @@ pub struct anon_3 { pub width: i32, } #[repr(C)] -#[derive( - Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, DestructibleUnsafe, CopyableUnsafe, -)] +#[derive(Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub union anon_0 { pub list: anon_1, pub letters: anon_2, @@ -77,14 +54,7 @@ impl Default for anon_0 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 551333dd54..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,9 +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, CopyableUnsafe, -)] +#[derive(Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe)] pub union anon_0 { pub text: *const libc::c_char, pub handle: *mut ::libc::c_void, @@ -27,14 +25,7 @@ impl Default for anon_0 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 566763cf2f..c149f5685f 100644 --- a/tests/unit/out/unsafe/unique_ptr.rs +++ b/tests/unit/out/unsafe/unique_ptr.rs @@ -30,14 +30,7 @@ impl SafePointer { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 2526277683..af0389c13b 100644 --- a/tests/unit/out/unsafe/unique_ptr_field_reset.rs +++ b/tests/unit/out/unsafe/unique_ptr_field_reset.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 ded6fbf65f..1e46c6f7f9 100644 --- a/tests/unit/out/unsafe/unique_ptr_nested.rs +++ b/tests/unit/out/unsafe/unique_ptr_nested.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 4cd3a36d1f..a19bcfabac 100644 --- a/tests/unit/out/unsafe/unique_ptr_struct.rs +++ b/tests/unit/out/unsafe/unique_ptr_struct.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 e25e9b87f5..bfbaf84296 100644 --- a/tests/unit/out/unsafe/va_arg_mixed_types.rs +++ b/tests/unit/out/unsafe/va_arg_mixed_types.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 17717a61e9..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,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 f14ad832d4..f8beb11294 100644 --- a/tests/unit/out/unsafe/va_arg_struct_ctx.rs +++ b/tests/unit/out/unsafe/va_arg_struct_ctx.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct context { pub verbose: i32, @@ -33,9 +26,7 @@ pub unsafe fn set_error_0( } } #[repr(C)] -#[derive( - Copy, Clone, FnPtrArg, VaArg, ZeroInitializationUnsafe, DestructibleUnsafe, 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 bf9c3ae583..134c4d2127 100644 --- a/tests/unit/out/unsafe/va_arg_void_ptr.rs +++ b/tests/unit/out/unsafe/va_arg_void_ptr.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 6411cb6c7c..dfa3571717 100644 --- a/tests/unit/out/unsafe/va_list_field.rs +++ b/tests/unit/out/unsafe/va_list_field.rs @@ -66,14 +66,7 @@ pub unsafe fn sum_ptr_2(mut n: i32, __args: Box<[VaArg]>) -> i32 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 d0f6fe2388..79535b6d5f 100644 --- a/tests/unit/out/unsafe/vector.rs +++ b/tests/unit/out/unsafe/vector.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct S { pub x: i32, @@ -47,8 +40,7 @@ pub struct Foo { FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, - DestructibleUnsafe, - CopyableUnsafe, + TriviallyCopyableUnsafe, 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 c82ac49185..c01dfed5bc 100644 --- a/tests/unit/out/unsafe/vector_iter_range_ctor.rs +++ b/tests/unit/out/unsafe/vector_iter_range_ctor.rs @@ -14,8 +14,7 @@ use std::rc::Rc; FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, - DestructibleUnsafe, - CopyableUnsafe, + TriviallyCopyableUnsafe, Default, )] #[cpp_from(i32, construct, value)] @@ -35,8 +34,7 @@ impl Degrees { FnPtrArg, ZeroInitializationUnsafe, CppFromUnsafe, - DestructibleUnsafe, - CopyableUnsafe, + TriviallyCopyableUnsafe, 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 9efc1fdce3..0061870b81 100644 --- a/tests/unit/out/unsafe/vector_subscript_direct.rs +++ b/tests/unit/out/unsafe/vector_subscript_direct.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 50ea8fd8a7..6ea2e26239 100644 --- a/tests/unit/out/unsafe/vector_with_allocator.rs +++ b/tests/unit/out/unsafe/vector_with_allocator.rs @@ -8,14 +8,7 @@ use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct TestAllocator_int_ {} impl TestAllocator_int_ { @@ -37,14 +30,7 @@ impl TestAllocator_int_ { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - 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 e8b95ebef5..b03fefe8a2 100644 --- a/tests/unit/out/unsafe/void_cast.rs +++ b/tests/unit/out/unsafe/void_cast.rs @@ -34,14 +34,7 @@ pub unsafe fn bump_and_return_4() -> i32 { } #[repr(C)] #[derive( - Copy, - Clone, - VaArg, - FnPtrArg, - ZeroInitializationUnsafe, - DestructibleUnsafe, - CopyableUnsafe, - Default, + Copy, Clone, VaArg, FnPtrArg, ZeroInitializationUnsafe, TriviallyCopyableUnsafe, Default, )] pub struct Holder { pub field: i32,