diff options
Diffstat (limited to 'tests/ui/parser/parser-recovery-1.rs')
-rw-r--r-- | tests/ui/parser/parser-recovery-1.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/ui/parser/parser-recovery-1.rs b/tests/ui/parser/parser-recovery-1.rs new file mode 100644 index 000000000..7e26b4f2b --- /dev/null +++ b/tests/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 |