rust/src/test/run-pass/vec-push.rs
2011-07-27 15:54:33 +02:00

5 lines
108 B
Rust

fn push[T](v: &mutable vec[mutable? T], t: &T) { v += [t]; }
fn main() { let v = [1, 2, 3]; push(v, 1); }