c2rust-transpile seems to generate #[derive(Copy, Clone)] on all structs. When rewriting a struct in a way that makes it non-cloneable, such as changing a *mut i32 field to &mut i32, we should remove those derives, since they are no longer valid.
I encountered this on rav1d, too. The one caveat is that unions require Copy fields, so unless we can turn them into enums, we can't rewrite fields into non-Copy types like references.
c2rust-transpile
seems to generate#[derive(Copy, Clone)]
on all structs. When rewriting a struct in a way that makes it non-cloneable, such as changing a*mut i32
field to&mut i32
, we should remove those derives, since they are no longer valid.