-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c8401a5
commit febf728
Showing
2 changed files
with
17 additions
and
0 deletions.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
src/test/ui/typeck/issue-69378-ice-on-invalid-type-node-after-recovery.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() {} |
8 changes: 8 additions & 0 deletions
8
src/test/ui/typeck/issue-69378-ice-on-invalid-type-node-after-recovery.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
|