summaryrefslogtreecommitdiffstats
path: root/src/test/ui/issues/issue-25439.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/issues/issue-25439.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-25439.rs b/src/test/ui/issues/issue-25439.rs
new file mode 100644
index 000000000..4f73ff3e3
--- /dev/null
+++ b/src/test/ui/issues/issue-25439.rs
@@ -0,0 +1,9 @@
+struct Helper<'a, F: 'a>(&'a F);
+
+fn fix<F>(f: F) -> i32 where F: Fn(Helper<F>, i32) -> i32 {
+ f(Helper(&f), 8)
+}
+
+fn main() {
+ fix(|_, x| x); //~ ERROR closure/generator type that references itself [E0644]
+}