rust/tests/ui/issues/issue-15260.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

26 lines
506 B
Rust
Raw Normal View History

struct Foo {
a: usize,
}
fn main() {
let Foo {
a: _,
2016-09-26 20:00:37 +00:00
a: _
//~^ ERROR field `a` bound multiple times in the pattern
} = Foo { a: 29 };
let Foo {
a,
2016-09-26 20:00:37 +00:00
a: _
//~^ ERROR field `a` bound multiple times in the pattern
} = Foo { a: 29 };
let Foo {
2016-09-26 20:00:37 +00:00
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 };
}