summaryrefslogtreecommitdiffstats
path: root/src/test/ui/parser/recover-tuple.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/parser/recover-tuple.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/ui/parser/recover-tuple.rs b/src/test/ui/parser/recover-tuple.rs
new file mode 100644
index 000000000..59e2695de
--- /dev/null
+++ b/src/test/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)) {}