-
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. |
Beta Was this translation helpful? Give feedback.
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. |
Beta Was this translation helpful? Give feedback.
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.