News for hackers. Stuff that matters.
Re:# [derive(Clone)] Is Broken by xvedejas on Tuesday July 08, 2025 @03:06AM (#44497770)
Right now the derive macro requires `T` be `Clone`, but what we actually want to require is only that each field is clone, including those that are generic over `T`. eg `Arc<T>` is `Clone` even though `T` isn't, so the correct restriction would be to require `Arc<T>: Clone` instead of the status quo which requires `T: Clone`
Re:# [derive(Clone)] Is Broken by nithssh on Tuesday July 08, 2025 @08:54AM (#44499508)
This is the best explanation I've read of this limitation
Re:# [derive(Clone)] Is Broken by Xunjin on Tuesday July 08, 2025 @09:11AM (#44499631)
Thank you, summarized perfectly.