rust/src/test/run-pass/alloca-from-derived-tydesc.rs
Erick Tryzelaar a37e00ed1f Change the ivec type syntax to [T].
This preserves the old syntax for now.
2011-08-09 11:29:36 -07:00

8 lines
165 B
Rust

tag option[T] { some(T); none; }
type r[T] = {mutable v: (option[T])[]};
fn f[T]() -> [T] { ret ~[]; }
fn main() { let r: r[int] = {mutable v: ~[]}; r.v = f(); }