Add test for issue-66270
This commit is contained in:
parent
96253c2d15
commit
6ec3a63bb2
@ -0,0 +1,14 @@
|
||||
// Regression test for #66270, fixed by #66246
|
||||
|
||||
struct Bug {
|
||||
incorrect_field: 0,
|
||||
//~^ ERROR expected type
|
||||
}
|
||||
|
||||
struct Empty {}
|
||||
|
||||
fn main() {
|
||||
let Bug {
|
||||
any_field: Empty {},
|
||||
} = Bug {};
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
error: expected type, found `0`
|
||||
--> $DIR/issue-66270-pat-struct-parser-recovery.rs:4:22
|
||||
|
|
||||
LL | incorrect_field: 0,
|
||||
| ^ expected type
|
||||
|
||||
error: aborting due to previous error
|
||||
|
Loading…
x
Reference in New Issue
Block a user