]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/recover-from-semicolon-trailing-item.rs
Rollup merge of #106446 - bzEq:fix-unwind-lsda, r=Amanieu
[rust.git] / tests / ui / suggestions / recover-from-semicolon-trailing-item.rs
1 // verify that after encountering a semicolon after an item the parser recovers
2 mod M {};
3 //~^ ERROR expected item, found `;`
4 struct S {};
5 //~^ ERROR expected item, found `;`
6 fn foo(a: usize) {};
7 //~^ ERROR expected item, found `;`
8 fn main() {
9     struct X {};  // ok
10     let _: usize = S {};
11     //~^ ERROR mismatched types
12     let _: usize = X {};
13     //~^ ERROR mismatched types
14     foo("");
15     //~^ ERROR mismatched types
16 }