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