summaryrefslogtreecommitdiffstats
path: root/tests/ui/functions-closures/closure-returning-closure.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/functions-closures/closure-returning-closure.rs')
-rw-r--r--tests/ui/functions-closures/closure-returning-closure.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/ui/functions-closures/closure-returning-closure.rs b/tests/ui/functions-closures/closure-returning-closure.rs
new file mode 100644
index 000000000..17db81687
--- /dev/null
+++ b/tests/ui/functions-closures/closure-returning-closure.rs
@@ -0,0 +1,5 @@
+// run-pass
+fn main() {
+ let f = |_||x, y| x+y;
+ assert_eq!(f(())(1, 2), 3);
+}