[wiggle] Don't make generated structs and unions Copy.

Some structs and unions are large enough that making them `Copy` isn't
ideal. wasi-common only needed `Copy` in a few places that were easy to
fix. `SubscriptionClock` is 32 bytes, so it's not a bad a idea to pass
it by reference anyway.
This commit is contained in:
Dan Gohman
2020-03-20 11:08:38 -07:00
committed by Jakub Konka
parent 66460f2139
commit 2fdc7f1a8e
5 changed files with 5 additions and 5 deletions

View File

@@ -74,7 +74,7 @@ pub(super) fn define_struct(
let (struct_lifetime, extra_derive) = if s.needs_lifetime() {
(quote!(<'a>), quote!())
} else {
(quote!(), quote!(, Copy, PartialEq))
(quote!(), quote!(, PartialEq))
};
let transparent = if s.is_transparent() {

View File

@@ -68,7 +68,7 @@ pub(super) fn define_union(names: &Names, name: &witx::Id, u: &witx::UnionDataty
let (enum_lifetime, extra_derive) = if u.needs_lifetime() {
(quote!(<'a>), quote!())
} else {
(quote!(), quote!(, Copy, PartialEq))
(quote!(), quote!(, PartialEq))
};
quote! {