-
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
Deriving Clone in structs with unions inside expect type parameters to be Clone, unlike structs. #36640
Comments
This is a consequence of some more general problem: #26925
|
Workaround: implement |
Hm... the I mean, I understand why the bound needs to be there conceptually, but this works fine with structs (which AFAIK have the same limitation), so I assume there are differences in the generated |
Yes, structs don't need to be |
Gah, oh, I see, that's annoying for my use case (where I always derive both of them). Thanks for the reply, though arguably I should have read more carefully. |
Going to close in favor of #26925 -- since that's the underlying cause of this issue. |
Version: rustc 1.13.0-nightly (c772948 2016-09-20)
Test case:
URL: https://is.gd/snf8Kb
Note that replacing the
union
for anstruct
works fine.Result
Expected
No errors.
The text was updated successfully, but these errors were encountered: