rust/src/test/run-pass/vec-alloc-append.rs

13 lines
218 B
Rust
Raw Normal View History

// This is a test for issue #109.
use std;
2011-07-27 07:19:39 -05:00
fn slice[T](e: vec[T]) {
let result: vec[T] = std::vec::alloc[T](1 as uint);
log "alloced";
result += e;
log "appended";
}
fn main() { slice[str](["a"]); }