-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Derive Clone not working with struct containing generic type not implementing Clone #41481
Comments
This is a known issue. This is the only way to do it without sometimes generating code that wouldn't compile due to well-formedness or privacy errors, so it's unlikely to be fixed in the standard library AFAIK. However there is a macro library called derivative that lets you override the bounds, so you can write e.g. |
See #26925 |
Also #40754 |
Ping the merciless triager and issue slayer @Mark-Simulacrum! Can we close this as a dupe? |
Yeah, I think so. Closing in favor of #26925. |
Hello.
The following code:
causes the following compiler error:
But I believe it should work as I can write the
impl
myself (commented in the code above) andRc
isClone
.The same error is triggered on versions
rustc 1.16.0 (30cf806ef 2017-03-10)
andrustc 1.18.0-nightly (bbdaad0dc 2017-04-14)
.Thanks to fix this issue.
The text was updated successfully, but these errors were encountered: