SQ in silver chrome letters, a lab's gear stacked against the S: a rack, two oscilloscopes, pizza boxes and a six-pack. Strange Query Lab

CARDIAC › rust-cardiac › Message codes › RCE0003

RCE0003error

A place CARDIAC can't address.

error[RCE0003]: unsupported place {p}
error[RCE0003]: indexing a non-array {p}
error[RCE0003]: unsupported place {p}: a pointer into memory this backend doesn't have (a static's is, when its first value is a literal of numbers or bools)

A place your program reads or writes (a local, a field, an element, what a pointer points to) is one the compiler can't give a cell.

Every value on CARDIAC lives in cells the compiler lays out before the program runs: a local is a cell, an array a row of cells, a struct a cell for each field. A pointer is the address of one of those cells. A place that is none of these, such as a pointer into memory the program didn't lay out, or an element of something that isn't an array, can't be reached.

Keep data in locals, arrays, structs and statics whose values are numbers or bools, and pass references to them.

// compiles: an array, passed by reference
fn total(t: &[i16; 4]) -> i16 {
    t[0] + t[1] + t[2] + t[3]
}

In a terminal: cargo cardiac help RCE0003.