These are chat archives for rust-lang/rust

Aug 2017
Aug 10 2017 04:35
Glad you solved it :smile:
Timmy Jose
Aug 10 2017 12:57
Hey folks, can anybody give me a good resource to learn about impl traits and its use cases?
Aleksey Kladov
Aug 10 2017 13:13
@timmyjose I don't know about a super great resource, but the RFC might be a good place to start:
Timmy Jose
Aug 10 2017 13:19
@matklad Okay, that looks like a good place to start with. Thank you!
Aug 10 2017 16:12

I just discovered that #[derive(Clone)] struct Foo<T> { ... } will produce

impl<T: ::std::clone::Clone> ::std::clone::Clone for Foo<T> { ... }

But I don't want such constraints on generic type - because my type is kind of shared pointer. Is there a way to circumvent this?

Diggory Blake
Aug 10 2017 16:19
no, you have to implement Clone manually
Aug 10 2017 16:25
Dang. That's a pain.