From 2a53640aa13a68e7f9cd92bb7ba59c30dfb4b903 Mon Sep 17 00:00:00 2001 From: Tim Chevalier Date: Thu, 21 Jun 2012 13:14:50 -0700 Subject: [PATCH] Test for issue 1896 (which appears to be fixed) --- src/test/compile-fail/issue-1896.rs | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 src/test/compile-fail/issue-1896.rs diff --git a/src/test/compile-fail/issue-1896.rs b/src/test/compile-fail/issue-1896.rs new file mode 100644 index 0000000000000..eea825060612b --- /dev/null +++ b/src/test/compile-fail/issue-1896.rs @@ -0,0 +1,8 @@ +type t = { f: fn() -> T }; + +fn f(_x: t) {} + +fn main() { + let x: t<()> = { f: { || () } }; //! ERROR expressions with stack closure + f(x); +}