Question about rust arrays (the constant size ones, [T, ..Size]). I am trying to make the following work:
#[deriving(PartialEq)]
struct Test {
dats : [f32, ..16]
}
I know I could not use deriving and simply write my own PartialEq, but that is rather obnoxious... The error message that is given is also cryptic to me (see bellow). Is there a proper rustic way to do this?
rustc ar.rs
ar.rs:4:3: 4:20 error: mismatched types: expected `&&[f32]` but found `&[f32, .. 16]` (expected &-ptr but found vector)
ar.rs:4 dat : [f32, ..16]
^~~~~~~~~~~~~~~~~
note: in expansion of #[deriving]
ar.rs:2:1: 3:7 note: expansion site
ar.rs:4:3: 4:20 error: mismatched types: expected `&&[f32]` but found `&[f32, .. 16]` (expected &-ptr but found vector)
ar.rs:4 dat : [f32, ..16]
^~~~~~~~~~~~~~~~~
note: in expansion of #[deriving]
ar.rs:2:1: 3:7 note: expansion site
error: aborting due to 2 previous error
I am on the rust nightly build from today.
Thanks!