]> git.lizzy.rs Git - rust.git/blob - src/test/ui/parser-recovery-1.rs
Rollup merge of #57107 - mjbshaw:thread_local_test, r=nikomatsakis
[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