]> git.lizzy.rs Git - rust.git/blob - src/test/ui/parser-recovery-1.rs
Auto merge of #62748 - luca-barbieri:optimize-refcell-borrow, r=RalfJung
[rust.git] / src / test / ui / parser-recovery-1.rs
1 // compile-flags: -Z continue-parse-after-error
2
3 // Test that we can recover from missing braces in the parser.
4
5 trait Foo {
6     fn bar() {
7         let x = foo();
8         //~^ ERROR cannot find function `foo` in this scope
9 }
10
11 fn main() {
12     let x = y.;
13     //~^ ERROR unexpected token
14     //~| ERROR cannot find value `y` in this scope
15 } //~ ERROR this file contains an un-closed delimiter