summaryrefslogtreecommitdiffstats
path: root/tests/ui/parser/ident-recovery.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/parser/ident-recovery.rs')
-rw-r--r--tests/ui/parser/ident-recovery.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/ui/parser/ident-recovery.rs b/tests/ui/parser/ident-recovery.rs
new file mode 100644
index 000000000..7575372b9
--- /dev/null
+++ b/tests/ui/parser/ident-recovery.rs
@@ -0,0 +1,16 @@
+fn ,comma() {
+ //~^ ERROR expected identifier, found `,`
+ struct Foo {
+ x: i32,,
+ //~^ ERROR expected identifier, found `,`
+ y: u32,
+ }
+}
+
+fn break() {
+//~^ ERROR expected identifier, found keyword `break`
+ let continue = 5;
+ //~^ ERROR expected identifier, found keyword `continue`
+}
+
+fn main() {}