summaryrefslogtreecommitdiffstats
path: root/tests/ui/parser/recover-missing-semi.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/parser/recover-missing-semi.rs')
-rw-r--r--tests/ui/parser/recover-missing-semi.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/ui/parser/recover-missing-semi.rs b/tests/ui/parser/recover-missing-semi.rs
new file mode 100644
index 000000000..f47d5e680
--- /dev/null
+++ b/tests/ui/parser/recover-missing-semi.rs
@@ -0,0 +1,13 @@
+fn main() {
+ let _: usize = ()
+ //~^ ERROR mismatched types
+ //~| ERROR expected `;`
+ let _ = 3;
+}
+
+fn foo() -> usize {
+ let _: usize = ()
+ //~^ ERROR mismatched types
+ //~| ERROR expected `;`
+ return 3;
+}