summaryrefslogtreecommitdiffstats
path: root/src/test/ui/parser/parser-recovery-1.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/parser/parser-recovery-1.rs')
-rw-r--r--src/test/ui/parser/parser-recovery-1.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/test/ui/parser/parser-recovery-1.rs b/src/test/ui/parser/parser-recovery-1.rs
new file mode 100644
index 000000000..7e26b4f2b
--- /dev/null
+++ b/src/test/ui/parser/parser-recovery-1.rs
@@ -0,0 +1,13 @@
+// Test that we can recover from missing braces in the parser.
+
+trait Foo {
+ fn bar() {
+ let x = foo();
+ //~^ ERROR cannot find function `foo` in this scope
+}
+
+fn main() {
+ let x = y.;
+ //~^ ERROR unexpected token
+ //~| ERROR cannot find value `y` in this scope
+} //~ ERROR this file contains an unclosed delimiter