rust/src/test/run-pass/vec-push.rs

5 lines
108 B
Rust
Raw Normal View History

2011-07-27 07:19:39 -05:00
fn push[T](v: &mutable vec[mutable? T], t: &T) { v += [t]; }
2011-07-27 07:19:39 -05:00
fn main() { let v = [1, 2, 3]; push(v, 1); }