I have a global static array that I declared as a lookup table in Rust. For some odd reason I can't assign values to elements. It looks like this:
pub static mut WON_TABLE: &'static [u8] = &[0; 1000];
fn main () {
    for mov in 0..1000 {
        unsafe {
            WON_TABLE[mov as usize] = some_analyzer_function(mov);
        }
    }
}
For some reason this doesn't work and I keep getting the error:
error: cannot assign to immutable indexed content
Does anyone know why this is going on?