Closed
Description
The following program:
type two_ints = [int * 2];
fn main() {
let mut foo: two_ints = [0, 1];
foo[0] = foo[1];
}
erroneously yields:
/Users/nmatsakis/tmp/foo.rs:5:4: 5:9 error: assigning to immutable vec content
/Users/nmatsakis/tmp/foo.rs:5 foo[0] = foo[1];
^~~~~
error: aborting due to previous error
Note that using a ~[]
vec compiles successfully.