4 ms·
> The type system can't know whether you call `T::clone()` in a method somewhere. It’s not about that, it’s about type system power as the article said. In for
by chrismorgan 1y ago
> The type system can't know whether you call `T::clone()` in a method somewhere.
It’s not about that, it’s about type system power as the article said. In former days there was no way to express the constraint; but these days you can <https://play.rust-lang.org/?gist=d1947d81a126df84f3c91fb29b5d5efc https://play.rust-lang.org/?gist=d1947d81a126df84f3c91fb29b5...>:
impl<T> Clone for WrapArc<T>
where
Arc<T>: Clone,
{
…
}
- jhugo 1y agoYeah. My bad. I got annoyed by the "is broken" terminology of TFA and wasn't thinking clearly :/
- chrismorgan 1y agoI did the same… I just deleted my comment quickly when I realised I had erred!