mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-15 01:55:03 +00:00
15 lines
207 B
Rust
15 lines
207 B
Rust
|
// 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 {};
|
||
|
}
|