about summary refs log tree commit diff
path: root/tests/ui/parser/recover-tuple.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/parser/recover-tuple.rs')
-rw-r--r--tests/ui/parser/recover-tuple.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/parser/recover-tuple.rs b/tests/ui/parser/recover-tuple.rs
new file mode 100644
index 00000000000..59e2695dec6
--- /dev/null
+++ b/tests/ui/parser/recover-tuple.rs
@@ -0,0 +1,11 @@
+fn main() {
+    // no complaints about the tuple not matching the expected type
+    let x: (usize, usize, usize) = (3, .=.);
+    //~^ ERROR expected expression, found `.`
+    // verify that the parser recovers:
+    let y: usize = ""; //~ ERROR mismatched types
+    // no complaints about the type
+    foo(x);
+}
+
+fn foo(_: (usize, usize, usize)) {}