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

8 lines
163 B
Rust
Raw Normal View History

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(); }