What version of the compiler are you using? The clone-able Chan only very recently landed, so you'll need a very up-to-date compiler to get the change.
On Thu, Feb 13, 2014 at 6:12 AM, Liigo Zhuang <[email protected]> wrote: > Hi Rusties, > > When try to compile tmp.rs, I got the error: > > ``` > tmp.rs:8:10: 8:19 error: type `std::comm::Chan<A>` does not implement any > method in scope named `clone` > tmp.rs:8 let _ = c.clone(); > ^~~~~~~~~ > ``` > > But I don't know how to do. Please help me. Thank you. > > tmp.rs: > ``` > #[deriving(Clone)] > pub struct A { > dummy: uint, > } > > pub fn main() { > let (p, c) = Chan::<A>::new(); > let _ = c.clone(); > } > ``` > > -- > by Liigo, http://blog.csdn.net/liigo/ > Google+ https://plus.google.com/105597640837742873343/ > > _______________________________________________ > Rust-dev mailing list > [email protected] > https://mail.mozilla.org/listinfo/rust-dev > _______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
