Test for issue 1896 (which appears to be fixed)
This commit is contained in:
parent
453e29cc39
commit
2a53640aa1
1 changed files with 8 additions and 0 deletions
8
src/test/compile-fail/issue-1896.rs
Normal file
8
src/test/compile-fail/issue-1896.rs
Normal file
|
@ -0,0 +1,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);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue