rust/src/test/run-pass/vec-push.rs
2011-10-25 15:56:55 +02:00

6 lines
97 B
Rust

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