summaryrefslogtreecommitdiffstats
path: root/src/test/ui/inference/cannot-infer-closure.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/inference/cannot-infer-closure.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/test/ui/inference/cannot-infer-closure.rs b/src/test/ui/inference/cannot-infer-closure.rs
new file mode 100644
index 000000000..1c350b18f
--- /dev/null
+++ b/src/test/ui/inference/cannot-infer-closure.rs
@@ -0,0 +1,6 @@
+fn main() {
+ let x = |a: (), b: ()| {
+ Err(a)?;
+ Ok(b) //~ ERROR type annotations needed
+ };
+}