]> git.lizzy.rs Git - rust.git/blob - src/test/ui/parser-recovery-2.rs
Auto merge of #60132 - davidtwco:issue-60075, r=estebank
[rust.git] / src / test / ui / parser-recovery-2.rs
1 // compile-flags: -Z continue-parse-after-error
2
3 // Test that we can recover from mismatched braces in the parser.
4
5 trait Foo {
6     fn bar() {
7         let x = foo(); //~ ERROR cannot find function `foo` in this scope
8     ) //~ ERROR incorrect close delimiter: `)`
9 }
10
11 fn main() {
12     let x = y.;  //~ ERROR unexpected token
13                  //~^ ERROR cannot find value `y` in this scope
14 }