2d1dec78e7
Having it in the alias pass was slightly more efficient (finding expression roots has to be done in both passes), but further muddled up the already complex alias checker. Also factors out some duplication in the mutability-checking code.
3 lines
102 B
Rust
3 lines
102 B
Rust
// error-pattern:assigning to immutable vec content
|
|
fn main() { let v: [int] = [1, 2, 3]; v[1] = 4; }
|