2010-06-28 16:36:24 -07:00
|
|
|
|
2011-06-15 11:19:50 -07:00
|
|
|
|
|
|
|
// -*- rust -*-
|
2010-07-05 14:43:02 -07:00
|
|
|
use std;
|
|
|
|
|
2011-09-12 12:39:38 +02:00
|
|
|
fn grow(&v: [int]) { v += [1]; }
|
2010-06-28 16:36:24 -07:00
|
|
|
|
2010-07-05 14:43:02 -07:00
|
|
|
fn main() {
|
2011-08-19 15:16:48 -07:00
|
|
|
let v: [int] = [];
|
2011-06-15 11:19:50 -07:00
|
|
|
grow(v);
|
|
|
|
grow(v);
|
|
|
|
grow(v);
|
2011-12-13 16:25:51 -08:00
|
|
|
let len = vec::len::<int>(v);
|
2011-12-22 14:42:52 -08:00
|
|
|
log_full(core::debug, len);
|
2011-06-15 11:19:50 -07:00
|
|
|
assert (len == 3 as uint);
|
2011-08-10 09:27:22 -07:00
|
|
|
}
|