4 ms·
skill issue. Arc should allow Clone, even if the underlying is not `impl Clone`.
by mrbook22 1y ago
skill issue. Arc should allow Clone, even if the underlying is not `impl Clone`.
- saghm 1y agoArc _does_ allow clone without the underlying implementation not being clone. That's exactly why it's so unexpected that having an `Arc<T>` field in a struct doesn't allow deriving clone unless `T` is also clone; it doesn't actually matter to the implementation, and you end up having to write the exact same thing manually that would be generated by deriving it if the compiler actually allowed it.