Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I mentioned in a sibling comment. The error message doesn’t explain or suggest what the problem is, and it recommends the wrong fix. (It suggests implementing clone for T, whereas here you need to manually implement clone).

Something like this would have helped me immensely:

> Note: even though struct Foo has derive(Clone), Foo does not implement clone in this case. derive(Clone) may have overly restrictive trait bounds (impl Clone where T: Clone). If this is the case, you may need to manually implement Clone for Foo with less restrictive trait bounds:

    impl Clone for Foo {
        fn clone(&self) …


Would you mind filing a ticket on GitHub.com/rust-lang/rust with that exact request? (I'm on the go and am not logged on GitHub on this device and wouldn't want this feedback to be lost). This should be relatively easy to add and I agree it would be an improvement.


Sure - will do.





Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: