]> git.lizzy.rs Git - rust.git/blob - src/test/ui/parse-error-correct.rs
Rollup merge of #57107 - mjbshaw:thread_local_test, r=nikomatsakis
[rust.git] / src / test / ui / parse-error-correct.rs
1 // compile-flags: -Z continue-parse-after-error
2
3 // Test that the parser is error correcting missing idents. Despite a parsing
4 // error (or two), we still run type checking (and don't get extra errors there).
5
6 fn main() {
7     let y = 42;
8     let x = y.;  //~ ERROR unexpected token
9     let x = y.();  //~ ERROR unexpected token
10                    //~^ ERROR expected function, found `{integer}`
11     let x = y.foo; //~ ERROR `{integer}` is a primitive type and therefore doesn't have fields [E061
12 }