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

8 lines
154 B
Rust
Raw Normal View History

enum option<T> { some(T), none, }
2012-03-26 18:35:18 -07:00
type r<T> = {mut v: [option<T>]};
fn f<T>() -> [T] { ret []; }
2012-03-26 18:35:18 -07:00
fn main() { let r: r<int> = {mut v: []}; r.v = f(); }