rust/src/test/run-pass/alloca-from-derived-tydesc.rs

8 lines
165 B
Rust
Raw Normal View History

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