mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
25 lines
506 B
Rust
25 lines
506 B
Rust
struct Foo {
|
|
a: usize,
|
|
}
|
|
|
|
fn main() {
|
|
let Foo {
|
|
a: _,
|
|
a: _
|
|
//~^ ERROR field `a` bound multiple times in the pattern
|
|
} = Foo { a: 29 };
|
|
|
|
let Foo {
|
|
a,
|
|
a: _
|
|
//~^ ERROR field `a` bound multiple times in the pattern
|
|
} = Foo { a: 29 };
|
|
|
|
let Foo {
|
|
a,
|
|
a: _,
|
|
//~^ ERROR field `a` bound multiple times in the pattern
|
|
a: x
|
|
//~^ ERROR field `a` bound multiple times in the pattern
|
|
} = Foo { a: 29 };
|
|
}
|