Skip to content

Commit 2a53640

Browse files
committed
Test for issue 1896 (which appears to be fixed)
1 parent 453e29c commit 2a53640

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Diff for: src/test/compile-fail/issue-1896.rs

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
type t<T> = { f: fn() -> T };
2+
3+
fn f<T>(_x: t<T>) {}
4+
5+
fn main() {
6+
let x: t<()> = { f: { || () } }; //! ERROR expressions with stack closure
7+
f(x);
8+
}

0 commit comments

Comments
 (0)