2014-06-30 05:29:33 +00:00
|
|
|
struct Foo {
|
2015-01-08 11:02:42 +00:00
|
|
|
a: usize,
|
2014-06-30 05:29:33 +00:00
|
|
|
}
|
|
|
|
|
2014-10-21 01:40:15 +00:00
|
|
|
fn main() {
|
|
|
|
let Foo {
|
2017-12-10 20:29:24 +00:00
|
|
|
a: _,
|
2016-09-26 20:00:37 +00:00
|
|
|
a: _
|
|
|
|
//~^ ERROR field `a` bound multiple times in the pattern
|
2014-10-21 01:40:15 +00:00
|
|
|
} = Foo { a: 29 };
|
|
|
|
|
|
|
|
let Foo {
|
2017-12-10 20:29:24 +00:00
|
|
|
a,
|
2016-09-26 20:00:37 +00:00
|
|
|
a: _
|
|
|
|
//~^ ERROR field `a` bound multiple times in the pattern
|
2014-10-21 01:40:15 +00:00
|
|
|
} = Foo { a: 29 };
|
2014-06-30 05:29:33 +00:00
|
|
|
|
2014-10-21 01:40:15 +00:00
|
|
|
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
|
2014-10-21 01:40:15 +00:00
|
|
|
} = Foo { a: 29 };
|
|
|
|
}
|