Skip to content

Commit 6ec3a63

Browse files
committed
Add test for issue-66270
1 parent 96253c2 commit 6ec3a63

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Regression test for #66270, fixed by #66246
2+
3+
struct Bug {
4+
incorrect_field: 0,
5+
//~^ ERROR expected type
6+
}
7+
8+
struct Empty {}
9+
10+
fn main() {
11+
let Bug {
12+
any_field: Empty {},
13+
} = Bug {};
14+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
error: expected type, found `0`
2+
--> $DIR/issue-66270-pat-struct-parser-recovery.rs:4:22
3+
|
4+
LL | incorrect_field: 0,
5+
| ^ expected type
6+
7+
error: aborting due to previous error
8+

0 commit comments

Comments
 (0)