summaryrefslogtreecommitdiffstats
path: root/tests/ui/inference/newlambdas-ret-infer2.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/inference/newlambdas-ret-infer2.rs')
-rw-r--r--tests/ui/inference/newlambdas-ret-infer2.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/ui/inference/newlambdas-ret-infer2.rs b/tests/ui/inference/newlambdas-ret-infer2.rs
new file mode 100644
index 000000000..abe31a05f
--- /dev/null
+++ b/tests/ui/inference/newlambdas-ret-infer2.rs
@@ -0,0 +1,12 @@
+// run-pass
+
+#![allow(dead_code)]
+// Test that the lambda kind is inferred correctly as a return
+// expression
+
+// pretty-expanded FIXME #23616
+
+fn unique() -> Box<dyn FnMut()+'static> { Box::new(|| ()) }
+
+pub fn main() {
+}