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-09-12 05:39:38 -05:00
|
|
|
fn grow(&v: [int]) { v += [1]; }
|
2010-06-28 18:36:24 -05:00
|
|
|
|
2010-07-05 16:43:02 -05:00
|
|
|
fn main() {
|
2011-08-19 17:16:48 -05:00
|
|
|
let v: [int] = [];
|
2011-06-15 13:19:50 -05:00
|
|
|
grow(v);
|
|
|
|
grow(v);
|
|
|
|
grow(v);
|
2011-08-13 02:10:18 -05:00
|
|
|
let len = std::vec::len::<int>(v);
|
2011-06-15 13:19:50 -05:00
|
|
|
log len;
|
|
|
|
assert (len == 3 as uint);
|
2011-08-10 11:27:22 -05:00
|
|
|
}
|