You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I'm using this crate for creating a plugin system for my editor application.
I have added matrix structs with deriving Serializable as:
#[repr(C)]#[derive(Debug,Default,Clone,Copy,PartialEq,Serializable)]pubstructMat2x2{pubcomponents:[f64;2*2],}#[repr(C)]#[derive(Debug,Default,Clone,Copy,PartialEq,Serializable)]pubstructMat2x3{pubcomponents:[f64;3*2],}// :// :#[repr(C)]#[derive(Debug,Default,Clone,Copy,PartialEq,Serializable)]pubstructMat4x4{pubcomponents:[f64;4*4],}// Actually, all combinations of rows and columns are made by `paste!` and my macro. So I don't want to inline them manually if possible.
But it doesn't work against the intention and shows this error (formatted):
It seems that Serializable cannot be derived by the fixed array with length of using const variable too. According to the behaviour of parsing, it is like not to accept except an integer literal.
Hello, I'm using this crate for creating a plugin system for my editor application.
I have added matrix structs with deriving
Serializable
as:But it doesn't work against the intention and shows this error (formatted):
It seems that
Serializable
cannot be derived by the fixed array with length of usingconst
variable too. According to the behaviour of parsing, it is like not to accept except an integer literal.Then, I implemented
Serializable
trait manually for matrix structs as below and it works well.Is this a bug or an unsupported feature?
The text was updated successfully, but these errors were encountered: