summary refs log tree commit diff
path: root/src/test/compile-fail/issue-1896.rs
blob: f01d5b23f84d7bab3c94320fb000b4e9c708dcc2 (plain)
1
2
3
4
5
6
7
8
type t<T> = { f: fn() -> T };

fn f<T>(_x: t<T>) {}

fn main() {
  let x: t<()> = { f: || () }; //~ ERROR expressions with stack closure
    f(x);
}