rust/src/test/run-pass/mutable-alias-vec.rs
Tim Chevalier f96a2a2ca1 Remove by-mutable-ref mode from the compiler
and test cases. Closes #3513
2012-10-05 22:45:50 -07:00

17 lines
259 B
Rust

// -*- rust -*-
extern mod std;
fn grow(v: &mut ~[int]) { *v += ~[1]; }
fn main() {
let mut v: ~[int] = ~[];
grow(&mut v);
grow(&mut v);
grow(&mut v);
let len = vec::len::<int>(v);
log(debug, len);
assert (len == 3 as uint);
}