]> git.lizzy.rs Git - rust.git/blob - tests/ui/parser/parse-error-correct.rs
Merge commit '598f0909568a51de8a2d1148f55a644fd8dffad0' into sync_cg_clif-2023-01-24
[rust.git] / tests / ui / parser / parse-error-correct.rs
1 // Test that the parser is error correcting missing idents. Despite a parsing
2 // error (or two), we still run type checking (and don't get extra errors there).
3
4 fn main() {
5     let y = 42;
6     let x = y.;  //~ ERROR unexpected token
7     let x = y.();  //~ ERROR unexpected token
8                    //~^ ERROR expected function, found `{integer}`
9     let x = y.foo; //~ ERROR `{integer}` is a primitive type and therefore doesn't have fields [E061
10 }