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

8 lines
158 B
Rust

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