1
Fork 0

Add regression test

This commit is contained in:
LeSeulArtichaut 2020-02-29 14:38:39 +01:00
parent c8401a5046
commit febf72861b
2 changed files with 17 additions and 0 deletions

View file

@ -0,0 +1,9 @@
// Regression test for #69378: no type for node after struct parse recovery
struct Foo { 0: u8 } //~ ERROR expected identifier
fn test(f: Foo) {
Foo{foo: 4, ..f};
}
fn main() {}

View file

@ -0,0 +1,8 @@
error: expected identifier, found `0`
--> $DIR/issue-69378-ice-on-invalid-type-node-after-recovery.rs:3:14
|
LL | struct Foo { 0: u8 }
| ^ expected identifier
error: aborting due to previous error