2012-11-01 17:14:36 -05:00
|
|
|
type t<T> = { f: fn() -> T };
|
|
|
|
|
|
|
|
fn f<T>(_x: t<T>) {}
|
|
|
|
|
|
|
|
fn main() {
|
2012-11-04 22:41:00 -06:00
|
|
|
let x: t<()> = { f: { || () } }; //~ ERROR expected & closure, found @ closure
|
|
|
|
//~^ ERROR in field `f`, expected & closure, found @ closure
|
|
|
|
f(x);
|
2012-11-01 17:14:36 -05:00
|
|
|
}
|