Repository navigation
|
I have a struct struct MyStruct<T> {
a: T,
b: T,
}and deriving Pod on it errors because multiple generics don't seem to be allowed, but I can't find any documentation of the reason. |
Answered by
Lokathor
Oct 15, 2024
Replies: 1 comment 6 replies
|
at first glance it looks like that code should work? did you also use If that doesn't work then probably it's just that the proc-macro derive isn't sufficiently advanced, and someone could probably do a PR to support that. I'm going to make this into an issue so that this can be checked on longer term. |
6 replies
Answer selected by
Lokathor
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
at first glance it looks like that code should work? did you also use
repr(C)in the actual code? ifrepr(C)is in the picture, then your type is basically the same as[T; 2].If that doesn't work then probably it's just that the proc-macro derive isn't sufficiently advanced, and someone could probably do a PR to support that. I'm going to make this into an issue so that this can be checked on longer term.