2010-06-28 18:36:24 -05:00
|
|
|
|
2011-06-15 13:19:50 -05:00
|
|
|
|
|
|
|
// -*- rust -*-
|
2010-07-05 16:43:02 -05:00
|
|
|
use std;
|
|
|
|
|
2011-06-15 13:19:50 -05:00
|
|
|
fn grow(&mutable vec[int] v) { v += [1]; }
|
2010-06-28 18:36:24 -05:00
|
|
|
|
2010-07-05 16:43:02 -05:00
|
|
|
fn main() {
|
2011-06-15 13:19:50 -05:00
|
|
|
let vec[int] v = [];
|
|
|
|
grow(v);
|
|
|
|
grow(v);
|
|
|
|
grow(v);
|
|
|
|
auto len = std::vec::len[int](v);
|
|
|
|
log len;
|
|
|
|
assert (len == 3 as uint);
|
|
|
|
}
|