CARDIAC › rust-cardiac › Message codes › RCE0018
RCE0018error
A struct used in a way not supported yet.
error[RCE0018]: {f}: {l}: {ty}: a struct behind a reference is not supported yet
error[RCE0018]: {f}: {l}: {ty}: an array of structs with arrays in them is not supported yet
error[RCE0018]: {f}: an array of structs as a parameter is not supported yet
error[RCE0018]: {f}: {s}: an array of structs used this way is not supported yet
error[RCE0018]: {f}: {s}: a whole struct used this way is not supported yet
error[RCE0018]: {f}: {line}: unsupported element assignment
error[RCE0018]: {f}: {line}: unsupported struct copy
error[RCE0018]: {f}: {line}: a struct result from a function that is not compiled here
error[RCE0018]: {f}: field {k} of {s} is past its last field
A struct used in a way the compiler doesn't take apart yet.
A struct on CARDIAC is a cell for each field, and an array of structs an array for each field. The compiler follows each use of a struct to those cells: a field read or written, the whole struct passed, returned or copied. Some uses it can't follow yet: a struct with an array in it behind a reference or in an array, an array of structs passed as a parameter, a whole struct read in some places.
Pass the fields you need, pass the struct by value, or keep parallel arrays, one for each field.
struct Point { x: i16, y: i16 }
// parallel arrays in place of [Point; 8]
let mut xs = [0i16; 8];
let mut ys = [0i16; 8];
In a terminal: cargo cardiac help RCE0018.