17 lines
221 B
Rust
17 lines
221 B
Rust
|
|
|
|
// -*- rust -*-
|
|
use std;
|
|
|
|
fn grow(&v: [int]) { v += [1]; }
|
|
|
|
fn main() {
|
|
let v: [int] = [];
|
|
grow(v);
|
|
grow(v);
|
|
grow(v);
|
|
let len = std::vec::len::<int>(v);
|
|
log len;
|
|
assert (len == 3 as uint);
|
|
}
|