0ddade3d7a
This is a somewhat odd place to put these checks, but the data tracked by that pass, and the available functions, make it trivial to do such a check there.
7 lines
126 B
Rust
7 lines
126 B
Rust
// xfail-stage0
|
|
// error-pattern:assignment to immutable vec content
|
|
fn main() {
|
|
let vec[int] v = [1, 2, 3];
|
|
v.(1) = 4;
|
|
}
|